summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2019-07-05 13:21:45 +1000
committerDarren Tucker <dtucker@dtucker.net>2019-07-05 13:23:46 +1000
commitc5cfa90e03432181ffcc7ad3f9f815179bd0c626 (patch)
tree7d850a3d336d88455af5dd53643bcf5802f01acf /sshpty.c
parent8b4cc4bdc8a70bf209a274fa2b2a49c1e3c8d8a2 (diff)
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@
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sshpty.c b/sshpty.c
index 9ad8e95c8..bce09e255 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -172,7 +172,7 @@ pty_setowner(struct passwd *pw, const char *tty)
172 /* Determine the group to make the owner of the tty. */ 172 /* Determine the group to make the owner of the tty. */
173 grp = getgrnam("tty"); 173 grp = getgrnam("tty");
174 if (grp == NULL) 174 if (grp == NULL)
175 fatal("no tty group"); 175 debug("%s: no tty group", __func__);
176 gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid; 176 gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid;
177 mode = (grp != NULL) ? 0620 : 0600; 177 mode = (grp != NULL) ? 0620 : 0600;
178 178