Clear errno before calling getpw*.

This commit is contained in:
jamie 2016-01-16 18:13:28 +00:00
parent f52ebb9e17
commit e18c504ec0

View File

@ -877,6 +877,7 @@ get_user_info(struct cfjail *j, const char *username,
{
const struct passwd *pwd;
errno = 0;
*pwdp = pwd = username ? getpwnam(username) : getpwuid(getuid());
if (pwd == NULL) {
if (errno)