From owner-svn-src-all@freebsd.org Mon May 16 15:34:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8EE9B3DE7B; Mon, 16 May 2016 15:34:46 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (unknown [IPv6:2602:304:b010:ef20::f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gw.catspoiler.org", Issuer "gw.catspoiler.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ACB96184C; Mon, 16 May 2016 15:34:46 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.15.2/8.15.2) with ESMTP id u4GFYaLI071803; Mon, 16 May 2016 08:34:40 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201605161534.u4GFYaLI071803@gw.catspoiler.org> Date: Mon, 16 May 2016 08:34:36 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r299926 - head/lib/libpam/modules/pam_unix To: emaste@freebsd.org cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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, 16 May 2016 15:34:47 -0000 On 16 May, Ed Maste wrote: > On 16 May 2016 at 04:34, Don Lewis wrote: >> Author: truckman >> Date: Mon May 16 08:34:17 2016 >> New Revision: 299926 >> URL: https://svnweb.freebsd.org/changeset/base/299926 >> >> Log: >> Hoist the getpwnam() call outside the first if/else block in >> pam_sm_chauthtok(). Set user = getlogin() inside the true >> branch so that it is initialized for the following PAM_LOG() >> call. This is how it is done in pam_sm_authenticate(). > > Unfortunately this triggers a warning on powerpc/powerpc64: > > /scratch/tmp/emaste/freebsd/lib/libpam/modules/pam_unix/pam_unix.c: In > function 'pam_sm_chauthtok': > /scratch/tmp/emaste/freebsd/lib/libpam/modules/pam_unix/pam_unix.c:278: > warning: 'retval' may be used uninitialized in this function > > I don't see why GCC warns now and did not before, though. Strange ... It turns out that Coverity did notice this, CID 1018711. It should be fixed by r299948.