Changing smbd_server_connection_terminate[_ex] to allow logging errors at level 0 for some errors
Richard Sharpe
rsharpe at samba.org
Fri May 17 01:08:30 MDT 2013
Hi Folks,
I would like to suggest the following change:
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index b031c6d..5e7de84 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -994,10 +994,11 @@ static NTSTATUS
smbd_smb2_request_setup_out(struct smbd_smb2_request *req)
}
void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn,
+ int dbg_lv,
const char *reason,
const char *location)
{
- DEBUG(10,("smbd_server_connection_terminate_ex: reason[%s] at %s\n",
+ DEBUG(dbg_lv,("smbd_server_connection_terminate_ex: reason[%s] at %s\n",
reason, location));
exit_server_cleanly(reason);
}
This allows us to decide on a case-by-case basis what DEBUG level we
want the message to be at.
There are about 74 uses of smbd_server_connection_terminate in the
code that I can see, but I can make the changes. I would default to
level 10 for most of them and only change the more critical ones to
level 0 (only one or two.)
Also, I notice that sconn is not used. I am tempted too remove it
since I have to touch all the calls.
More information about the samba-technical
mailing list