s3:winbind: Log client process name
authorAndreas Schneider <asn@samba.org>
Fri, 2 Nov 2018 17:56:29 +0000 (18:56 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 12 Nov 2018 08:50:25 +0000 (09:50 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
12 files changed:
source3/winbindd/winbindd_getdcname.c
source3/winbindd/winbindd_getgrent.c
source3/winbindd/winbindd_getgrgid.c
source3/winbindd/winbindd_getgrnam.c
source3/winbindd/winbindd_getgroups.c
source3/winbindd/winbindd_getpwent.c
source3/winbindd/winbindd_getpwnam.c
source3/winbindd/winbindd_getpwsid.c
source3/winbindd/winbindd_getpwuid.c
source3/winbindd/winbindd_getsidaliases.c
source3/winbindd/winbindd_getuserdomgroups.c
source3/winbindd/winbindd_getusersids.c

index c8213ae4880dd26ca82b432d7ac9cde2ec96f7ef..f6b62757527aa4fad8a48313b2107949b82817d3 100644 (file)
@@ -43,8 +43,10 @@ struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
 
        request->domain_name[sizeof(request->domain_name)-1] = '\0';
 
-       DEBUG(3, ("[%5lu]: getdcname for %s\n", (unsigned long)cli->pid,
-                 request->domain_name));
+       DBG_NOTICE("[%s (%u)] getdcname for %s\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  request->domain_name);
 
        subreq = wb_dsgetdcname_send(state, ev, request->domain_name, NULL,
                                     NULL, 0);
index 15a35f7044e7224c92dbf6b4068dc607bb033a61..b78d1f5b465826c9e6a853a7468c1ec4d1aeb7ca 100644 (file)
@@ -48,7 +48,9 @@ struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
        state->num_groups = 0;
        state->cli = cli;
 
-       DEBUG(3, ("[%5lu]: getgrent\n", (unsigned long)cli->pid));
+       DBG_NOTICE("[%s (%u)] getgrent\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid);
 
        if (cli->grent_state == NULL) {
                tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
index 640ebfa496933e97864e901167a4e1a4399fc243..49a24dee7a47b4468169deaf8f04b1848ccc2662 100644 (file)
@@ -49,7 +49,10 @@ struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
        }
        state->ev = ev;
 
-       DEBUG(3, ("getgrgid %d\n", (int)request->data.gid));
+       DBG_NOTICE("[%s (%u)] getgrgid %d\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  (int)request->data.gid);
 
        state->xid = (struct unixid) {
                .id = request->data.uid, .type = ID_TYPE_GID };
index 37c205ddba4dd6b8b078e845b0a205aa275cc540..db53848055aeaba69a0e39d878591fdb2554af1d 100644 (file)
@@ -54,7 +54,10 @@ struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
        /* Ensure null termination */
        request->data.groupname[sizeof(request->data.groupname)-1]='\0';
 
-       DEBUG(3, ("getgrnam %s\n", request->data.groupname));
+       DBG_NOTICE("[%s (%u)] getgrnam %s\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  request->data.groupname);
 
        nt_status = normalize_name_unmap(state, request->data.groupname, &tmp);
        /* If we didn't map anything in the above call, just reset the
index f7f2df5f7b1208e9287cb53618f456ff08fa05b9..16c06395d7067477c09a74d8a3ce23b5438bc1f1 100644 (file)
@@ -59,7 +59,10 @@ struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
        /* Ensure null termination */
        request->data.username[sizeof(request->data.username)-1]='\0';
 
-       DEBUG(3, ("getgroups %s\n", request->data.username));
+       DBG_NOTICE("[%s (%u)] getgroups %s\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  request->data.username);
 
        domuser = request->data.username;
 
index 9e5190a3c60d7e45b6a49318ec37fa727abcc8c7..030a013c1609f06ba34eb54f85c113a6c0eec3d1 100644 (file)
@@ -47,7 +47,9 @@ struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
        state->num_users = 0;
        state->cli = cli;
 
-       DEBUG(3, ("[%5lu]: getpwent\n", (unsigned long)cli->pid));
+       DBG_NOTICE("[%s (%u)] getpwent\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid);
 
        if (cli->pwent_state == NULL) {
                tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
index 8da66c251417bbbc6d6d7ec4f1c2d080111b0424..63274cab5a054fa037a64ecff9bf7a3f00a3f4d6 100644 (file)
@@ -55,7 +55,10 @@ struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
        /* Ensure null termination */
        request->data.username[sizeof(request->data.username)-1]='\0';
 
-       DEBUG(3, ("getpwnam %s\n", request->data.username));
+       DBG_NOTICE("[%s (%u)] getpwnam %s\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  request->data.username);
 
        domuser = request->data.username;
 
index 52481700756e8ef0931542c95924e0c88ffd4dbf..f12d52960044687a99ca6614d3b116954670b2ff 100644 (file)
@@ -45,7 +45,10 @@ struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
        /* Ensure null termination */
        request->data.sid[sizeof(request->data.sid)-1]='\0';
 
-       DEBUG(3, ("getpwsid %s\n", request->data.sid));
+       DBG_NOTICE("[%s (%u)] getpwsid %s\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  request->data.sid);
 
        if (!string_to_sid(&state->sid, request->data.sid)) {
                DEBUG(1, ("Could not get convert sid %s from string\n",
index d7a1f4de5e5c5182538b310d66f1803d90d7479d..319f2f71ad96d18ba317695e9654ca3d65a85c72 100644 (file)
@@ -46,7 +46,10 @@ struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
        }
        state->ev = ev;
 
-       DEBUG(3, ("getpwuid %d\n", (int)request->data.uid));
+       DBG_NOTICE("[%s (%u)] getpwuid %d\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  (int)request->data.uid);
 
        state->xid = (struct unixid) {
                .id = request->data.uid, .type = ID_TYPE_UID };
index e40a51dbd6d1ecca665edb85db6a010b378657eb..291e32f79960729c25b176b3d638e2da0ea1eab0 100644 (file)
@@ -49,7 +49,10 @@ struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
        /* Ensure null termination */
        request->data.sid[sizeof(request->data.sid)-1]='\0';
 
-       DEBUG(3, ("getsidaliases %s\n", request->data.sid));
+       DBG_NOTICE("[%s (%u)] getsidaliases %s\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  request->data.sid);
 
        if (!string_to_sid(&state->sid, request->data.sid)) {
                DEBUG(1, ("Could not get convert sid %s from string\n",
index 24ec1ddc019c6aac5c1904ad301c161e3c77e1a3..df90a87c7a2196f6789f29676d23a5791ff6ab96 100644 (file)
@@ -46,7 +46,10 @@ struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
        /* Ensure null termination */
        request->data.sid[sizeof(request->data.sid)-1]='\0';
 
-       DEBUG(3, ("getuserdomgroups %s\n", request->data.sid));
+       DBG_NOTICE("[%s (%u)] getuserdomgroups %s\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  request->data.sid);
 
        if (!string_to_sid(&state->sid, request->data.sid)) {
                DEBUG(1, ("Could not get convert sid %s from string\n",
index d6995c4390a4e2bfb9f78e90fb4a09435ae6c86a..024bad2b9e5d27e86c3df7e706134ee628488c7b 100644 (file)
@@ -46,7 +46,10 @@ struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
        /* Ensure null termination */
        request->data.sid[sizeof(request->data.sid)-1]='\0';
 
-       DEBUG(3, ("getusersids %s\n", request->data.sid));
+       DBG_NOTICE("[%s (%u)] getusersids %s\n",
+                  cli->client_name,
+                  (unsigned int)cli->pid,
+                  request->data.sid);
 
        if (!string_to_sid(&state->sid, request->data.sid)) {
                DEBUG(1, ("Could not get convert sid %s from string\n",