From: Jeremy Allison Date: Wed, 11 Apr 2018 17:33:22 +0000 (-0700) Subject: s3: tests: Regression test to ensure we can never return a DIRECTORY attribute on... X-Git-Tag: ldb-1.4.0~643 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=82beaf868f252c4bc975ddafd80240af6f679b83;p=samba.git s3: tests: Regression test to ensure we can never return a DIRECTORY attribute on a stream. Tests streams_xattr and also streams_depot. Inspired from a real-world test case by Andrew Walker . BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Apr 12 02:04:28 CEST 2018 on sn-devel-144 --- diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 8914507c12e..b93cbc27507 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -2143,6 +2143,10 @@ sub provision($$$$$$$$$) kernel oplocks = yes vfs objects = streams_xattr xattr_tdb +[streams_xattr] + copy = tmp + vfs objects = streams_xattr xattr_tdb + [compound_find] copy = tmp smbd:find async delay usec = 10000 diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index cc0d69dfb6e..96bd5eb3f31 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -1606,6 +1606,78 @@ EOF return 0 } +# Test xattr_stream correctly reports mode. +# BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380 + +test_stream_directory_xattr() +{ + tmpfile=$PREFIX/smbclient_interactive_prompt_commands +# +# Test against streams_xattr +# + cat > $tmpfile < $tmpfile <