diff options
author | Tomas Mraz <tmraz@fedoraproject.org> | 2012-04-30 14:46:48 +0200 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2012-04-30 14:46:48 +0200 |
commit | cf9c75be753a3c12fdecb9f4696b8ad1b28dd799 (patch) | |
tree | 778114c398d5a3812d16eecf7fce27af491985d4 /modules/pam_lastlog/pam_lastlog.c | |
parent | 791dec4305054de2a5f994a9a4e475079b7b7a9c (diff) | |
download | pam-cf9c75be753a3c12fdecb9f4696b8ad1b28dd799.tar.gz pam-cf9c75be753a3c12fdecb9f4696b8ad1b28dd799.tar.bz2 pam-cf9c75be753a3c12fdecb9f4696b8ad1b28dd799.zip |
pam_lastlog: Never lock out the root account.
modules/pam_lastlog/pam_lastlog.c (pam_sm_authenticate): Return PAM_SUCCESS if
uid==0.
modules/pam_lastlog/pam_lastlog.8.xml: Improve documentation.
Diffstat (limited to 'modules/pam_lastlog/pam_lastlog.c')
-rw-r--r-- | modules/pam_lastlog/pam_lastlog.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/pam_lastlog/pam_lastlog.c b/modules/pam_lastlog/pam_lastlog.c index 4111b182..50e5a59c 100644 --- a/modules/pam_lastlog/pam_lastlog.c +++ b/modules/pam_lastlog/pam_lastlog.c @@ -598,6 +598,8 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, uid = pwd->pw_uid; pwd = NULL; /* tidy up */ + if (uid == 0) + return PAM_SUCCESS; /* obtain the last login date and all the relevant info */ last_fd = last_login_open(pamh, ctrl, uid); |