]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 9 Jan 2001 03:08:54 +0000 (03:08 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 9 Jan 2001 03:08:54 +0000 (03:08 +0000)
* elf/dl-profile.c (_dl_start_profile): Open the output file with
O_NOFOLLOW if possible.

ChangeLog
elf/dl-profile.c

index 25c3b56c881ef74b7b7e720b487792e94298a003..357853e4f45bd10eb6b736395a2a0ae693da57d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
 
+       * elf/dl-profile.c (_dl_start_profile): Open the output file with
+       O_NOFOLLOW if possible.
+
        * include/stdlib.h: Add __posix_openpt declaration.
        * stdlib/stdlib.h: Add posix_openpt declaration.
        * login/Versions: Add posix_openpt for GLIBC_2.2.1.
index 53b26d51a2dc548b5a8f30c37e29195805addf0c..9a7e7265dd97399461b50823536b1ce19533204d 100644 (file)
@@ -1,5 +1,5 @@
 /* Profiling of shared libraries.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    Based on the BSD mcount implementation.
@@ -256,7 +256,12 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
   *cp++ = '/';
   __stpcpy (__stpcpy (cp, _dl_profile), ".profile");
 
-  fd = __open (filename, O_RDWR | O_CREAT, 0666);
+#ifdef O_NOFOLLOW
+# define EXTRA_FLAGS | O_NOFOLLOW
+#else
+# define EXTRA_FLAGS
+#endif
+  fd = __open (filename, O_RDWR | O_CREAT EXTRA_FLAGS, 0666);
   if (fd == -1)
     {
       /* We cannot write the profiling data so don't do anything.  */