The Samba-Bugzilla – Attachment 16222 Details for
Bug 14490
smbd is logging success as error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-smbd-don-t-log-success-as-error.patch
0001-smbd-don-t-log-success-as-error.patch (text/plain), 1.85 KB, created by
Philipp Gesang
on 2020-09-11 12:26:54 UTC
(
hide
)
Description:
0001-smbd-don-t-log-success-as-error.patch
Filename:
MIME Type:
Creator:
Philipp Gesang
Created:
2020-09-11 12:26:54 UTC
Size:
1.85 KB
patch
obsolete
>From 92b6e04f8539c2438e649c5baf3f70e2833fea09 Mon Sep 17 00:00:00 2001 >From: Philipp Gesang <philipp.gesang@intra2net.com> >Date: Fri, 11 Sep 2020 09:55:18 +0200 >Subject: [PATCH] smbd: don't log success as error > >In 58bc493c77 the check for NT_STATUS_OK was removed, causing >smbd to spam syslog with misleading ``failure`` messages: > > Sep 11 03:57:54 mail smbd[4813]: remove_share_mode_lease: leases_db_del failed: NT_STATUS_OK > Sep 11 03:58:54 mail smbd[4813]: remove_share_mode_lease: leases_db_del failed: NT_STATUS_OK > Sep 11 03:59:54 mail smbd[4813]: remove_share_mode_lease: leases_db_del failed: NT_STATUS_OK > Sep 11 04:00:03 mail smbd[4798]: remove_share_mode_lease: leases_db_del failed: NT_STATUS_OK > Sep 11 04:00:05 mail smbd[4798]: remove_share_mode_lease: leases_db_del failed: NT_STATUS_OK > >Reinstate the check; the code now follows the error handling >logic as in 4.13. > >Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com> >--- > source3/locking/locking.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/source3/locking/locking.c b/source3/locking/locking.c >index 5272a3dc829..4aeee0819a0 100644 >--- a/source3/locking/locking.c >+++ b/source3/locking/locking.c >@@ -704,17 +704,20 @@ static void remove_share_mode_lease(struct share_mode_data *d, > } > > { >- int level = DBGLVL_DEBUG; > NTSTATUS status; > > status = leases_db_del(&e->client_guid, > &e->lease_key, > &d->id); >- if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { >- level = DBGLVL_ERR; >+ if (!NT_STATUS_IS_OK(status)) { >+ int level = DBGLVL_DEBUG; >+ >+ if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { >+ level = DBGLVL_ERR; >+ } >+ DBG_PREFIX(level, ("leases_db_del failed: %s\n", >+ nt_errstr(status))); > } >- DBG_PREFIX(level, ("leases_db_del failed: %s\n", >- nt_errstr(status))); > } > } > >-- >2.26.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
slow
:
review+
metze
:
review+
Actions:
View
Attachments on
bug 14490
: 16222