From: Pavel Filipenský Date: Wed, 4 Aug 2021 16:36:51 +0000 (+0200) Subject: s3:winbind: Improve logging in winbindd_getgrgid.c X-Git-Tag: tevent-0.13.0~147 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c41992d9dc681b4d29ef8ed2cc72e1a1f6762a9;p=thirdparty%2Fsamba.git s3:winbind: Improve logging in winbindd_getgrgid.c Test scenario: id ADDOMAIN/alice Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider --- diff --git a/source3/winbindd/winbindd_getgrgid.c b/source3/winbindd/winbindd_getgrgid.c index 24d70161770..a4a6a0d6eb7 100644 --- a/source3/winbindd/winbindd_getgrgid.c +++ b/source3/winbindd/winbindd_getgrgid.c @@ -49,10 +49,11 @@ struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx, } state->ev = ev; - DBG_NOTICE("[%s (%u)] getgrgid %d\n", - cli->client_name, - (unsigned int)cli->pid, - (int)request->data.gid); + D_NOTICE("[%s (%u)] Winbind external command GETGRGID start.\n" + "gid=%u\n", + cli->client_name, + (unsigned int)cli->pid, + (int)request->data.gid); state->xid = (struct unixid) { .id = request->data.uid, .type = ID_TYPE_GID }; @@ -120,21 +121,22 @@ NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req, if (tevent_req_is_nterror(req, &status)) { struct dom_sid_buf sidbuf; - DEBUG(5, ("Could not convert sid %s: %s\n", + D_WARNING("Could not convert sid %s: %s\n", dom_sid_str_buf(state->sid, &sidbuf), - nt_errstr(status))); + nt_errstr(status)); return status; } if (!fill_grent(talloc_tos(), &response->data.gr, state->domname, state->name, state->gid)) { - DEBUG(5, ("fill_grent failed\n")); + D_WARNING("fill_grent failed\n"); return NT_STATUS_NO_MEMORY; } status = winbindd_print_groupmembers(state->members, response, &num_members, &buf); if (!NT_STATUS_IS_OK(status)) { + D_WARNING("Failed with %s.\n", nt_errstr(status)); return status; } @@ -146,5 +148,9 @@ NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req, response->extra_data.data = buf; response->length += talloc_get_size(response->extra_data.data); + D_NOTICE("Winbind external command GETGRGID end.\n" + "Returning %u group member(s).\n", + response->data.gr.num_gr_mem); + return NT_STATUS_OK; }