summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2019-07-16 15:40:38 +0200
committerKarolin Seeger <kseeger@samba.org>2019-09-03 08:07:38 +0000
commit9ab5a51a6e770c8bd95ceca892808cf2cf670852 (patch)
treebc60bc9448946effdc77e26488bf1af701a00cd7 /selftest
parentd7ed819d9f83a89f436b13437a71c85335cdb5df (diff)
downloadsamba-9ab5a51a6e770c8bd95ceca892808cf2cf670852.tar.gz
CVE-2019-10197: test_smbclient_s3.sh: add regression test for the no permission on share root problem
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14035 Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'selftest')
-rw-r--r--selftest/knownfail.d/CVE-2019-101971
-rwxr-xr-xselftest/target/Samba3.pm12
2 files changed, 13 insertions, 0 deletions
diff --git a/selftest/knownfail.d/CVE-2019-10197 b/selftest/knownfail.d/CVE-2019-10197
new file mode 100644
index 00000000000..f7056bbf3ad
--- /dev/null
+++ b/selftest/knownfail.d/CVE-2019-10197
@@ -0,0 +1 @@
+^samba3.blackbox.smbclient_s3.*.noperm.share.regression
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 0db92552ba5..1dfd543d6b5 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1434,6 +1434,9 @@ sub provision($$$$$$$$$)
my $ro_shrdir="$shrdir/root-tmp";
push(@dirs,$ro_shrdir);
+ my $noperm_shrdir="$shrdir/noperm-tmp";
+ push(@dirs,$noperm_shrdir);
+
my $msdfs_shrdir="$shrdir/msdfsshare";
push(@dirs,$msdfs_shrdir);
@@ -1505,6 +1508,11 @@ sub provision($$$$$$$$$)
##
+ ## Create a directory without permissions to enter
+ ##
+ chmod 0000, $noperm_shrdir;
+
+ ##
## create ro and msdfs share layout
##
@@ -1827,6 +1835,10 @@ sub provision($$$$$$$$$)
[ro-tmp]
path = $ro_shrdir
guest ok = yes
+[noperm]
+ path = $noperm_shrdir
+ wide links = yes
+ guest ok = yes
[write-list-tmp]
path = $shrdir
read only = yes