summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_pam.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-05-02 19:22:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:40 -0500
commitaf3490061b83ce83efb363bddcbcccf9f8a14d89 (patch)
tree343675a72bc4abb404bc5d1d939d3f325c67f4d1 /source3/nsswitch/winbindd_pam.c
parent5b7ab95fc69b5a4ca681209de97a617932321b1f (diff)
downloadsamba-af3490061b83ce83efb363bddcbcccf9f8a14d89.tar.gz
samba-af3490061b83ce83efb363bddcbcccf9f8a14d89.tar.bz2
samba-af3490061b83ce83efb363bddcbcccf9f8a14d89.zip
r15398: Attempt to send the correct warning when a password change was attempted
too early. Guenther (This used to be commit 7f64a66d25f2a4aa48c2639da8e783c1759c5dd4)
Diffstat (limited to 'source3/nsswitch/winbindd_pam.c')
-rw-r--r--source3/nsswitch/winbindd_pam.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c
index 9e4fd39707..ad2127452c 100644
--- a/source3/nsswitch/winbindd_pam.c
+++ b/source3/nsswitch/winbindd_pam.c
@@ -1652,6 +1652,9 @@ void winbindd_pam_chauthtok(struct winbindd_cli_state *state)
oldpass = state->request.data.chauthtok.oldpass;
newpass = state->request.data.chauthtok.newpass;
+ /* Initialize reject reason */
+ state->response.data.auth.reject_reason = Undefined;
+
/* Get sam handle */
result = cm_connect_sam(contact_domain, state->mem_ctx, &cli,
@@ -1690,8 +1693,6 @@ void winbindd_pam_chauthtok(struct winbindd_cli_state *state)
DEBUG(10,("Password change with chgpasswd3 failed with: %s, retrying chgpasswd_user\n",
nt_errstr(result)));
- state->response.data.auth.reject_reason = 0;
-
result = rpccli_samr_chgpasswd_user(cli, state->mem_ctx, user, newpass, oldpass);
}