summaryrefslogtreecommitdiff
path: root/lib/libutil
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2004-11-24 22:17:19 +0000
committerchristos <christos@NetBSD.org>2004-11-24 22:17:19 +0000
commitdb5d4e2d6ad68fa1c778dcb32fd320a001da9c5f (patch)
tree28f9eccf55d1cd458487d05bed4f6789677603e7 /lib/libutil
parentf11900e378eb1add56751855e4757bd9f673b2ac (diff)
I really want to kill the hard-coding of _TTY_GID. Set the group to the
primary group of the user if the group tty does not exist.
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/pty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libutil/pty.c b/lib/libutil/pty.c
index 469cb54826d..9de5ba8f244 100644
--- a/lib/libutil/pty.c
+++ b/lib/libutil/pty.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pty.c,v 1.25 2004/09/18 20:14:22 christos Exp $ */
+/* $NetBSD: pty.c,v 1.26 2004/11/24 22:17:19 christos Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pty.c 8.3 (Berkeley) 5/16/94";
#else
-__RCSID("$NetBSD: pty.c,v 1.25 2004/09/18 20:14:22 christos Exp $");
+__RCSID("$NetBSD: pty.c,v 1.26 2004/11/24 22:17:19 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -89,7 +89,7 @@ openpty(int *amaster, int *aslave, char *name, struct termios *term,
if ((gr = getgrnam("tty")) != NULL)
ttygid = gr->gr_gid;
else
- ttygid = _TTY_GID;
+ ttygid = getgid();
for (cp1 = TTY_LETTERS; *cp1; cp1++) {
line[8] = *cp1;