+2009-03-03 Tomas Mraz <t8m@centrum.cz>
+
+ * modules/pam_unix/pam_unix_acct.c(_unix_run_verify_binary): Test
+ for abnormal exit of the helper binary.
+ * modules/pam_unix/pam_unix_passwd.c(_unix_run_update_binary): Likewise.
+ * modules/pam_unix/support.c(_unix_run_helper_binary): Likewise.
+ * modules/pam_mkhomedir/pam_mkhomedir.c(create_homedir): Likewise.
+
2009-02-27 Tomas Mraz <t8m@centrum.cz>
* modules/pam_mkhomedir/pam_mkhomedir.c(create_homedir): Replace
if (rc < 0) {
pam_syslog(pamh, LOG_ERR, "waitpid failed: %m");
retval = PAM_SYSTEM_ERR;
- } else {
+ } else if (!WIFEXITED(retval)) {
+ pam_syslog(pamh, LOG_ERR, "mkhomedir_helper abnormal exit: %d", retval);
+ retval = PAM_SYSTEM_ERR;
+ } else {
retval = WEXITSTATUS(retval);
}
} else {
if (rc<0) {
pam_syslog(pamh, LOG_ERR, "unix_chkpwd waitpid returned %d: %m", rc);
retval = PAM_AUTH_ERR;
+ } else if (!WIFEXITED(retval)) {
+ pam_syslog(pamh, LOG_ERR, "unix_chkpwd abnormal exit: %d", retval);
+ retval = PAM_AUTH_ERR;
} else {
retval = WEXITSTATUS(retval);
rc = pam_modutil_read(fds[0], buf, sizeof(buf) - 1);
rc=waitpid(child, &retval, 0); /* wait for helper to complete */
if (rc<0) {
pam_syslog(pamh, LOG_ERR, "unix_update waitpid failed: %m");
- retval = PAM_AUTH_ERR;
- } else {
+ retval = PAM_AUTHTOK_ERR;
+ } else if (!WIFEXITED(retval)) {
+ pam_syslog(pamh, LOG_ERR, "unix_update abnormal exit: %d", retval);
+ retval = PAM_AUTHTOK_ERR;
+ } else {
retval = WEXITSTATUS(retval);
}
} else {
if (rc<0) {
pam_syslog(pamh, LOG_ERR, "unix_chkpwd waitpid returned %d: %m", rc);
retval = PAM_AUTH_ERR;
+ } else if (!WIFEXITED(retval)) {
+ pam_syslog(pamh, LOG_ERR, "unix_chkpwd abnormal exit: %d", retval);
+ retval = PAM_AUTH_ERR;
} else {
retval = WEXITSTATUS(retval);
}