]> granicus.if.org Git - sudo/commitdiff
If get_process_ttyname() fails for errno != ENOENT, just warn
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 1 Sep 2016 14:23:19 +0000 (08:23 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 1 Sep 2016 14:23:19 +0000 (08:23 -0600)
instead of making it a fatal error.  Bug #755

src/sudo.c

index 8fd910f45b4173b86b745951a49bba6e67f97e26..a467ea5fd571a48344fef7583ce3bf2f875b1c0a 100644 (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();