From owner-freebsd-current@FreeBSD.ORG Mon Jan 9 15:15:29 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 146ED106566C; Mon, 9 Jan 2012 15:15:29 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id CAEFB8FC16; Mon, 9 Jan 2012 15:15:28 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id AA9EF6F94; Mon, 9 Jan 2012 15:15:27 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 8C5058131; Mon, 9 Jan 2012 16:15:27 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Don Lewis References: <201201091425.q09EPmA0026105@gw.catspoiler.org> Date: Mon, 09 Jan 2012 16:15:27 +0100 In-Reply-To: <201201091425.q09EPmA0026105@gw.catspoiler.org> (Don Lewis's message of "Mon, 9 Jan 2012 06:25:48 -0800 (PST)") Message-ID: <86ty44ykj4.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 15:15:29 -0000 Don Lewis writes: > Dag-Erling Sm=C3=B8rgrav writes: > > The culprit was this commit: > >=20 > > http://trac.des.no/openpam/changeset/487/trunk/lib/openpam_configure.c > >=20 > > However, I'm not confident that simply reverting this commit is the > > right way to go. > Thanks for the detective work. It looks to me like the bug is caused by > the change in the openpam_parse_chain() return value. In the previous > code it returned the value of count, which I would guess was greater > than zero if it found something. In that case, the for loop in > openpam_load_chain() would be terminated because r !=3D 0. In the new > code, openpam_parse_chain() will return PAM_SUCCESS if it found > something, and the loop in openpam_load_chain() will go through another > iteration because ret =3D=3D PAM_SUCCESS. Thank you, Captain Obvious. I am still not confident that simply reverting this commit is the right way to go, because it discards valuable information when an error occurs, especially if an error occurs while parsing an include. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no