summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-12-20 23:05:55 +1100
committerAndrew Bartlett <abartlet@samba.org>2013-01-09 15:29:47 +1100
commit1002cc9a669836d6cddaac350715a2b107bec01e (patch)
tree23fd5444bfbc4bdb906dccd1b78d13609e11562c /source3/script
parentfcdd6092b10a4b4406af47b989dcf1a9d693580e (diff)
downloadsamba-1002cc9a669836d6cddaac350715a2b107bec01e.tar.gz
samba-1002cc9a669836d6cddaac350715a2b107bec01e.tar.bz2
samba-1002cc9a669836d6cddaac350715a2b107bec01e.zip
selftest: show that Samba honours "write list" and valid users
Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/test_smbclient_machine_auth.sh4
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh8
2 files changed, 10 insertions, 2 deletions
diff --git a/source3/script/tests/test_smbclient_machine_auth.sh b/source3/script/tests/test_smbclient_machine_auth.sh
index f67256d19b..a890d48314 100755
--- a/source3/script/tests/test_smbclient_machine_auth.sh
+++ b/source3/script/tests/test_smbclient_machine_auth.sh
@@ -19,3 +19,7 @@ incdir=`dirname $0`/../../../testprogs/blackbox
. $incdir/subunit.sh
testit "smbclient //$SERVER/tmp" $SMBCLIENT //$SERVER/tmp --machine-pass -I $SERVER_IP -p 139 -c quit $ADDARGS
+
+# Testing these here helps because we know the machine account isn't already this user/group
+testit "smbclient //$SERVER/forceuser" $SMBCLIENT //$SERVER/tmp --machine-pass -I $SERVER_IP -p 139 -c quit $ADDARGS
+testit "smbclient //$SERVER/forcegroup" $SMBCLIENT //$SERVER/tmp --machine-pass -I $SERVER_IP -p 139 -c quit $ADDARGS
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index fb518c58c7..b240da0769 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -212,7 +212,7 @@ mkdir a_test_dir
quit
EOF
- cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U% //$SERVER/ro-tmp -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
+ cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT -U% //$SERVER/$1" -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
eval echo "$cmd"
out=`eval $cmd`
ret=$?
@@ -581,7 +581,11 @@ testit "creating a good symlink and deleting it by path" \
failed=`expr $failed + 1`
testit "writing into a read-only directory fails" \
- test_read_only_dir || \
+ test_read_only_dir ro-tmp || \
+ failed=`expr $failed + 1`
+
+testit "writing into a read-only share fails" \
+ test_read_only_dir valid-users-tmp || \
failed=`expr $failed + 1`
testit "Reading a owner-only file fails" \