From da3faea076ba90e43912ff26f7a85a6b3ff222bb Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 6 Apr 2017 22:12:36 +0200 Subject: [PATCH 1/2] smbd: Fix smb1 findfirst with DFS 9377f3bce should have changed the callers of dfs_path_lookup. It now takes a uint32_t ucf_flags, not a boolean anymore. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12558 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit baa3e71f7968ec3239d80d7602839c2d7c2de74f) --- source3/smbd/msdfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 51e3dff2678..61538cec832 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -888,7 +888,7 @@ static NTSTATUS dfs_redirect(TALLOC_CTX *ctx, } status = dfs_path_lookup(ctx, conn, path_in, pdp, - search_wcard_flag, NULL, NULL); + ucf_flags, NULL, NULL); if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_EQUAL(status, NT_STATUS_PATH_NOT_COVERED)) { DEBUG(3,("dfs_redirect: Redirecting %s\n", path_in)); @@ -1073,7 +1073,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx, * NT_STATUS_PATH_NOT_COVERED. */ status = dfs_path_lookup(ctx, conn, dfs_path, pdp, - False, consumedcntp, &targetpath); + 0, consumedcntp, &targetpath); if (!NT_STATUS_EQUAL(status, NT_STATUS_PATH_NOT_COVERED)) { DEBUG(3,("get_referred_path: No valid referrals for path %s\n", -- 2.12.2.715.g7642488e1d-goog From d8d52b5f98a7a91d809f97c3680fd5a2f6ff3a48 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 7 Apr 2017 16:33:57 +0200 Subject: [PATCH 2/2] selftest: Test for bug 12558 Bug: https://bugzilla.samba.org/show_bug.cgi?id=12558 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison (cherry picked from commit 3667876ebebb7181d89834e6038e2d7218c98797) --- source3/script/tests/test_smbclient_s3.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 9bff883f63f..be7aafbed7c 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -346,6 +346,17 @@ test_msdfs_link() tmpfile=$PREFIX/smbclient.in.$$ prompt=" msdfs-target " + cmd='$SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/msdfs-share -I $SERVER_IP $ADDARGS -m nt1 -c dir 2>&1' + out=`eval $cmd` + ret=$? + + if [ $ret != 0 ] ; then + echo "$out" + echo "failed listing msfds-share\ with error $ret" + false + return + fi + cat > $tmpfile <