diff options
author | davidn <davidn@FreeBSD.org> | 1997-01-02 08:05:43 +0000 |
---|---|---|
committer | davidn <davidn@FreeBSD.org> | 1997-01-02 08:05:43 +0000 |
commit | 92746eca8682886861092d9eca8783451c1e5fd0 (patch) | |
tree | 62a914cb0e26eee76f6757ec5a9ef9b1ae57d3e6 /lib | |
parent | 7174e698fdd0caf4f14e4f893f1bcec7a1f74e80 (diff) | |
download | FreeBSD-src-92746eca8682886861092d9eca8783451c1e5fd0.zip FreeBSD-src-92746eca8682886861092d9eca8783451c1e5fd0.tar.gz |
Added group= facility to /etc/ttys for tty grouping for more
more manageable and convenient referencing by login.conf (login
class database) and (e.g.) login.access.
This is the first of a group of commits which implements the login
class capabilities database.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/getttyent.3 | 7 | ||||
-rw-r--r-- | lib/libc/gen/getttyent.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/libc/gen/getttyent.3 b/lib/libc/gen/getttyent.3 index 7ee453d..0bbd850 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 5d40ac9..db615cb 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; } |