diff options
author | jamie <jamie@FreeBSD.org> | 2016-01-16 18:13:28 +0000 |
---|---|---|
committer | jamie <jamie@FreeBSD.org> | 2016-01-16 18:13:28 +0000 |
commit | e18c504ec0c5fd91ce3c4175489580acf97c26b9 (patch) | |
tree | 1c7d356d7fe73b589713cacc3ab35f3ce819d35f /usr.sbin | |
parent | f52ebb9e171e7e0c24ff210b8fc53a2bb7b7c06c (diff) | |
download | FreeBSD-src-e18c504ec0c5fd91ce3c4175489580acf97c26b9.zip FreeBSD-src-e18c504ec0c5fd91ce3c4175489580acf97c26b9.tar.gz |
Clear errno before calling getpw*.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/jail/command.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index f162c3c..7132a5f 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -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) |