]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 10 Jul 2000 20:02:00 +0000 (20:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 10 Jul 2000 20:02:00 +0000 (20:02 +0000)
2000-07-09  Mark Kettenis  <kettenis@gnu.org>

* elf/rtld.c (dl_main): Move call to __libc_check_standard_fds...
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): ... to here.

2000-07-10  Ulrich Drepper  <drepper@redhat.com>

* include/features.h: Include ISO C99 features if the compiler used
is an ISO C99 compiler.
Patch by Joseph S. Myers <jsm28@cam.ac.uk>.

2000-07-08  Mark Kettenis  <kettenis@gnu.org>

* iconv/gconv_conf.c: Include <bits/libc-lock.h>.

ChangeLog
elf/rtld.c
include/features.h
sysdeps/generic/dl-sysdep.c

index 6f7a7d7f61df470dc292ffb2df14bd851744d609..c4183089f7138944c636c381faf7df34e3a558f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2000-07-09  Mark Kettenis  <kettenis@gnu.org>
+
+       * elf/rtld.c (dl_main): Move call to __libc_check_standard_fds...
+       * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): ... to here.
+
+2000-07-10  Ulrich Drepper  <drepper@redhat.com>
+
+       * include/features.h: Include ISO C99 features if the compiler used
+       is an ISO C99 compiler.
+       Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
+
+2000-07-08  Mark Kettenis  <kettenis@gnu.org>
+
+       * iconv/gconv_conf.c: Include <bits/libc-lock.h>.
+
 2000-07-10  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/unix/sysv/linux/i386/sigaction.c: Make alias weak since
index 5dbab3a88590d25bbacd6da289d630266a71fac4..68c516d4bc79935647cb689a84992522b62b9bc7 100644 (file)
@@ -52,9 +52,6 @@ extern void *_dl_sysdep_read_whole_file (const char *filename,
                                         size_t *filesize_ptr,
                                         int mmap_prot);
 
-/* Protec SUID program against misuse of file descriptors.  */
-extern void __libc_check_standard_fds (void);
-
 /* Helper function to handle errors while resolving symbols.  */
 static void print_unresolved (int errcode, const char *objname,
                              const char *errsting);
@@ -400,12 +397,6 @@ dl_main (const ElfW(Phdr) *phdr,
   hp_timing_t diff;
 #endif
 
-  /* First thing, if this is a SUID program we make sure that FDs 0,
-     1, and 2 are allocated.  If necessary we are doing it ourself.
-     If it is not possible we stop the program.  */
-  if (__builtin_expect (__libc_enable_secure, 0))
-    __libc_check_standard_fds ();
-
   /* Process the environment variable which control the behaviour.  */
   process_envvars (&mode, &_dl_lazy);
 
index ab3126cdbf1f3b22e7bada3942956c7201475229..96ac7e5f755bfa1e49e9a2d877ee753c63220cf1 100644 (file)
    which was used prior to the standard acceptance.  This macro will
    eventually go away and the features enabled by default once the ISO C99
    standard is widely adopted.  */
-#if defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE
+#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
+     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
 # define __USE_ISOC99  1
 #endif
 
index 5994af398622e3d1147d45ca05a32fbab8e54335..1b00775d72fb7fcebe7988af9c6f3ff1741fb4e1 100644 (file)
@@ -45,6 +45,9 @@ extern fpu_control_t _dl_fpu_control;
 extern void _end;
 extern void ENTRY_POINT (void);
 
+/* Protect SUID program against misuse of file descriptors.  */
+extern void __libc_check_standard_fds (void);
+
 ElfW(Addr) _dl_base_addr;
 int __libc_enable_secure;
 int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
@@ -167,6 +170,12 @@ _dl_sysdep_start (void **start_argptr,
        will see this new value and not clobber our data.  */
     __sbrk (_dl_pagesize - ((&_end - (void *) 0) & (_dl_pagesize - 1)));
 
+  /* If this is a SUID program we make sure that FDs 0, 1, and 2 are
+     allocated.  If necessary we are doing it ourself.  If it is not
+     possible we stop the program.  */
+  if (__builtin_expect (__libc_enable_secure, 0))
+    __libc_check_standard_fds ();
+
   (*dl_main) (phdr, phnum, &user_entry);
   return user_entry;
 }