From owner-svn-src-stable-10@FreeBSD.ORG Sat Aug 23 11:34:56 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4C11280; Sat, 23 Aug 2014 11:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C07923AF2; Sat, 23 Aug 2014 11:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NBYuNc059940; Sat, 23 Aug 2014 11:34:56 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NBYufC059939; Sat, 23 Aug 2014 11:34:56 GMT (envelope-from des@FreeBSD.org) Message-Id: <201408231134.s7NBYufC059939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Sat, 23 Aug 2014 11:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270398 - stable/10/lib/libpam/modules/pam_lastlog X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 11:34:57 -0000 Author: des Date: Sat Aug 23 11:34:56 2014 New Revision: 270398 URL: http://svnweb.freebsd.org/changeset/base/270398 Log: MFH (r269115): remove useless getpwnam() call Modified: stable/10/lib/libpam/modules/pam_lastlog/pam_lastlog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_lastlog/pam_lastlog.c ============================================================================== --- stable/10/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sat Aug 23 11:34:55 2014 (r270397) +++ stable/10/lib/libpam/modules/pam_lastlog/pam_lastlog.c Sat Aug 23 11:34:56 2014 (r270398) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -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);