]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Do not fatal on failed lookup of group "tty".
authorDarren Tucker <dtucker@dtucker.net>
Fri, 5 Jul 2019 03:21:45 +0000 (13:21 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 5 Jul 2019 03:23:46 +0000 (13:23 +1000)
Some platforms (eg AIX and Cygwin) do not have a "tty" group.  In those
cases we will fall back to making the tty device the user's primary
group, so do not fatal if the group lookup fails.  ok djm@

sshpty.c

index 9ad8e95c81604a61fca509a26a389007a3c62e4c..bce09e255e0d17a9c6fb48fef5fb0eff0456a377 100644 (file)
--- a/sshpty.c
+++ b/sshpty.c
@@ -172,7 +172,7 @@ pty_setowner(struct passwd *pw, const char *tty)
        /* Determine the group to make the owner of the tty. */
        grp = getgrnam("tty");
        if (grp == NULL)
-               fatal("no tty group");
+               debug("%s: no tty group", __func__);
        gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid;
        mode = (grp != NULL) ? 0620 : 0600;