diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-07-26 07:40:31 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-07-26 07:40:31 +0000 |
| commit | 3cc381b09ff888e95df17a573aeba48cd2c2b4bc (patch) | |
| tree | 550641cf0d7e16031eba5ae77aea47ac9409a606 /lib/libpam/modules | |
| parent | 5b6dc2efc9b2891767cd28d71ac3ed4878b0ddbb (diff) | |
Notes
Diffstat (limited to 'lib/libpam/modules')
| -rw-r--r-- | lib/libpam/modules/pam_lastlog/pam_lastlog.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libpam/modules/pam_lastlog/pam_lastlog.c b/lib/libpam/modules/pam_lastlog/pam_lastlog.c index 72bb94218104d..814edb8c59af3 100644 --- a/lib/libpam/modules/pam_lastlog/pam_lastlog.c +++ b/lib/libpam/modules/pam_lastlog/pam_lastlog.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include <sys/time.h> #include <paths.h> -#include <pwd.h> #include <stdlib.h> #include <string.h> #include <time.h> @@ -68,7 +67,6 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc __unused, const char *argv[] __unused) { - struct passwd *pwd; struct utmpx *utx, utl; time_t t; const char *user; @@ -79,7 +77,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, pam_err = pam_get_user(pamh, &user, NULL); if (pam_err != PAM_SUCCESS) return (pam_err); - if (user == NULL || (pwd = getpwnam(user)) == NULL) + if (user == NULL) return (PAM_SERVICE_ERR); PAM_LOG("Got user: %s", user); |
