From: Volker Lendecke Date: Thu, 26 Oct 2023 14:16:29 +0000 (+0200) Subject: tests: Get a file through an absolute symlink within a subdirectory X-Git-Tag: talloc-2.4.2~971 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc1657c5857f22d41830898ef2eb384d5fc52a42;p=thirdparty%2Fsamba.git tests: Get a file through an absolute symlink within a subdirectory This shows that read_symlink_reparse() is broken when trying to replace an absolute with a relative filename within a share. read_symlink_reparse() is used only in openat_pathref_fsp_nosymlink() so far to chase symlinks for non-lcomp path components. Chasing lcomp symlinks is done through non_widelink_open(), which gets it right. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15505 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/selftest/knownfail.d/bug-15505 b/selftest/knownfail.d/bug-15505 new file mode 100644 index 00000000000..9f244964047 --- /dev/null +++ b/selftest/knownfail.d/bug-15505 @@ -0,0 +1 @@ +^samba3.blackbox.smbclient_s3.*.follow\ local\ symlinks.* \ No newline at end of file diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index cbff5026ee7..e4b05b12dfa 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -1492,6 +1492,17 @@ EOF return fi + # Create a file to be accessed behind the symlink + touch $local_slink_target_dir/x + ret=$? + if [ $ret -ne 0 ]; then + echo "$out" + echo "failed - unable to create file" + ls -la $local_test_dir + false + return + fi + # Can we cd into the symlink name and ls ? tmpfile=$PREFIX/smbclient_interactive_prompt_commands cat >$tmpfile <$tmpfile <