summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-01 18:19:15 +0000
committerJeremy Allison <jra@samba.org>2001-05-01 18:19:15 +0000
commite2a997f7a9d987fb96321a581fae9a5f3e8f4110 (patch)
treeab7d223e064cf491b816f201be9dc2703cc6f2d0 /source3/auth
parent5197ccfef498d8d8072fba71d3bd58509fa10ad4 (diff)
downloadsamba-e2a997f7a9d987fb96321a581fae9a5f3e8f4110.tar.gz
samba-e2a997f7a9d987fb96321a581fae9a5f3e8f4110.tar.bz2
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/auth')
-rw-r--r--source3/auth/pampass.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 061e5ee0bf..68024f9481 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/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;