s3:tests: Add test for 'valid users = DOMAIN\%U'
authorAndreas Schneider <asn@samba.org>
Mon, 17 Aug 2020 11:39:58 +0000 (13:39 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Sep 2020 10:06:18 +0000 (12:06 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14467

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 53b6dd951249052772e1ffcf651b7efd0963b931)

selftest/knownfail.d/samba3.substiutions [new file with mode: 0644]
selftest/target/Samba3.pm
source3/script/tests/test_substitutions.sh

diff --git a/selftest/knownfail.d/samba3.substiutions b/selftest/knownfail.d/samba3.substiutions
new file mode 100644 (file)
index 0000000..f116d3b
--- /dev/null
@@ -0,0 +1 @@
+^samba3.substitutions.Test.login.to.share.with.substitution.for.valid.users
index 6c31694a7483beff4179ff803e15d1a8f11c4efd..0a8cefa811d68a0579282ed38150ee3ea5fde8f6 100755 (executable)
@@ -714,6 +714,10 @@ sub provision_ad_member
        path = $share_dir/D_%D/u_%u/g_%g
        writeable = yes
 
+[sub_valid_users]
+       path = $share_dir
+       valid users = ADDOMAIN/%U
+
 ";
 
        my $ret = $self->provision(
index 1a46f11c85d2d5b25d8974ddffddd56c71195ddb..c813a8f9def927299639fb627ee1c521ca2b2253 100755 (executable)
@@ -34,4 +34,9 @@ SMB_UNC="//$SERVER/sub_dug2"
 test_smbclient "Test login to share with substitution (Dug)" \
        "ls" "$SMB_UNC" "-U$USERNAME%$PASSWORD" || failed=$(expr $failed + 1)
 
+SMB_UNC="//$SERVER/sub_valid_users"
+
+test_smbclient "Test login to share with substitution for valid users" \
+       "ls" "$SMB_UNC" "-U$USERNAME%$PASSWORD" || failed=$(expr $failed + 1)
+
 exit $failed