From: Stefan Metzmacher Date: Thu, 25 Mar 2021 22:03:32 +0000 (-0700) Subject: s3: smbd: Raise debug level when synthetic_pathref() can't find the file. X-Git-Tag: tevent-0.11.0~1383 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=505da46b1fe966667bc237d4f54594d0e15cc853;p=thirdparty%2Fsamba.git s3: smbd: Raise debug level when synthetic_pathref() can't find the file. Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index b13d151a876..213d069a5f4 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -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); } }