summaryrefslogtreecommitdiff
path: root/testsuite/build_farm
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/build_farm')
-rw-r--r--testsuite/build_farm/basicsmb-local-pass-change.test10
-rw-r--r--testsuite/build_farm/basicsmb-remote-pass-change.test10
-rw-r--r--testsuite/build_farm/basicsmb.fns31
-rw-r--r--testsuite/build_farm/basicsmb.smb.conf.hostsequiv.template2
-rw-r--r--testsuite/build_farm/torture_setup.fns4
5 files changed, 54 insertions, 3 deletions
diff --git a/testsuite/build_farm/basicsmb-local-pass-change.test b/testsuite/build_farm/basicsmb-local-pass-change.test
new file mode 100644
index 0000000000..432376c666
--- /dev/null
+++ b/testsuite/build_farm/basicsmb-local-pass-change.test
@@ -0,0 +1,10 @@
+. basicsmb.fns
+
+passwordold=samba
+password=samba2
+security=USER
+(test_smb_conf_setup && test_smbpasswd $passwordold && test_smbpasswd_local $passwordold $password) || exit 1
+
+test_listfilesauth $security || exit 1
+test_listfilesnpw $security || exit 1
+
diff --git a/testsuite/build_farm/basicsmb-remote-pass-change.test b/testsuite/build_farm/basicsmb-remote-pass-change.test
new file mode 100644
index 0000000000..adfe0dc3eb
--- /dev/null
+++ b/testsuite/build_farm/basicsmb-remote-pass-change.test
@@ -0,0 +1,10 @@
+. basicsmb.fns
+
+passwordold=samba
+password=samba2
+security=USER
+(test_smb_conf_setup && test_smbpasswd $passwordold && test_smbpasswd_remote $passwordold $password) || exit 1
+
+test_listfilesauth $security || exit 1
+test_listfilesnpw $security || exit 1
+
diff --git a/testsuite/build_farm/basicsmb.fns b/testsuite/build_farm/basicsmb.fns
index 5c3ab9b90c..ab866601a3 100644
--- a/testsuite/build_farm/basicsmb.fns
+++ b/testsuite/build_farm/basicsmb.fns
@@ -86,6 +86,37 @@ test_smbpasswd() {
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'
diff --git a/testsuite/build_farm/basicsmb.smb.conf.hostsequiv.template b/testsuite/build_farm/basicsmb.smb.conf.hostsequiv.template
index e870afceb9..750af74f59 100644
--- a/testsuite/build_farm/basicsmb.smb.conf.hostsequiv.template
+++ b/testsuite/build_farm/basicsmb.smb.conf.hostsequiv.template
@@ -1,3 +1,3 @@
hostname lookups = no
hosts equiv=PREFIX/lib/hosts.equiv
-
+ auth methods = hostsequiv
diff --git a/testsuite/build_farm/torture_setup.fns b/testsuite/build_farm/torture_setup.fns
index 3d9abbcd79..bf5146148e 100644
--- a/testsuite/build_farm/torture_setup.fns
+++ b/testsuite/build_farm/torture_setup.fns
@@ -6,8 +6,8 @@ test_torture() {
security=USER
(test_smb_conf_setup && test_smbpasswd $password ) || return 1
- echo $pwd/$tree/source/bin/smbtorture //localhost/test -U$whoami%$password $torture_test
- $pwd/$tree/source/bin/smbtorture //localhost/test -U$whoami%$password $torture_test
+ echo $srcdir/bin/smbtorture //localhost/test -U$whoami%$password $torture_test
+ $srcdir/bin/smbtorture //localhost/test -U$whoami%$password $torture_test
status=$?
if [ $status = 0 ]; then
echo "smbtorture test $torture_test worked"