]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Raise debug level when synthetic_pathref() can't find the file.
authorStefan Metzmacher <metze@samba.org>
Thu, 25 Mar 2021 22:03:32 +0000 (15:03 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 26 Mar 2021 03:04:39 +0000 (03:04 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/files.c

index b13d151a876c95448573b72f249c9f604420f960..213d069a5f4ae3637db3a3cbdc47246a6e055f77 100644 (file)
@@ -647,11 +647,13 @@ NTSTATUS synthetic_pathref(TALLOC_CTX *mem_ctx,
        if (!VALID_STAT(smb_fname->st)) {
                ret = vfs_stat(dirfsp->conn, smb_fname);
                if (ret != 0) {
-                       DBG_ERR("stat [%s] failed: %s\n",
+                       int err = errno;
+                       int lvl = err == ENOENT ? DBGLVL_INFO : DBGLVL_ERR;
+                       DBG_PREFIX(lvl, ("stat [%s] failed: %s\n",
                                smb_fname_str_dbg(smb_fname),
-                               strerror(errno));
+                               strerror(err)));
                        TALLOC_FREE(smb_fname);
-                       return map_nt_error_from_unix(errno);
+                       return map_nt_error_from_unix(err);
                }
        }