Update.
	* elf/dl-support.c (_dl_non_dynamic_init): Fix cleaning of
	environment.  [BZ #384]
This commit is contained in:
Ulrich Drepper 2004-09-26 12:12:28 +00:00
parent 412c954afa
commit c4e328a12e
2 changed files with 13 additions and 10 deletions

View File

@ -1,5 +1,8 @@
2004-09-26 Ulrich Drepper <drepper@redhat.com> 2004-09-26 Ulrich Drepper <drepper@redhat.com>
* elf/dl-support.c (_dl_non_dynamic_init): Fix cleaning of
environment. [BZ #384]
* sunrpc/clnt_udp.c (is_network_up): Use getifaddrs instead of ioctl. * sunrpc/clnt_udp.c (is_network_up): Use getifaddrs instead of ioctl.
* sunrpc/get_myaddr.c (get_myaddress): Likewise. * sunrpc/get_myaddr.c (get_myaddress): Likewise.
* sunrpc/pmap_clnt.c (__get_myaddress): Likewise. * sunrpc/pmap_clnt.c (__get_myaddress): Likewise.

View File

@ -257,22 +257,22 @@ _dl_non_dynamic_init (void)
if (__libc_enable_secure) if (__libc_enable_secure)
{ {
static const char *unsecure_envvars[] = static const char unsecure_envvars[] =
{ UNSECURE_ENVVARS
UNSECURE_ENVVARS,
#ifdef EXTRA_UNSECURE_ENVVARS #ifdef EXTRA_UNSECURE_ENVVARS
EXTRA_UNSECURE_ENVVARS EXTRA_UNSECURE_ENVVARS
#endif #endif
}; ;
size_t cnt; const char *cp = unsecure_envvars;
for (cnt = 0; while (cp < unsecure_envvars + sizeof (unsecure_envvars))
cnt < sizeof (unsecure_envvars) / sizeof (unsecure_envvars[0]); {
++cnt) __unsetenv (cp);
unsetenv (unsecure_envvars[cnt]); cp = (const char *) __rawmemchr (cp, '\0') + 1;
}
if (__access ("/etc/suid-debug", F_OK) != 0) if (__access ("/etc/suid-debug", F_OK) != 0)
unsetenv ("MALLOC_CHECK_"); __unsetenv ("MALLOC_CHECK_");
} }
#ifdef DL_PLATFORM_INIT #ifdef DL_PLATFORM_INIT