[PATCH] Fix UNSEC_ENVVARS (was Re: [patch] res_conf.h missing security feature)

Jakub Jelinek jakub@redhat.com
Mon Jan 8 08:45:00 GMT 2001


On Mon, Jan 08, 2001 at 10:26:37AM -0500, Ben Collins wrote:
> Seems this fix didn't make it throught the resolv migration in glibc 2.2

Wrong.
The bug is elsewhere:

2001-01-08  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add MEMUSAGE_OUTPUT,
	add comma after RESOLV_HOST_CONF.
	* sysdeps/generic/segfault.c (install_handler): Do nothing if
	__libc_enable_secure.

--- libc/sysdeps/generic/unsecvars.h.jj	Tue Sep 26 11:31:25 2000
+++ libc/sysdeps/generic/unsecvars.h	Mon Jan  8 17:59:29 2001
@@ -4,8 +4,9 @@
   "LOCALDOMAIN",							      \
   "LOCPATH",								      \
   "MALLOC_TRACE",							      \
+  "MEMUSAGE_OUTPUT",							      \
   "NLSPATH",								      \
-  "RESOLV_HOST_CONF"							      \
+  "RESOLV_HOST_CONF",							      \
   "RES_OPTIONS",							      \
   "TMPDIR",								      \
   "TZDIR"
--- libc/sysdeps/generic/segfault.c.jj	Wed Aug  2 21:36:33 2000
+++ libc/sysdeps/generic/segfault.c	Mon Jan  8 14:14:55 2001
@@ -185,6 +185,9 @@ install_handler (void)
   const char *sigs = getenv ("SEGFAULT_SIGNALS");
   const char *name;
 
+  if (__libc_enable_secure)
+    return;
+
   sa.sa_handler = (void *) catch_segfault;
   sigemptyset (&sa.sa_mask);
   sa.sa_flags = SA_RESTART;

	Jakub


More information about the Libc-hacker mailing list