path: root/modules/pam_timestamp/pam_timestamp.c
diff options
authorJames Ralston <>2019-03-04 19:30:42 -0500
committerTomas Mraz <>2020-03-30 14:44:11 +0200
commitcf4845be8b792a05da5698e07243b89ec0368b61 (patch)
treecb17c82bf79376dba2424fdea589ccba69ceefc2 /modules/pam_timestamp/pam_timestamp.c
parent897c7412b26ca618af6822dcaa7e6be68772dc52 (diff)
pam_unix: Return PAM_AUTHINFO_UNAVAIL when appropriate.
The will never return PAM_AUTHINFO_UNAVAIL on systems that use the unix_chkpwd helper. The reason is that in unix_chkpwd.c, towards the end of main(), if helper_verify_password() does not return PAM_SUCCESS, main() ignores the actual error that helper_verify_password() returned and instead returns PAM_AUTH_ERR. This commit corrects this behavior. Specifically, if helper_verify_password() returns PAM_USER_UNKNOWN, which it does when /etc/passwd entry indicates that shadow information is present but the /etc/shadow entry is missing, the unix_chkpwd now exits with PAM_AUTHINFO_UNAVAIL. For any other error from helper_verify_password(), unix_chkpwd continues to exit with PAM_AUTH_ERR. * modules/pam_unix/unix_chkpwd.c (main): Return PAM_AUTHINFO_UNAVAIL when helper_verify_password() returns PAM_USER_UNKNOWN.
Diffstat (limited to 'modules/pam_timestamp/pam_timestamp.c')
0 files changed, 0 insertions, 0 deletions