]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Improve logging in winbindd_pam_auth.c
authorPavel Filipenský <pfilipen@redhat.com>
Fri, 24 Jun 2022 12:29:35 +0000 (14:29 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 15 Jul 2022 14:25:38 +0000 (14:25 +0000)
Test scenario:
$ bin/wbinfo --pam-logon=ADDOMAIN/alice%Secret007

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

index 1d0933d2f4146dfa948a74027893016060776346..a59f33ef631aa02a6bcae1c08da8b36aae5c0ad7 100644 (file)
@@ -95,10 +95,11 @@ struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
-       DBG_NOTICE("[%s (%u)]: pam auth %s\n",
-                  cli->client_name,
-                  (unsigned int)cli->pid,
-                  request->data.auth.user);
+       D_NOTICE("[%s (%u)] Winbind external command PAM_AUTH start.\n"
+                "Authenticating user '%s'.\n",
+                cli->client_name,
+                (unsigned int)cli->pid,
+                request->data.auth.user);
 
        if (!check_request_flags(request->flags)) {
                tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX);
@@ -218,6 +219,7 @@ NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
                req, struct winbindd_pam_auth_state);
        NTSTATUS status;
 
+       D_NOTICE("Winbind external command PAM_AUTH end.\n");
        if (tevent_req_is_nterror(req, &status)) {
                set_auth_errors(response, status);
                return status;
@@ -257,8 +259,8 @@ NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
                        state->r->in.info->username,
                        state->r->in.info->uid,
                        state->r->in.info->password);
-               DEBUG(10, ("winbindd_add_memory_creds returned: %s\n",
-                          nt_errstr(status)));
+               D_DEBUG("winbindd_add_memory_creds returned: %s\n",
+                          nt_errstr(status));
        }
 
        if (state->r->in.flags & WBFLAG_PAM_GET_PWD_POLICY) {