diff options
author | Jeremy Allison <jra@samba.org> | 2001-07-23 22:06:05 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-07-23 22:06:05 +0000 |
commit | a9ab7eaa5d023f0f6c2421f504f81988fd41467b (patch) | |
tree | cf65325ae442ed81c29af764246bf31692c3bd69 /source3/passdb/pampass.c | |
parent | cab11894ec59359e7eac97adf18b1d699c8311bf (diff) | |
download | samba-a9ab7eaa5d023f0f6c2421f504f81988fd41467b.tar.gz samba-a9ab7eaa5d023f0f6c2421f504f81988fd41467b.tar.xz samba-a9ab7eaa5d023f0f6c2421f504f81988fd41467b.zip |
Fix case insensitive password change code.
Fixed crash bug with un-zeroed talloced memory.
Jeremy.
(This used to be commit eea1c30df246e081e672d7132345d0fd35ad9841)
Diffstat (limited to 'source3/passdb/pampass.c')
-rw-r--r-- | source3/passdb/pampass.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/passdb/pampass.c b/source3/passdb/pampass.c index fc8e4af47d8..418c618af2b 100644 --- a/source3/passdb/pampass.c +++ b/source3/passdb/pampass.c @@ -301,14 +301,13 @@ static int smb_pam_passchange_conv(int num_msg, case PAM_PROMPT_ECHO_ON: DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_ON: PAM said: %s\n", msg[replies]->msg)); fstrcpy(current_prompt, msg[replies]->msg); - strlower(current_prompt); trim_string(current_prompt, " ", " "); for (t=pw_chat; t; t=t->next) { DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_ON: trying to match |%s| to |%s|\n", t->prompt, current_prompt )); - if (ms_fnmatch(t->prompt, current_prompt) == 0) { + if (wild_match(t->prompt, current_prompt) == 0) { fstrcpy(current_reply, t->reply); DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_ON: We sent: %s\n", current_reply)); pwd_sub(current_reply, udp->PAM_username, udp->PAM_password, udp->PAM_newpassword); @@ -334,14 +333,13 @@ static int smb_pam_passchange_conv(int num_msg, case PAM_PROMPT_ECHO_OFF: DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: PAM said: %s\n", msg[replies]->msg)); fstrcpy(current_prompt, msg[replies]->msg); - strlower(current_prompt); trim_string(current_prompt, " ", " "); for (t=pw_chat; t; t=t->next) { DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: trying to match |%s| to |%s|\n", t->prompt, current_prompt )); - if (ms_fnmatch(t->prompt, current_prompt) == 0) { + if (wild_match(t->prompt, current_prompt) == 0) { fstrcpy(current_reply, t->reply); DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: We sent: %s\n", current_reply)); pwd_sub(current_reply, udp->PAM_username, udp->PAM_password, udp->PAM_newpassword); |