If get_process_ttyname() fails for errno != ENOENT, just warn

instead of making it a fatal error.  Bug #755
This commit is contained in:
Todd C. Miller
2016-09-01 08:23:19 -06:00
parent c9572db75a
commit 04340eea60

View File

@@ -570,10 +570,8 @@ get_user_info(struct user_details *ud)
ud->tty = user_info[i] + sizeof("tty=") - 1;
} else {
/* tty may not always be present */
if (errno != ENOENT) {
if (errno != ENOENT)
sudo_warn(U_("unable to determine tty"));
goto bad;
}
}
cp = sudo_gethostname();