diff options
author | Jeremy Allison <jra@samba.org> | 2001-05-01 18:19:15 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-05-01 18:19:15 +0000 |
commit | e2a997f7a9d987fb96321a581fae9a5f3e8f4110 (patch) | |
tree | ab7d223e064cf491b816f201be9dc2703cc6f2d0 /source3/passdb/pampass.c | |
parent | 5197ccfef498d8d8072fba71d3bd58509fa10ad4 (diff) | |
download | samba-e2a997f7a9d987fb96321a581fae9a5f3e8f4110.tar.gz samba-e2a997f7a9d987fb96321a581fae9a5f3e8f4110.tar.xz samba-e2a997f7a9d987fb96321a581fae9a5f3e8f4110.zip |
Stop coredump on pam password change with pam_pwdb.so module on error.
Jeremy.
(This used to be commit d9b960b4a5997e4cd09e3da9ea4754cbae1e29b3)
Diffstat (limited to 'source3/passdb/pampass.c')
-rw-r--r-- | source3/passdb/pampass.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/passdb/pampass.c b/source3/passdb/pampass.c index 061e5ee0bf..68024f9481 100644 --- a/source3/passdb/pampass.c +++ b/source3/passdb/pampass.c @@ -188,6 +188,7 @@ static int smb_pam_passchange_conv(int num_msg, for (replies = 0; replies < num_msg; replies++) { switch (msg[replies]->msg_style) { case PAM_PROMPT_ECHO_ON: + DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_ON: Replied: %s\n", msg[replies]->msg)); reply[replies].resp_retcode = PAM_SUCCESS; reply[replies].resp = COPY_STRING(udp->PAM_username); /* PAM frees resp */ @@ -195,7 +196,7 @@ static int smb_pam_passchange_conv(int num_msg, case PAM_PROMPT_ECHO_OFF: reply[replies].resp_retcode = PAM_SUCCESS; - DEBUG(10,("smb_pam_passchange_conv: PAM Replied: %s\n", msg[replies]->msg)); + DEBUG(10,("smb_pam_passchange_conv: PAM_PROMPT_ECHO_OFF: Replied: %s\n", msg[replies]->msg)); if (strncmp(currentpw_prompt, msg[replies]->msg, strlen(currentpw_prompt)) == 0) { reply[replies].resp = COPY_STRING(udp->PAM_password); } else if (strncmp(newpw_prompt, msg[replies]->msg, strlen(newpw_prompt)) == 0) { @@ -206,6 +207,9 @@ static int smb_pam_passchange_conv(int num_msg, DEBUG(3,("smb_pam_passchange_conv: Could not find reply for PAM prompt: %s\n",msg[replies]->msg)); DEBUG(5,("smb_pam_passchange_conv: Prompts available:\n CurrentPW: \"%s\"\n NewPW: \"%s\"\n \ RepeatPW: \"%s\"\n",currentpw_prompt,newpw_prompt,repeatpw_prompt)); + free(reply); + reply = NULL; + return PAM_CONV_ERR; } /* PAM frees resp */ break; |