Sync with recent upstrean changes:
commitf31110aa20348a9f8929a6e4500ad686e1ead9c9
authorAntoine Jacoutot <ajacoutot@gnome.org>
Thu, 14 Jun 2018 06:55:21 +0000 (14 08:55 +0200)
committerAntoine Jacoutot <ajacoutot@gnome.org>
Thu, 14 Jun 2018 06:55:21 +0000 (14 08:55 +0200)
treeab251031867ace7640159b25f1a672064d96e87b
parent5e8d667bbfafeb25db4a59657af9aa2615102fe3
Sync with recent upstrean changes:

---8<-------------------------------------------------------------
Call pledge(2) earlier before opening the auth channel and readpassphrase()

Before this change, only the password validation was pledged, now it
also includes some more code including the "Password:" prompt.

To pledge the code earlier, the getpwnam_shadow() had to be moved up -
it works under "getpw" but it does not return the actual password hash
under pledge.  This also works with yp(ldap).

OK deraadt@ tb@ brynet@
---8<-------------------------------------------------------------
login_passwd/common.h
login_passwd/login.c
login_passwd/login_passwd.c