The Samba-Bugzilla – Attachment 8362 Details for
Bug 9518
conn->share_access appears not be be reset between users
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to add test case for "write list"
0001-selftest-show-that-Samba-honours-write-list-and-vali.patch (text/plain), 3.75 KB, created by
Andrew Bartlett
on 2012-12-20 21:40:06 UTC
(
hide
)
Description:
patch to add test case for "write list"
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2012-12-20 21:40:06 UTC
Size:
3.75 KB
patch
obsolete
>From b7d1b577e5741ced61a63914a167a31eee2e585e Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Thu, 20 Dec 2012 23:05:55 +1100 >Subject: [PATCH] selftest: show that Samba honours "write list" and valid > users > >--- > selftest/target/Samba3.pm | 7 +++++++ > source3/script/tests/test_smbclient_machine_auth.sh | 4 ++++ > source3/script/tests/test_smbclient_s3.sh | 8 ++++++-- > source3/selftest/tests.py | 5 +++++ > 4 files changed, 22 insertions(+), 2 deletions(-) > >diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm >index ea2e21d..b259dea 100755 >--- a/selftest/target/Samba3.pm >+++ b/selftest/target/Samba3.pm >@@ -956,6 +956,13 @@ sub provision($$$$$$) > [ro-tmp] > path = $ro_shrdir > guest ok = yes >+[write-list-tmp] >+ path = $shrdir >+ read only = yes >+ write list = $unix_name >+[valid-users-tmp] >+ path = $shrdir >+ valid users = $unix_name > [msdfs-share] > path = $msdfs_shrdir > msdfs root = yes >diff --git a/source3/script/tests/test_smbclient_machine_auth.sh b/source3/script/tests/test_smbclient_machine_auth.sh >index f67256d..a890d48 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 fb518c5..b240da0 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" \ >diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py >index 57a67ed..44efe18 100755 >--- a/source3/selftest/tests.py >+++ b/source3/selftest/tests.py >@@ -333,6 +333,11 @@ for t in tests: > elif t == "smb2.durable-open" or t == "smb2.durable-v2-open": > plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD') > plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/durable -U$USERNAME%$PASSWORD') >+ elif t == "base.rw1": >+ plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD') >+ plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/valid-users-tmp -U$USERNAME%$PASSWORD') >+ plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/write-list-tmp -U$USERNAME%$PASSWORD') >+ plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD') > else: > plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD') > plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD') >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9518
: 8362 |
8364
|
8380
|
8381
|
8383
|
8384
|
8394
|
8395
|
8401
|
8412