diff options
author | ache <ache@FreeBSD.org> | 1995-10-20 22:17:35 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-10-20 22:17:35 +0000 |
commit | ad266c215da37e41a7f70350ccc33f7593590bd4 (patch) | |
tree | 5cea518838b337a37c46e1072361234fb5a13807 /libexec | |
parent | 28a272cba238bc1db35d294b8087ab0ed632a367 (diff) | |
download | FreeBSD-src-ad266c215da37e41a7f70350ccc33f7593590bd4.zip FreeBSD-src-ad266c215da37e41a7f70350ccc33f7593590bd4.tar.gz |
Fix original patch error with ! before strncmp
Zap only needed LD_* variables
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/telnetd/sys_term.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index 79b9313..2e3e4d2 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -1780,10 +1780,16 @@ scrub_env() register char **cpp, **cpp2; for (cpp2 = cpp = environ; *cpp; cpp++) { - if (!strncmp(*cpp, "LD_", 3) && - !strncmp(*cpp, "_RLD_", 5) && - !strncmp(*cpp, "LIBPATH=", 8) && - !strncmp(*cpp, "IFS=", 4)) +#ifdef __FreeBSD__ + if (strncmp(*cpp, "LD_LIBRARY_PATH=", 16) && + strncmp(*cpp, "LD_NOSTD_PATH=", 14) && + strncmp(*cpp, "LD_PRELOAD=", 11) && +#else + if (strncmp(*cpp, "LD_", 3) && + strncmp(*cpp, "_RLD_", 5) && + strncmp(*cpp, "LIBPATH=", 8) && +#endif + strncmp(*cpp, "IFS=", 4)) *cpp2++ = *cpp; } *cpp2 = 0; |