]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Improve logging in winbindd_lookupname.c
authorPavel Filipenský <pfilipen@redhat.com>
Fri, 24 Jun 2022 11:32:52 +0000 (13:32 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 15 Jul 2022 14:25:38 +0000 (14:25 +0000)
Test scenario:
bin/wbinfo --name-to-sid=ADDOMAIN/alice

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_lookupname.c

index d6403b32c46cc8277427d40689a9cddae8d92511..f7af104163eeea996982256ccb50835b3e8b094f 100644 (file)
@@ -46,6 +46,11 @@ struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
        if (req == NULL) {
                return NULL;
        }
+
+       D_NOTICE("[%s (%u)] Winbind external command LOOKUPNAME start.\n",
+                cli->client_name,
+                (unsigned int)cli->pid);
+
        state->ev = ev;
 
        /* Ensure null termination */
@@ -78,8 +83,7 @@ struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
                name = request->data.name.name;
        }
 
-       DEBUG(3, ("lookupname %s%s%s\n", domname, lp_winbind_separator(),
-                 name));
+       D_NOTICE("lookupname %s%s%s\n", domname, lp_winbind_separator(), name);
 
        subreq = wb_lookupname_send(state, ev, namespace, domname, name, 0);
        if (tevent_req_nomem(subreq, req)) {
@@ -112,11 +116,12 @@ NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
                req, struct winbindd_lookupname_state);
        NTSTATUS status;
 
+       D_NOTICE("Winbind external command LOOKUPNAME end.\n");
        if (tevent_req_is_nterror(req, &status)) {
                struct dom_sid_buf buf;
-               DEBUG(5, ("Could not convert sid %s: %s\n",
+               D_WARNING("Could not convert SID %s, error is %s\n",
                          dom_sid_str_buf(&state->sid, &buf),
-                         nt_errstr(status)));
+                         nt_errstr(status));
                return status;
        }
        sid_to_fstring(response->data.sid.sid, &state->sid);