From: Volker Lendecke Date: Wed, 25 Oct 2023 17:22:11 +0000 (+0200) Subject: smbd: Correct PATH_ vs NAME_NOT_FOUND for not following lcomp X-Git-Tag: talloc-2.4.2~831 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8392a832b5921b02bfb7e1b5fd321d36069f044a;p=thirdparty%2Fsamba.git smbd: Correct PATH_ vs NAME_NOT_FOUND for not following lcomp Right now this is handled in openat_pathref_fsp(), but this will change soon. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 5d3e199c362..9f4ae7b5c81 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -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; } /*