]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Correct PATH_ vs NAME_NOT_FOUND for not following lcomp
authorVolker Lendecke <vl@samba.org>
Wed, 25 Oct 2023 17:22:11 +0000 (19:22 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 7 Nov 2023 12:46:37 +0000 (12:46 +0000)
Right now this is handled in openat_pathref_fsp(), but this will
change soon.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/filename.c

index 5d3e199c362bebd0eb2f6e3b1be3deb9a1e6e750..9f4ae7b5c815f8b23997004391374ac75e29353c 100644 (file)
@@ -1369,7 +1369,11 @@ next:
        }
 
        if (!lp_follow_symlinks(SNUM(conn))) {
-               return NT_STATUS_OBJECT_PATH_NOT_FOUND;
+               status = (symlink_err->unparsed == 0)
+                                ? NT_STATUS_OBJECT_NAME_NOT_FOUND
+                                : NT_STATUS_OBJECT_PATH_NOT_FOUND;
+               TALLOC_FREE(symlink_err);
+               return status;
        }
 
        /*