From a3dc52d416f94e7f1b69a1916c47aebd6fa8f257 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 12 Feb 2020 16:30:01 +0100 Subject: [PATCH 1/2] s3:tests: Add smbclient test for 'force create mode = 0664' Signed-off-by: Andreas Schneider --- selftest/target/Samba3.pm | 7 ++++ selftest/target/Samba4.pm | 7 ++++ source3/script/tests/test_smbclient_s3.sh | 50 +++++++++++++++++++++-- source3/selftest/tests.py | 20 ++++----- 4 files changed, 71 insertions(+), 13 deletions(-) diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 0c9adcc76fd..f887ad2d7e1 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1980,6 +1980,13 @@ sub provision($$) nfs4acl_xattr:version = 41 nfs4acl_xattr:xattr_name = security.nfs4acl_xdr +[create_mode_664] + path = $shrdir + comment = smb username is [%U] + create mask = 0644 + force create mode = 0664 + vfs objects = dirsort + [xcopy_share] path = $shrdir comment = smb username is [%U] diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 3f25317ea8c..9988813d6f3 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -1113,6 +1113,13 @@ sub provision($$$$$$$$$$) posix:oplocktimeout = 3 posix:writetimeupdatedelay = 500000 +[create_mode_664] + path = $ctx->{share} + comment = smb username is [%U] + create mask = 0644 + force create mode = 0664 + vfs objects = dirsort + [xcopy_share] path = $ctx->{share} read only = no diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 5df8a7cb550..e4dc03879ed 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -2,7 +2,7 @@ # this runs the file serving tests that are expected to pass with samba3 -if [ $# -lt 13 ]; then +if [ $# -lt 14 ]; then cat < $tmpfile <