summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorDavid Nugent <davidn@FreeBSD.org>1997-01-02 08:05:43 +0000
committerDavid Nugent <davidn@FreeBSD.org>1997-01-02 08:05:43 +0000
commit4ae89ecdddeb79390527c427af3847e94c92a8dd (patch)
tree62a914cb0e26eee76f6757ec5a9ef9b1ae57d3e6 /lib/libc
parent0cfdb0f162f5601b6f4b1376537b092186691b61 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/getttyent.37
-rw-r--r--lib/libc/gen/getttyent.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/libc/gen/getttyent.3 b/lib/libc/gen/getttyent.3
index 7ee453d8b12b..0bbd85066afa 100644
--- a/lib/libc/gen/getttyent.3
+++ b/lib/libc/gen/getttyent.3
@@ -31,7 +31,7 @@
.\"
.\" @(#)getttyent.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd June 4, 1993
+.Dd November 17, 1996
.Dt GETTTYENT 3
.Os BSD 4.3
.Sh NAME
@@ -69,6 +69,7 @@ struct ttyent {
int ty_status; /* flag values */
char *ty_window; /* command for window manager */
char *ty_comment; /* comment field */
+ char *ty_group; /* tty group name */
};
.Ed
.Pp
@@ -98,6 +99,10 @@ Allow users with a uid of 0 to login on this terminal.
.El
.It Fa ty_window
The command to execute for a window system associated with the line.
+.It Fa ty_group
+A group name to which the tty belongs.
+If no group is specified in the ttys description file,
+then the tty is placed in an anonymous group called "none".
.It Fa ty_comment
Any trailing comment field, with any leading hash marks (``#'') or
whitespace removed.
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c
index 5d40ac9941f6..db615cb10251 100644
--- a/lib/libc/gen/getttyent.c
+++ b/lib/libc/gen/getttyent.c
@@ -110,6 +110,7 @@ getttyent()
}
tty.ty_status = 0;
tty.ty_window = NULL;
+ tty.ty_group = _TTYS_NOGROUP;
#define scmp(e) !strncmp(p, e, sizeof(e) - 1) && isspace(p[sizeof(e) - 1])
#define vcmp(e) !strncmp(p, e, sizeof(e) - 1) && p[sizeof(e) - 1] == '='
@@ -122,6 +123,8 @@ getttyent()
tty.ty_status |= TTY_SECURE;
else if (vcmp(_TTYS_WINDOW))
tty.ty_window = value(p);
+ else if (vcmp(_TTYS_GROUP))
+ tty.ty_group = value(p);
else
break;
}