[Glibc-bsd-commits] r3609 - trunk/glibc-ports/kfreebsd
Petr Salinger
ps-guest at alioth.debian.org
Sun Jul 17 15:23:40 UTC 2011
Author: ps-guest
Date: 2011-07-17 15:23:40 +0000 (Sun, 17 Jul 2011)
New Revision: 3609
Modified:
trunk/glibc-ports/kfreebsd/dl-support.c
trunk/glibc-ports/kfreebsd/dl-sysdep.c
Log:
freebsd kernel does not set these notes anyway
Modified: trunk/glibc-ports/kfreebsd/dl-support.c
===================================================================
--- trunk/glibc-ports/kfreebsd/dl-support.c 2011-07-17 13:23:43 UTC (rev 3608)
+++ trunk/glibc-ports/kfreebsd/dl-support.c 2011-07-17 15:23:40 UTC (rev 3609)
@@ -27,7 +27,6 @@
internal_function
_dl_aux_init (ElfW(auxv_t) *av)
{
- int seen = 0;
uid_t uid = 0;
gid_t gid = 0;
@@ -43,30 +42,5 @@
case AT_PHNUM:
GL(dl_phnum) = av->a_un.a_val;
break;
-#ifndef __powerpc__
- /* For some odd reason these are not in sys/powerpc/include/elf.h. */
- case AT_UID:
- uid ^= av->a_un.a_val;
- seen |= 1;
- break;
- case AT_EUID:
- uid ^= av->a_un.a_val;
- seen |= 2;
- break;
- case AT_GID:
- gid ^= av->a_un.a_val;
- seen |= 4;
- break;
- case AT_EGID:
- gid ^= av->a_un.a_val;
- seen |= 8;
- break;
-#endif
- }
- if (seen == 0xf)
- {
- __libc_enable_secure = uid != 0 || gid != 0;
- __libc_enable_secure_decided = 1;
- }
}
#endif
Modified: trunk/glibc-ports/kfreebsd/dl-sysdep.c
===================================================================
--- trunk/glibc-ports/kfreebsd/dl-sysdep.c 2011-07-17 13:23:43 UTC (rev 3608)
+++ trunk/glibc-ports/kfreebsd/dl-sysdep.c 2011-07-17 15:23:40 UTC (rev 3609)
@@ -47,13 +47,6 @@
ElfW(auxv_t) *av;
uid_t uid = 0;
gid_t gid = 0;
- unsigned int seen = 0;
-# ifdef HAVE_AUX_XID
-# define set_seen(tag) (tag) /* Evaluate for the side effects. */
-# else
-# define M(type) (1 << (type))
-# define set_seen(tag) seen |= M ((tag)->a_type)
-# endif
#ifdef NEED_DL_SYSINFO
uintptr_t new_sysinfo = 0;
#endif
@@ -65,7 +58,7 @@
user_entry = (ElfW(Addr)) ENTRY_POINT;
GLRO(dl_platform) = NULL; /* Default to nothing known about the platform. */
- for (av = _dl_auxv; av->a_type != AT_NULL; set_seen (av++))
+ for (av = _dl_auxv; av->a_type != AT_NULL; av++)
switch (av->a_type)
{
case AT_PHDR:
@@ -85,31 +78,17 @@
_dl_base_addr = av->a_un.a_val;
break;
#endif
-#ifndef __powerpc__
- /* For some odd reason these are not in sys/powerpc/include/elf.h. */
- case AT_UID:
- case AT_EUID:
- uid ^= av->a_un.a_val;
- break;
- case AT_GID:
- case AT_EGID:
- gid ^= av->a_un.a_val;
- break;
-#endif
}
- if (seen != -1)
{
/* Fill in the values we have not gotten from the kernel through the
auxiliary vector. */
-# ifndef HAVE_AUX_XID
# define SEE(UID, var, uid) \
- if ((seen & M (AT_##UID)) == 0) var ^= __get##uid ()
+ var ^= __get##uid ()
SEE (UID, uid, uid);
SEE (EUID, uid, euid);
SEE (GID, gid, gid);
SEE (EGID, gid, egid);
-# endif
/* If one of the two pairs of IDs does not match this is a setuid
or setgid run. */
More information about the Glibc-bsd-commits
mailing list