From a60c8a80bc53364ff690b8a5e8421934c9e8c9c6 Mon Sep 17 00:00:00 2001 From: David Nugent Date: Sat, 15 Feb 1997 05:45:00 +0000 Subject: [PATCH] Allow commonly-used "insecure" as a valid keyword in /etc/ttys. This prevents keywords after "insecure" occurs being errnoeously parsed as comments. --- include/ttyent.h | 1 + lib/libc/gen/getttyent.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/ttyent.h b/include/ttyent.h index accaf9cb1c8..e0f00f63936 100644 --- a/include/ttyent.h +++ b/include/ttyent.h @@ -41,6 +41,7 @@ #define _TTYS_OFF "off" #define _TTYS_ON "on" #define _TTYS_SECURE "secure" +#define _TTYS_INSECURE "insecure" #define _TTYS_WINDOW "window" #define _TTYS_GROUP "group" #define _TTYS_NOGROUP "none" diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c index db615cb1025..ca0413cbe4b 100644 --- a/lib/libc/gen/getttyent.c +++ b/lib/libc/gen/getttyent.c @@ -121,6 +121,8 @@ getttyent() tty.ty_status |= TTY_ON; else if (scmp(_TTYS_SECURE)) tty.ty_status |= TTY_SECURE; + else if (scmp(_TTYS_INSECURE)) + tty.ty_status &= ~TTY_SECURE; else if (vcmp(_TTYS_WINDOW)) tty.ty_window = value(p); else if (vcmp(_TTYS_GROUP))