Clear errno before calling getpw*.
This commit is contained in:
parent
2aa4a62da3
commit
fcc43d065a
@ -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