From 2ec93ac6f34fda745912be648148f79d2a2b0671 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 8 Jul 2022 17:08:05 +0200 Subject: [PATCH] smbd: follow-up fix for "if close fails just log it, don't crash" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ralph Boehme Reviewed-by: Björn Baumbach Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Sat Jul 9 09:04:46 UTC 2022 on sn-devel-184 --- source3/smbd/files.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 45cc7ffd79f..b56130f4f04 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -424,7 +424,7 @@ static int smb_fname_fsp_destructor(struct smb_filename *smb_fname) fsp_set_base_fsp(fsp, NULL); status = fd_close(tmp_base_fsp); - if (NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status)) { DBG_ERR("Closing fd for fsp [%s] failed: %s. " "Please check your filesystem!!!\n", fsp_str_dbg(fsp), nt_errstr(status)); @@ -433,7 +433,7 @@ static int smb_fname_fsp_destructor(struct smb_filename *smb_fname) } status = fd_close(fsp); - if (NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status)) { DBG_ERR("Closing fd for fsp [%s] failed: %s. " "Please check your filesystem!!!\n", fsp_str_dbg(fsp), nt_errstr(status)); -- 2.47.3