]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove an unnecessary call to SMB_VFS_STAT()
authorVolker Lendecke <vl@samba.org>
Tue, 31 Dec 2024 11:36:12 +0000 (12:36 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 24 Jan 2025 00:06:14 +0000 (00:06 +0000)
filename_convert_dirfsp() already takes care of looking up the last
component if it's there.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 24 00:06:14 UTC 2025 on atb-devel-224

source3/smbd/smb1_reply.c

index fef3e95d2a28e63d98fd0250bf881d692d5c2c18..42d4845e717f9dc63757a20ee68f39e47cecaa86 100644 (file)
@@ -720,11 +720,9 @@ void reply_checkpath(struct smb_request *req)
                goto path_err;
        }
 
-       if (!VALID_STAT(smb_fname->st) &&
-           (SMB_VFS_STAT(conn, smb_fname) != 0)) {
-               DEBUG(3,("reply_checkpath: stat of %s failed (%s)\n",
-                       smb_fname_str_dbg(smb_fname), strerror(errno)));
-               status = map_nt_error_from_unix(errno);
+       if (!VALID_STAT(smb_fname->st)) {
+               DBG_NOTICE("%s not found\n", smb_fname_str_dbg(smb_fname));
+               status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
                goto path_err;
        }