Clear errno before calling getpw*.
This commit is contained in:
parent
f52ebb9e17
commit
e18c504ec0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user