summaryrefslogtreecommitdiff
path: root/libexec/telnetd
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-10-10 12:59:47 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-10-10 12:59:47 +0000
commitacb12b0791b377f378715a4b6ffe8f70a4a276a8 (patch)
tree1d5ff719e4ad365accb238e11a0d68a6d93bdb06 /libexec/telnetd
parent17e9b3489e4be976c9cd12bf397eb99388f08b3a (diff)
Prune the following environment variables:
TERMINFO TERMINFO_DIRS TERMPATH TERMCAP (only if it starts with a '/')
Diffstat (limited to 'libexec/telnetd')
-rw-r--r--libexec/telnetd/sys_term.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c
index 3279213f2d9..8978581f814 100644
--- a/libexec/telnetd/sys_term.c
+++ b/libexec/telnetd/sys_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_term.c,v 1.19 2000/09/15 07:13:47 deraadt Exp $ */
+/* $OpenBSD: sys_term.c,v 1.20 2000/10/10 12:59:46 millert Exp $ */
/* $NetBSD: sys_term.c,v 1.9 1996/03/20 04:25:53 tls Exp $ */
/*
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95";
static char rcsid[] = "$NetBSD: sys_term.c,v 1.8 1996/02/28 20:38:21 thorpej Exp $";
#else
-static char rcsid[] = "$OpenBSD: sys_term.c,v 1.19 2000/09/15 07:13:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: sys_term.c,v 1.20 2000/10/10 12:59:46 millert Exp $";
#endif
#endif /* not lint */
@@ -1850,6 +1850,10 @@ scrub_env()
if (strncmp(*cpp, "LD_", 3) &&
strncmp(*cpp, "_RLD_", 5) &&
strncmp(*cpp, "LIBPATH=", 8) &&
+ strncmp(*cpp, "TERMINFO=", 9) &&
+ strncmp(*cpp, "TERMINFO_DIRS=", 14) &&
+ strncmp(*cpp, "TERMPATH=", 9) &&
+ strncmp(*cpp, "TERMCAP=/", 9) &&
strncmp(*cpp, "ENV=", 4) &&
strncmp(*cpp, "IFS=", 4))
*cpp2++ = *cpp;