summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-10-02 21:58:09 +0000
committerJeremy Allison <jra@samba.org>2001-10-02 21:58:09 +0000
commitfacbdd692dc7d4b87fcc59b369ae445153146c13 (patch)
treeb0098afccb40415154002ceba82269618940b6b5 /source3/passdb
parente8547256f3d3c0e51a7715894874de36475ec131 (diff)
downloadsamba-facbdd692dc7d4b87fcc59b369ae445153146c13.tar.gz
samba-facbdd692dc7d4b87fcc59b369ae445153146c13.tar.bz2
samba-facbdd692dc7d4b87fcc59b369ae445153146c13.zip
Fixed up the change password bug when not using PAM.
The problem is we were trying to use mask_match as a generic wildcard matcher for UNIX strings (like the password prompts). We can't do that - we need a unix_wild_match (re-added into lib/util.c) as the ms_fnmatch semantics for empty strings are completely wrong. This caused partial reads to be accepted as correct passwd change responses when they were not.... Also added paranioa test to stop passwd change being done as root with no %u in the passwd program string. Jeremy. (This used to be commit 9333bbeb7627c8b21a3eaeae1683c34e17d14bf0)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pampass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/passdb/pampass.c b/source3/passdb/pampass.c
index 6d0dabcd9d..0c7c4f1291 100644
--- a/source3/passdb/pampass.c
+++ b/source3/passdb/pampass.c
@@ -306,7 +306,7 @@ static int smb_pam_passchange_conv(int num_msg,
DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_ON: trying to match |%s| to |%s|\n",
t->prompt, current_prompt ));
- if (wild_match(t->prompt, current_prompt) == 0) {
+ if (unix_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);
@@ -337,7 +337,7 @@ static int smb_pam_passchange_conv(int num_msg,
DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: trying to match |%s| to |%s|\n",
t->prompt, current_prompt ));
- if (wild_match(t->prompt, current_prompt) == 0) {
+ if (unix_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);