Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 09:47:44 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Don Lewis <truckman@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r299926 - head/lib/libpam/modules/pam_unix
Message-ID:  <CAPyFy2Ao5fnkCfP4Tm62nxjFCV4G1t6-=HxFC5uFC3ieX%2BZWmA@mail.gmail.com>
In-Reply-To: <201605160834.u4G8YH1C000850@repo.freebsd.org>
References:  <201605160834.u4G8YH1C000850@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 16 May 2016 at 04:34, Don Lewis <truckman@freebsd.org> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2Ao5fnkCfP4Tm62nxjFCV4G1t6-=HxFC5uFC3ieX%2BZWmA>