mirror of git://sourceware.org/git/glibc.git
Update.
* 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 NEED_DL_BASE_ADDR is defined.
This commit is contained in:
parent
21a568e279
commit
1b6020c13e
|
@ -1,5 +1,10 @@
|
||||||
2001-01-20 Ulrich Drepper <drepper@redhat.com>
|
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
|
||||||
|
NEED_DL_BASE_ADDR is defined.
|
||||||
|
|
||||||
* io/ftw.c (ftw_dir): Add slash after directory name if there
|
* io/ftw.c (ftw_dir): Add slash after directory name if there
|
||||||
wasn't any. Reported by loris <loris@iol.it>.
|
wasn't any. Reported by loris <loris@iol.it>.
|
||||||
* io/Makefile (tests): Add bug-ftw2.
|
* io/Makefile (tests): Add bug-ftw2.
|
||||||
|
|
|
@ -51,7 +51,9 @@ extern void ENTRY_POINT (void);
|
||||||
/* Protect SUID program against misuse of file descriptors. */
|
/* Protect SUID program against misuse of file descriptors. */
|
||||||
extern void __libc_check_standard_fds (void);
|
extern void __libc_check_standard_fds (void);
|
||||||
|
|
||||||
|
#ifdef NEED_DL_BASE_ADDR
|
||||||
ElfW(Addr) _dl_base_addr;
|
ElfW(Addr) _dl_base_addr;
|
||||||
|
#endif
|
||||||
int __libc_enable_secure;
|
int __libc_enable_secure;
|
||||||
int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
|
int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
|
||||||
of init-first. */
|
of init-first. */
|
||||||
|
@ -87,8 +89,12 @@ _dl_sysdep_start (void **start_argptr,
|
||||||
uid_t uid = 0;
|
uid_t uid = 0;
|
||||||
uid_t euid = 0;
|
uid_t euid = 0;
|
||||||
gid_t gid = 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;
|
gid_t egid = 0;
|
||||||
#ifndef HAVE_AUX_X
|
|
||||||
unsigned int seen = 0;
|
unsigned int seen = 0;
|
||||||
# define M(type) (1 << (type))
|
# define M(type) (1 << (type))
|
||||||
#endif
|
#endif
|
||||||
|
@ -114,9 +120,11 @@ _dl_sysdep_start (void **start_argptr,
|
||||||
case AT_ENTRY:
|
case AT_ENTRY:
|
||||||
user_entry = av->a_un.a_val;
|
user_entry = av->a_un.a_val;
|
||||||
break;
|
break;
|
||||||
|
#ifdef NEED_DL_BASE_ADDR
|
||||||
case AT_BASE:
|
case AT_BASE:
|
||||||
_dl_base_addr = av->a_un.a_val;
|
_dl_base_addr = av->a_un.a_val;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case AT_UID:
|
case AT_UID:
|
||||||
uid = av->a_un.a_val;
|
uid = av->a_un.a_val;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue