From 04340eea60a6287718432f4fd79b68c833f07cbe Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 1 Sep 2016 08:23:19 -0600 Subject: [PATCH] If get_process_ttyname() fails for errno != ENOENT, just warn instead of making it a fatal error. Bug #755 --- src/sudo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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(); -- 2.40.0