diff options
-rw-r--r-- | sshpty.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshpty.c,v 1.33 2019/07/04 16:16:51 deraadt Exp $ */ | 1 | /* $OpenBSD: sshpty.c,v 1.34 2019/07/04 16:20:10 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -171,6 +171,8 @@ pty_setowner(struct passwd *pw, const char *tty) | |||
171 | 171 | ||
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) | ||
175 | fatal("no tty group"); | ||
174 | gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid; | 176 | gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid; |
175 | mode = (grp != NULL) ? 0620 : 0600; | 177 | mode = (grp != NULL) ? 0620 : 0600; |
176 | 178 | ||