From: Stefan Metzmacher Date: Wed, 3 Apr 2024 14:35:35 +0000 (+0200) Subject: s3:notify: don't log user_can_stat_name_under_fsp with level 0 for OBJECT_NAME_NOT_FOUND X-Git-Tag: tdb-1.4.11~1015 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6f92edba690923ec8ef427bc6d5b30d609c129a;p=thirdparty%2Fsamba.git s3:notify: don't log user_can_stat_name_under_fsp with level 0 for OBJECT_NAME_NOT_FOUND Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index 850193eccf3..d08df3c8380 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -651,9 +651,14 @@ static bool user_can_stat_name_under_fsp(files_struct *fsp, const char *name) 0, &fname); if (!NT_STATUS_IS_OK(status)) { - DBG_ERR("synthetic_pathref failed for %s, error %s\n", - filepath, - nt_errstr(status)); + int dbg_lvl = DBGLVL_ERR; + if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { + dbg_lvl = DBGLVL_DEBUG; + } + DBG_PREFIX(dbg_lvl, ( + "synthetic_pathref failed for %s, error %s\n", + filepath, + nt_errstr(status))); TALLOC_FREE(fname); TALLOC_FREE(filepath); return false;