1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-17 04:23:50 +03:00

Patch from "Christoph Zwerschke" <zwerschke@zuv.uni-heidelberg.de> to

map usernames before calling password change.
Jeremy.
This commit is contained in:
Jeremy Allison
-
parent 4bb63ba615
commit ce2a236dc6

View File

@@ -1242,6 +1242,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)); 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, 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)) q_u->nt_newpass.pass, q_u->nt_oldhash.hash))
r_u->status = NT_STATUS_WRONG_PASSWORD; r_u->status = NT_STATUS_WRONG_PASSWORD;