From owner-freebsd-current@FreeBSD.ORG Mon Jan 9 20:35:49 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C55A9106566C for ; Mon, 9 Jan 2012 20:35:49 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) by mx1.freebsd.org (Postfix) with ESMTP id AB9A08FC0A for ; Mon, 9 Jan 2012 20:35:49 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id q09KYPhM031978; Mon, 9 Jan 2012 12:34:29 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201201092034.q09KYPhM031978@gw.catspoiler.org> Date: Mon, 9 Jan 2012 12:34:25 -0800 (PST) From: Don Lewis To: des@des.no In-Reply-To: <86pqesy66w.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Cc: current@FreeBSD.org Subject: Re: couldn't log on to my -CURRENT machine after upgrade to latest PAM X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 20:35:49 -0000 On 9 Jan, Dag-Erling Smørgrav wrote: > Don Lewis writes: >> After staring at the code a lot more, I see your point about the loss of >> information. The problem is that openpam_parse_chain() returns >> PAM_SUCCESS whether or not if found anything, but we want the loop to >> terminate when either an error is detected or if openpam_parse_chain() >> actually found something. Maybe changing the loop exit to something >> like this would work: >> >> if (ret != PAM_SUCCESS || pamh->chains[facility] != NULL) >> return (ret); > > The simplest fix for now is probably to revert r487; it applies cleanly > except for the first hunk, which is easy to apply manually. openpam_configure() checks whether or not pamh->chains[] is NULL, so I figured that was a good test once I figured out how openpam_parse_chain() was returning its results. Once you decide on a fix, I can move my old /etc/pam.conf back to test it.