Really remove bad stuff from environment.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@947 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1327,10 +1327,11 @@ static void scrub_env(void)
|
|||||||
char **p;
|
char **p;
|
||||||
|
|
||||||
for (cpp2 = cpp = environ; *cpp; cpp++) {
|
for (cpp2 = cpp = environ; *cpp; cpp++) {
|
||||||
for(p = remove; *p; p++)
|
for(p = remove; *p; p++)
|
||||||
if(strncmp(*cpp, *p, strlen(*p)) == 0)
|
if(strncmp(*cpp, *p, strlen(*p)) == 0)
|
||||||
continue;
|
break;
|
||||||
*cpp2++ = *cpp;
|
if(*p == NULL)
|
||||||
|
*cpp2++ = *cpp;
|
||||||
}
|
}
|
||||||
*cpp2 = 0;
|
*cpp2 = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user