summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-02-08 06:43:55 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-02-08 06:43:55 +0000
commitdfc8883305abf7630e6446a0b865bae99ec2f5a4 (patch)
tree65acc4763dbd88b6429b436b787478ed10242a52 /source
parent690c1fae9ce0ad6a8adef42ed5a7d8cfedab261d (diff)
downloadsamba-dfc8883305abf7630e6446a0b865bae99ec2f5a4.tar.gz
samba-dfc8883305abf7630e6446a0b865bae99ec2f5a4.tar.xz
samba-dfc8883305abf7630e6446a0b865bae99ec2f5a4.zip
Fix up some of the DEBUG lines in winbind_pam.c
Diffstat (limited to 'source')
-rw-r--r--source/nsswitch/winbindd_pam.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c
index 6ebf38f10a6..3325917353c 100644
--- a/source/nsswitch/winbindd_pam.c
+++ b/source/nsswitch/winbindd_pam.c
@@ -114,9 +114,6 @@ done:
if (cli)
cli_shutdown(cli);
- if (mem_ctx)
- talloc_destroy(mem_ctx);
-
state->response.data.auth.nt_status = NT_STATUS_V(result);
fstrcpy(state->response.data.auth.nt_status_string, get_nt_error_msg(result));
fstrcpy(state->response.data.auth.error_string, get_nt_error_msg(result));
@@ -127,6 +124,9 @@ done:
state->response.data.auth.nt_status_string,
state->response.data.auth.pam_error));
+ if (mem_ctx)
+ talloc_destroy(mem_ctx);
+
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}
@@ -147,7 +147,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
extern pstring global_myname;
DEBUG(3, ("[%5d]: pam auth crap domain: %s user: %s\n", state->pid,
- state->request.data.auth_crap.user, state->request.data.auth_crap.user));
+ state->request.data.auth_crap.domain, state->request.data.auth_crap.user));
if (!(mem_ctx = talloc_init_named("winbind pam auth crap for %s", state->request.data.auth.user))) {
DEBUG(0, ("winbindd_pam_auth_crap: could not talloc_init()!\n"));
@@ -206,8 +206,6 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state)
}
done:
- if (mem_ctx)
- talloc_destroy(mem_ctx);
if (cli)
cli_shutdown(cli);
@@ -217,11 +215,15 @@ done:
fstrcpy(state->response.data.auth.error_string, get_nt_error_msg(result));
state->response.data.auth.pam_error = nt_status_to_pam(result);
- DEBUG(2, ("NTLM CRAP authenticaion for user %s returned %s (PAM: %d)\n",
- state->request.data.auth.user,
+ DEBUG(2, ("NTLM CRAP authenticaion for user [%s]\\[%s] returned %s (PAM: %d)\n",
+ state->request.data.auth_crap.domain,
+ state->request.data.auth_crap.user,
state->response.data.auth.nt_status_string,
state->response.data.auth.pam_error));
+ if (mem_ctx)
+ talloc_destroy(mem_ctx);
+
return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
}