Fix up the build farm again.
[ira/wip.git] / testsuite / build_farm / basicsmb.fns
index 5c3ab9b90ca49b6049aa829316556c1d0f9005cf..ab866601a34519e7fc956f4a0e3c26c6c0c84b99 100644 (file)
@@ -86,6 +86,37 @@ test_smbpasswd() {
        return 0
 }
 
        return 0
 }
 
+test_smbpasswd_remote() {
+       test_smbpasswd_password="$1"
+       test_smbpasswd_newpassword="$2"
+       rm -f $prefix/private/smbpasswd
+       echo "( echo $test_smbpasswd_password; echo $test_smbpasswd_newpassword ; echo $test_smbpasswd_newpassword; ) | $prefix/bin/smbpasswd -r localhost -s -U $whoami"
+       ( echo $test_smbpasswd_password; echo $test_smbpasswd_newpassword ; echo $test_smbpasswd_newpassword; ) | $prefix/bin/smbpasswd -r localhost -s -U $whoami
+       status=$?
+       if [ $status = 0 ]; then
+           echo "smbpasswd correctly remotely changed password ($test_smbpasswd_password -> $test_smbpasswd_newpassword)"
+       else
+           echo "smbpasswd failed to remotely changed password ($test_smbpasswd_password -> $test_smbpasswd_newpassword)! (status $status)"
+           return 1
+       fi
+       return 0
+}
+
+test_smbpasswd_local() {
+       test_smbpasswd_newpassword="$2"
+       rm -f $prefix/private/smbpasswd
+       echo "( echo $test_smbpasswd_newpassword ; echo $test_smbpasswd_newpassword; ) | $prefix/bin/smbpasswd -L $whoami"
+       ( echo $test_smbpasswd_newpassword ; echo $test_smbpasswd_newpassword; ) | $prefix/bin/smbpasswd -L $whoami
+       status=$?
+       if [ $status = 0 ]; then
+           echo "smbpasswd correctly locally changed password ($test_smbpasswd_password -> $test_smbpasswd_newpassword)"
+       else
+           echo "smbpasswd failed to locallly changed password ($test_smbpasswd_password -> $test_smbpasswd_newpassword)! (status $status)"
+           return 1
+       fi
+       return 0
+}
+
 test_listfilesauth() {
        remote_name="$1"
        echo $prefix/bin/smbclient//$remote_name/samba  -n buildclient -U$whoami%$password -c 'ls'
 test_listfilesauth() {
        remote_name="$1"
        echo $prefix/bin/smbclient//$remote_name/samba  -n buildclient -U$whoami%$password -c 'ls'