about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-20 19:14:31 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-20 19:14:31 +0000
commitb72f9d5197d1281664c3fd0ccffa328dfc195818 (patch)
treed257f4205309a60d9296d8927e2d55ea68b54b4c
parent1b6020c13edefec6850b9f58d856c5f95de7c1ea (diff)
downloadglibc-b72f9d5197d1281664c3fd0ccffa328dfc195818.tar.gz
glibc-b72f9d5197d1281664c3fd0ccffa328dfc195818.tar.xz
glibc-b72f9d5197d1281664c3fd0ccffa328dfc195818.zip
Update.
	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Fix typo
	preventing optimization from being done.  Set the correct type bit
	in seen.  Don't define and use _dl_base_addr unless
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/generic/dl-sysdep.c11
2 files changed, 8 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 852a41584b..466520ff33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,8 @@
 2001-01-20  Ulrich Drepper  <drepper@redhat.com>
 
-	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Initialize egid
-	to 1.  This helps those installing ld.so SUID (nobody will be that
-	stupid, I hope).  Don't define and use _dl_base_addr unless
+	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Fix typo
+	preventing optimization from being done.  Set the correct type bit
+	in seen.  Don't define and use _dl_base_addr unless
 	NEED_DL_BASE_ADDR is defined.
 
 	* io/ftw.c (ftw_dir): Add slash after directory name if there
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index e6caf97240..38ca412eae 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -89,14 +89,13 @@ _dl_sysdep_start (void **start_argptr,
   uid_t uid = 0;
   uid_t euid = 0;
   gid_t gid = 0;
-#ifdef HAVE_AUX_X
-  /* This adds a little bit of security.  If the kernel does not pass
-     any value up we default to the safe mode.  */
-  gid_t egid = 1;
-#else
   gid_t egid = 0;
+#ifdef HAVE_AUX_XID
+# define set_seen(tag) (tag) /* Evaluate for the side effects.  */
+#else
   unsigned int seen = 0;
 # define M(type) (1 << (type))
+# define set_seen(val) seen |= M ((tag)->a_type)
 #endif
 
   DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, _dl_argv, _environ,
@@ -105,7 +104,7 @@ _dl_sysdep_start (void **start_argptr,
   user_entry = (ElfW(Addr)) &ENTRY_POINT;
   _dl_platform = NULL; /* Default to nothing known about the platform.  */
 
-  for (av = _dl_auxv; av->a_type != AT_NULL; seen |= M ((++av)->a_type))
+  for (av = _dl_auxv; av->a_type != AT_NULL; set_seen (av++))
     switch (av->a_type)
       {
       case AT_PHDR: