mirror of git://anongit.mindrot.org/openssh.git
Do not fatal on failed lookup of group "tty".
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@
This commit is contained in:
parent
8b4cc4bdc8
commit
c5cfa90e03
2
sshpty.c
2
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue