summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2014-08-23 11:34:56 +0000
committerdes <des@FreeBSD.org>2014-08-23 11:34:56 +0000
commitce304e0b36d0a097909e8ed2bbf06ad4db31f9ca (patch)
treef3793e4973a77e4280ca64ea43655f2aeefdf76d /lib
parent37f594fcd2ed5eb0271a93fb4e66119b6ea96c71 (diff)
downloadFreeBSD-src-ce304e0b36d0a097909e8ed2bbf06ad4db31f9ca.zip
FreeBSD-src-ce304e0b36d0a097909e8ed2bbf06ad4db31f9ca.tar.gz
MFH (r269115): remove useless getpwnam() call
Diffstat (limited to 'lib')
-rw-r--r--lib/libpam/modules/pam_lastlog/pam_lastlog.c4
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 72bb942..814edb8 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);
OpenPOWER on IntegriCloud