mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
s3:winbindd: Also log the process name in winbindd
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
ba9ad12665
commit
305f3bc492
@ -708,6 +708,9 @@ static struct tevent_req *process_request_send(
|
||||
|
||||
/* Remember who asked us. */
|
||||
cli_state->pid = cli_state->request->pid;
|
||||
memcpy(cli_state->client_name,
|
||||
cli_state->request->client_name,
|
||||
sizeof(cli_state->client_name));
|
||||
|
||||
cli_state->cmd_name = "unknown request";
|
||||
cli_state->recv_fn = NULL;
|
||||
@ -734,8 +737,11 @@ static struct tevent_req *process_request_send(
|
||||
cli_state->cmd_name = atable->cmd_name;
|
||||
cli_state->recv_fn = atable->recv_req;
|
||||
|
||||
DEBUG(10, ("process_request: Handling async request %d:%s\n",
|
||||
(int)cli_state->pid, cli_state->cmd_name));
|
||||
DBG_DEBUG("process_request: "
|
||||
"Handling async request %s(%d):%s\n",
|
||||
cli_state->client_name,
|
||||
(int)cli_state->pid,
|
||||
cli_state->cmd_name);
|
||||
|
||||
subreq = atable->send_req(
|
||||
state,
|
||||
@ -797,7 +803,8 @@ static void process_request_done(struct tevent_req *subreq)
|
||||
status = cli_state->recv_fn(subreq, cli_state->response);
|
||||
TALLOC_FREE(subreq);
|
||||
|
||||
DBG_DEBUG("[%d:%s]: %s\n",
|
||||
DBG_DEBUG("[%s(%d):%s]: %s\n",
|
||||
cli_state->client_name,
|
||||
(int)cli_state->pid,
|
||||
cli_state->cmd_name,
|
||||
nt_errstr(status));
|
||||
@ -841,8 +848,10 @@ static void process_request_written(struct tevent_req *subreq)
|
||||
return;
|
||||
}
|
||||
|
||||
DBG_DEBUG("[%d:%s]: delivered response to client\n",
|
||||
(int)cli_state->pid, cli_state->cmd_name);
|
||||
DBG_DEBUG("[%s(%d):%s]: delivered response to client\n",
|
||||
cli_state->client_name,
|
||||
(int)cli_state->pid,
|
||||
cli_state->cmd_name);
|
||||
|
||||
TALLOC_FREE(cli_state->mem_ctx);
|
||||
cli_state->response = NULL;
|
||||
|
@ -47,6 +47,7 @@ struct winbindd_cli_state {
|
||||
struct winbindd_cli_state *prev, *next; /* Linked list pointers */
|
||||
int sock; /* Open socket from client */
|
||||
pid_t pid; /* pid of client */
|
||||
char client_name[32]; /* The process name of the client */
|
||||
time_t last_access; /* Time of last access (read or write) */
|
||||
bool privileged; /* Is the client 'privileged' */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user