]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r299926
authortruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 May 2016 05:11:08 +0000 (05:11 +0000)
committertruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 May 2016 05:11:08 +0000 (05:11 +0000)
commit002be3fb9c598bf3eb21585ff69280f76849fc50
tree0c1328513a13cda101db1654c588e47f3fc1478b
parent449208b04c35f703401271bff6d5de891c93d2d7
MFC r299926

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().

Reported by: Coverity
CID: 272498

git-svn-id: svn://svn.freebsd.org/base/stable/10@300453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libpam/modules/pam_unix/pam_unix.c