From owner-svn-src-all@FreeBSD.ORG Mon Sep 29 09:14:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C50334CC; Mon, 29 Sep 2014 09:14:29 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 77D70AA2; Mon, 29 Sep 2014 09:14:28 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B2B2E25D3A82; Mon, 29 Sep 2014 09:14:24 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id ACEC1C77108; Mon, 29 Sep 2014 09:14:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ynSQorN8O8Dg; Mon, 29 Sep 2014 09:14:22 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:80e5:6a63:fe7c:9e54] (unknown [IPv6:fde9:577b:c1a9:4410:80e5:6a63:fe7c:9e54]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 8BC3AC77107; Mon, 29 Sep 2014 09:14:20 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272280 - head/lib/libpam/modules/pam_login_access From: "Bjoern A. Zeeb" In-Reply-To: <201409290857.s8T8vamj094031@svn.freebsd.org> Date: Mon, 29 Sep 2014 09:13:59 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <4197A538-C42B-44DD-A20A-C4E900478D69@FreeBSD.org> References: <201409290857.s8T8vamj094031@svn.freebsd.org> To: =?windows-1252?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 09:14:30 -0000 On 29 Sep 2014, at 08:57 , Dag-Erling Sm=F8rgrav = wrote: > Author: des > Date: Mon Sep 29 08:57:36 2014 > New Revision: 272280 > URL: http://svnweb.freebsd.org/changeset/base/272280 >=20 > Log: > Instead of failing when neither PAM_TTY nor PAM_RHOST are available, = call > login_access() with "**unknown**" as the second argument. This will = allow > =93ALL" rules to match. >=20 = /scratch/tmp/bz/head.svn/lib/libpam/modules/pam_login_access/pam_login_acc= ess.c: In function 'pam_sm_acct_mgmt': = /scratch/tmp/bz/head.svn/lib/libpam/modules/pam_login_access/pam_login_acc= ess.c:97: warning: format '%s' expects type 'char *', but argument 4 has = type 'const void *' > Reported by: Tim Daneliuk > Tested by: dim@ > PR: 83099 193927 > MFC after: 3 days >=20 > Modified: > head/lib/libpam/modules/pam_login_access/pam_login_access.c >=20 > Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.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=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 01:17:42 2014 (r272279) > +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 08:57:36 2014 (r272280) > @@ -94,8 +94,10 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int > PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", > user, tty); > } else { > - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); > - return (PAM_AUTHINFO_UNAVAIL); > + PAM_LOG("Checking login.access for user %s", user); > + if (login_access(user, "***unknown***") !=3D 0) > + return (PAM_SUCCESS); > + PAM_VERBOSE_ERROR("%s is not allowed to log in", user); > } >=20 > return (PAM_AUTH_ERR); >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983