diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-15 22:29:39 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-15 22:29:39 +0000 |
commit | 91a56d138cf5a77c105c8b2f5280fd8fd997ecfb (patch) | |
tree | 44e7af4c272f1b030fe0a4246136889f2b66fe9c /source | |
parent | 5ff50214f7f65c6c5fbaf17ab4749cd21849208c (diff) | |
download | samba-91a56d138cf5a77c105c8b2f5280fd8fd997ecfb.tar.gz samba-91a56d138cf5a77c105c8b2f5280fd8fd997ecfb.tar.xz samba-91a56d138cf5a77c105c8b2f5280fd8fd997ecfb.zip |
Patch from "Christoph Zwerschke" <zwerschke@zuv.uni-heidelberg.de> to
map usernames before calling password change.
Jeremy.
Diffstat (limited to 'source')
-rw-r--r-- | source/rpc_server/srv_samr_nt.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/rpc_server/srv_samr_nt.c b/source/rpc_server/srv_samr_nt.c index cf9918992d1..929a14afeb3 100644 --- a/source/rpc_server/srv_samr_nt.c +++ b/source/rpc_server/srv_samr_nt.c @@ -1247,6 +1247,18 @@ uint32 _samr_chgpasswd_user(pipes_struct *p, SAMR_Q_CHGPASSWD_USER *q_u, SAMR_R_ DEBUG(5,("samr_chgpasswd_user: user: %s wks: %s\n", user_name, wks)); + /* + * Pass the user through the NT -> unix user mapping + * function. + */ + + (void)map_username(user_name); + + /* + * Do any UNIX username case mangling. + */ + (void)Get_Pwnam( user_name, True); + if (!pass_oem_change(user_name, q_u->lm_newpass.pass, q_u->lm_oldhash.hash, q_u->nt_newpass.pass, q_u->nt_oldhash.hash)) r_u->status = NT_STATUS_WRONG_PASSWORD; |