From 0f031024b1d133aea0fa62f9badd16b84fd3182c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pavel=20Filipensk=C3=BD?= Date: Fri, 24 Jun 2022 13:14:27 +0200 Subject: [PATCH] s3:winbind: Improve logging in winbindd_sids_to_xids.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Test scenario: bin/wbinfo --sid-to-uid=S-1-5-21-1961314572-195468382-2567644205-1107 Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider --- source3/winbindd/winbindd_sids_to_xids.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source3/winbindd/winbindd_sids_to_xids.c b/source3/winbindd/winbindd_sids_to_xids.c index 37884f401aa..1fbf02786a4 100644 --- a/source3/winbindd/winbindd_sids_to_xids.c +++ b/source3/winbindd/winbindd_sids_to_xids.c @@ -47,25 +47,27 @@ struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx, } state->ev = ev; - DEBUG(3, ("sids_to_xids\n")); + D_NOTICE("[%s (%u)] Winbind external command SIDS_TO_XIDS start.\n", + cli->client_name, + (unsigned int)cli->pid); if (request->extra_len == 0) { tevent_req_done(req); return tevent_req_post(req, ev); } if (request->extra_data.data[request->extra_len-1] != '\0') { - DEBUG(10, ("Got invalid sids list\n")); + D_DEBUG("Got invalid sids list\n"); tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER); return tevent_req_post(req, ev); } if (!parse_sidlist(state, request->extra_data.data, &state->sids, &state->num_sids)) { - DEBUG(10, ("parse_sidlist failed\n")); + D_DEBUG("parse_sidlist failed\n"); tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER); return tevent_req_post(req, ev); } - DEBUG(10, ("num_sids: %d\n", (int)state->num_sids)); + D_DEBUG("Resolving %u SID(s).\n", (int)state->num_sids); subreq = wb_sids2xids_send(state, ev, state->sids, state->num_sids); if (tevent_req_nomem(subreq, req)) { @@ -106,8 +108,9 @@ NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req, char *result = NULL; uint32_t i; + D_NOTICE("Winbind external command SIDS_TO_XIDS end.\n"); if (tevent_req_is_nterror(req, &status)) { - DEBUG(5, ("Could not convert sids: %s\n", nt_errstr(status))); + D_WARNING("Could not convert sids: %s\n", nt_errstr(status)); return status; } -- 2.47.3