Fix original patch error with ! before strncmp
Zap only needed LD_* variables
This commit is contained in:
parent
1bfde0aca4
commit
d549e5cc7f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11597
@ -1833,10 +1833,16 @@ scrub_env()
|
|||||||
register char **cpp, **cpp2;
|
register char **cpp, **cpp2;
|
||||||
|
|
||||||
for (cpp2 = cpp = environ; *cpp; cpp++) {
|
for (cpp2 = cpp = environ; *cpp; cpp++) {
|
||||||
if (!strncmp(*cpp, "LD_", 3) &&
|
#ifdef __FreeBSD__
|
||||||
!strncmp(*cpp, "_RLD_", 5) &&
|
if (strncmp(*cpp, "LD_LIBRARY_PATH=", 16) &&
|
||||||
!strncmp(*cpp, "LIBPATH=", 8) &&
|
strncmp(*cpp, "LD_NOSTD_PATH=", 14) &&
|
||||||
!strncmp(*cpp, "IFS=", 4))
|
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++ = *cpp;
|
||||||
}
|
}
|
||||||
*cpp2 = 0;
|
*cpp2 = 0;
|
||||||
|
@ -1780,10 +1780,16 @@ scrub_env()
|
|||||||
register char **cpp, **cpp2;
|
register char **cpp, **cpp2;
|
||||||
|
|
||||||
for (cpp2 = cpp = environ; *cpp; cpp++) {
|
for (cpp2 = cpp = environ; *cpp; cpp++) {
|
||||||
if (!strncmp(*cpp, "LD_", 3) &&
|
#ifdef __FreeBSD__
|
||||||
!strncmp(*cpp, "_RLD_", 5) &&
|
if (strncmp(*cpp, "LD_LIBRARY_PATH=", 16) &&
|
||||||
!strncmp(*cpp, "LIBPATH=", 8) &&
|
strncmp(*cpp, "LD_NOSTD_PATH=", 14) &&
|
||||||
!strncmp(*cpp, "IFS=", 4))
|
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++ = *cpp;
|
||||||
}
|
}
|
||||||
*cpp2 = 0;
|
*cpp2 = 0;
|
||||||
|
@ -1833,10 +1833,16 @@ scrub_env()
|
|||||||
register char **cpp, **cpp2;
|
register char **cpp, **cpp2;
|
||||||
|
|
||||||
for (cpp2 = cpp = environ; *cpp; cpp++) {
|
for (cpp2 = cpp = environ; *cpp; cpp++) {
|
||||||
if (!strncmp(*cpp, "LD_", 3) &&
|
#ifdef __FreeBSD__
|
||||||
!strncmp(*cpp, "_RLD_", 5) &&
|
if (strncmp(*cpp, "LD_LIBRARY_PATH=", 16) &&
|
||||||
!strncmp(*cpp, "LIBPATH=", 8) &&
|
strncmp(*cpp, "LD_NOSTD_PATH=", 14) &&
|
||||||
!strncmp(*cpp, "IFS=", 4))
|
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++ = *cpp;
|
||||||
}
|
}
|
||||||
*cpp2 = 0;
|
*cpp2 = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user