From 2ec7ccabb3400b70ab3d039931787f8d8589af1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pavel=20Filipensk=C3=BD?= Date: Wed, 4 Aug 2021 18:41:21 +0200 Subject: [PATCH] s3:winbind: Improve logging in winbindd_getgrnam.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Test scenario: bin/wbinfo --group-info 'ADDOMAIN/domain users' Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider --- source3/winbindd/winbindd_getgrnam.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source3/winbindd/winbindd_getgrnam.c b/source3/winbindd/winbindd_getgrnam.c index d66506518e8..bdb8aba0009 100644 --- a/source3/winbindd/winbindd_getgrnam.c +++ b/source3/winbindd/winbindd_getgrnam.c @@ -56,7 +56,8 @@ struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx, /* Ensure null termination */ request->data.groupname[sizeof(request->data.groupname)-1]='\0'; - DBG_NOTICE("[%s (%u)] getgrnam %s\n", + D_NOTICE("[%s (%u)] Winbind external command GETGRNAM start.\n" + "Searching group name '%s'.\n", cli->client_name, (unsigned int)cli->pid, request->data.groupname); @@ -171,15 +172,15 @@ NTSTATUS winbindd_getgrnam_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; } @@ -197,5 +198,9 @@ NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req, response->extra_data.data = buf; response->length += talloc_get_size(response->extra_data.data); + D_NOTICE("Winbind external command GETGRNAM end.\n" + "Returning %u memmber(s).\n", + response->data.gr.num_gr_mem); + return NT_STATUS_OK; } -- 2.47.3