svn commit: r269115 - head/lib/libpam/modules/pam_lastlog
Dag-Erling Smørgrav
des at FreeBSD.org
Sat Jul 26 07:40:32 UTC 2014
Author: des
Date: Sat Jul 26 07:40:31 2014
New Revision: 269115
URL: http://svnweb.freebsd.org/changeset/base/269115
Log:
Remove useless getpwnam() call.
Submitted by: Arthur Mesh <amesh at juniper.net>
MFC after: 1 week
Modified:
head/lib/libpam/modules/pam_lastlog/pam_lastlog.c
Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.c
==============================================================================
--- head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sat Jul 26 04:38:09 2014 (r269114)
+++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sat Jul 26 07:40:31 2014 (r269115)
@@ -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,
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);
More information about the svn-src-all
mailing list