From owner-freebsd-arch@FreeBSD.ORG Thu Jul 24 15:27:38 2014 Return-Path: Delivered-To: arch@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 DAAFFF48 for ; Thu, 24 Jul 2014 15:27:38 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0187.outbound.protection.outlook.com [207.46.163.187]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 832432B80 for ; Thu, 24 Jul 2014 15:27:37 +0000 (UTC) Received: from BL2PR05CA0030.namprd05.prod.outlook.com (10.255.226.30) by DM2PR05MB736.namprd05.prod.outlook.com (10.141.178.25) with Microsoft SMTP Server (TLS) id 15.0.990.7; Thu, 24 Jul 2014 15:27:35 +0000 Received: from BN1AFFO11FD030.protection.gbl (2a01:111:f400:7c10::195) by BL2PR05CA0030.outlook.office365.com (2a01:111:e400:c04::30) with Microsoft SMTP Server (TLS) id 15.0.995.14 via Frontend Transport; Thu, 24 Jul 2014 15:27:34 +0000 Received: from P-EMF02-SAC.jnpr.net (66.129.239.16) by BN1AFFO11FD030.mail.protection.outlook.com (10.58.52.168) with Microsoft SMTP Server (TLS) id 15.0.980.11 via Frontend Transport; Thu, 24 Jul 2014 15:27:34 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF02-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Thu, 24 Jul 2014 08:27:26 -0700 Received: from juniper.net (eta.jnpr.net [172.21.19.189]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id s6OFRKn00205; Thu, 24 Jul 2014 08:27:20 -0700 (PDT) (envelope-from amesh@juniper.net) Date: Thu, 24 Jul 2014 08:27:20 -0700 From: Arthur Mesh To: Dag-Erling Smorgrav Subject: Re: pam_lastlog Message-ID: <20140724152720.GU57013@juniper.net> References: <20140723174211.GQ57013@juniper.net> <86iomnt2i6.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SvF6CGw9fzJC4Rcx" Content-Disposition: inline In-Reply-To: <86iomnt2i6.fsf@nine.des.no> User-Agent: Mutt/1.5.23 (2014-03-12) X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.129.239.16; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(199002)(24454002)(51704005)(36756003)(81542001)(105596002)(19580405001)(81156004)(71186001)(77982001)(84676001)(81342001)(74502001)(16796002)(102836001)(50986999)(31966008)(85306003)(74662001)(20776003)(80022001)(64706001)(86362001)(83322001)(19580395003)(68736004)(76482001)(83506001)(99396002)(84326002)(44976005)(46102001)(4396001)(79102001)(69596002)(6806004)(76176999)(21056001)(54356999)(83072002)(92726001)(92566001)(85852003)(512954002)(110136001)(95666004)(33656002)(87936001)(97736001)(551544002)(107046002)(106466001); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR05MB736; H:P-EMF02-SAC.jnpr.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 028256169F Received-SPF: SoftFail (: domain of transitioning juniper.net discourages use of 66.129.239.16 as permitted sender) Authentication-Results: spf=softfail (sender IP is 66.129.239.16) smtp.mailfrom=amesh@juniper.net; X-OriginatorOrg: juniper.net Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 15:27:39 -0000 --SvF6CGw9fzJC4Rcx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 24, 2014 at 01:33:37PM +0200, Dag-Erling Smorgrav wrote: > Arthur Mesh writes: > > Here is a proposed change where that adds a knob to disable this lookup: >=20 > Why not just remove it altogether? Here is a diff to remove it altogether: Index: lib/libpam/modules/pam_lastlog/pam_lastlog.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/libpam/modules/pam_lastlog/pam_lastlog.c (revision 269064) +++ lib/libpam/modules/pam_lastlog/pam_lastlog.c (working copy) @@ -49,7 +49,6 @@ #include =20 #include -#include #include #include #include @@ -68,7 +67,6 @@ 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_err =3D pam_get_user(pamh, &user, NULL); if (pam_err !=3D PAM_SUCCESS) return (pam_err); - if (user =3D=3D NULL || (pwd =3D getpwnam(user)) =3D=3D NULL) + if (user =3D=3D NULL) return (PAM_SERVICE_ERR); PAM_LOG("Got user: %s", user); =20 --=20 Arthur Mesh Juniper Networks +1 408 936-4968 --SvF6CGw9fzJC4Rcx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQGcBAEBCAAGBQJT0SXYAAoJEO/ZUtudxDntCq0L/ia4j8A2Lv4vIKotyCho2YJK 0ouJ3UiOhHalp/dAYPFfwRFBsSJ+w/Vk0C4eoCG39G9l9fyKBAxIipZCfgh7GL96 /eSMCBWiI1JopePfKeAeX+cEjHNGQwBeGkvzHau22Ev+wP2Sb1ByDVVs1ONhhUBU 2vUp9X0Q90sFbWXziEJ7GdYm5LHrwENaycXktDYIJRjDPP4sCFlI+FtvJl/IuJ0a tQB1dvrDLi5N7UwG7k8DPiZCk7ApT9LXBOJO4cR49BIkowUFZ1IHfZqaIEi4spci fmMLuy+2LF/40j7yhjST7cqN5i0BhAd5Vj9K8Eani9Z12Uoowd0ugkD7RSYHOH/S d/PV3/A1MXexju1WUDBVgqR5NVGkgsoc38bqQgoxxaXxniirctTQbA0w3KnNNvVR CyiHv0xD9h8Jk8P5c4OaswOobW+4FZdXeMKdMrIyfy0crawXbqgwqE2P7VQO2hbv 2gcU6qbcckjvpkuvPnXvy4dPzMsFa+/6P8otb13ofw== =V+kI -----END PGP SIGNATURE----- --SvF6CGw9fzJC4Rcx--