From: Todd C. Miller Date: Thu, 1 Sep 2016 14:23:19 +0000 (-0600) Subject: If get_process_ttyname() fails for errno != ENOENT, just warn X-Git-Tag: SUDO_1_8_18^2~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04340eea60a6287718432f4fd79b68c833f07cbe;p=sudo If get_process_ttyname() fails for errno != ENOENT, just warn instead of making it a fatal error. Bug #755 --- diff --git a/src/sudo.c b/src/sudo.c index 8fd910f45..a467ea5fd 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -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();