diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-01-26 08:51:58 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-01-26 08:51:58 +0000 |
commit | f85a7bb04286fcab5e844b5457a4fc93da8d96f5 (patch) | |
tree | 4bfa03c14925d0bd822e664a1e63ff0ba6d2d4a0 /source3/nsswitch | |
parent | 3e0ecb4561d2af5c61b053d4c0e386172f6a9751 (diff) | |
download | samba-f85a7bb04286fcab5e844b5457a4fc93da8d96f5.tar.gz samba-f85a7bb04286fcab5e844b5457a4fc93da8d96f5.tar.bz2 samba-f85a7bb04286fcab5e844b5457a4fc93da8d96f5.zip |
(merge from 3.0)
This adds client-side support for the unicode/SAMR password change scheme.
As well as avoiding DOS charset issues, this scheme returns useful error
codes, that we can map back via the pam interface.
This patch also cleans up the interfaces used for password buffers, to
avoid duplication of code.
Andrew Bartlett
(This used to be commit 8063b8b6c2eb30cb116988e265fb289109d7c348)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_pam.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index 31698b4798..adbcd85435 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -508,18 +508,12 @@ enum winbindd_result winbindd_pam_chauthtok(struct winbindd_cli_state *state) /* Get sam handle */ - if ( NT_STATUS_IS_ERR(result = cm_get_sam_handle(contact_domain, &hnd)) ) { + if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(contact_domain, &hnd)) ) { DEBUG(1, ("could not get SAM handle on DC for %s\n", domain)); goto done; } - if (!cli_oem_change_password(hnd->cli, user, newpass, oldpass)) { - DEBUG(1, ("password change failed for user %s/%s\n", domain, - user)); - result = NT_STATUS_WRONG_PASSWORD; - } else { - result = NT_STATUS_OK; - } + result = cli_samr_chgpasswd_user(hnd->cli, mem_ctx, user, newpass, oldpass); done: state->response.data.auth.nt_status = NT_STATUS_V(result); |