diff options
author | Volker Lendecke <vl@samba.org> | 2020-10-27 10:12:51 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-11-04 18:55:40 +0000 |
commit | 95e235172aa7773d7c9f1135c4181ad2c2519579 (patch) | |
tree | 5d0e68237c8c6d5f619f9d379e9e1c230fc647d4 /source3/script | |
parent | 7ea5c1f05d834ace9a12e193f237aa89ff2be486 (diff) | |
download | samba-95e235172aa7773d7c9f1135c4181ad2c2519579.tar.gz |
torture: Show that recursive ls across dfs is broken
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/script')
-rwxr-xr-x | source3/script/tests/test_smbclient_s3.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 7d31af9e1ab..7f801decb39 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -404,6 +404,40 @@ EOF return 0 } +# Test recursive listing across msdfs links +test_msdfs_recursive_dir() +{ + tmpfile=$PREFIX/smbclient.in.$$ + error="NT_STATUS_OBJECT_PATH_NOT_FOUND" + + cat > $tmpfile <<EOF +recurse +dir +quit +EOF + + cmd='$SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/msdfs-share -I $SERVER_IP $ADDARGS -m $PROTOCOL < $tmpfile 2>&1' + out=$(eval $cmd) + ret="$?" + + if [ "$ret" -ne 0 ] ; then + echo "$out" + echo "failed listing msfds-share\ with error $ret" + return 1 + fi + + echo "$out" | grep "$error" > /dev/null 2>&1 + + ret="$?" + if [ "$ret" -eq 0 ] ; then + echo "$out" + echo "Listing \\msdfs-share recursively found $error" + return 1 + fi + + return 0 +} + # Archive bits are correctly set on file/dir creation and rename. test_rename_archive_bit() { @@ -1987,6 +2021,10 @@ testit "Accessing an MS-DFS link" \ test_msdfs_link || \ failed=`expr $failed + 1` +testit "Recursive ls across MS-DFS links" \ + test_msdfs_recursive_dir || \ + failed=`expr $failed + 1` + testit "Ensure archive bit is set correctly on file/dir rename" \ test_rename_archive_bit || \ failed=`expr $failed + 1` |