break;
case PAM_NEW_AUTHTOK_REQD:
/* Ignore if user is exempt from password restrictions. */
- if (exempt)
+ if (exempt) {
+ rc = *pam_status;
break;
+ }
/* New password required, try to change it. */
log_warningx(0, N_("Account or password is "
"expired, reset your password and try again"));
break;
case PAM_AUTHTOK_EXPIRED:
/* Ignore if user is exempt from password restrictions. */
- if (exempt)
+ if (exempt) {
+ rc = *pam_status;
break;
+ }
/* Password expired, cannot be updated by user. */
log_warningx(0,
N_("Password expired, contact your system administrator"));
status = AUTH_FATAL;
break;
}
- /* Ignore errors if user is exempt from password restrictions. */
- *pam_status = exempt ? PAM_SUCCESS : rc;
+ *pam_status = rc;
debug_return_int(status);
}