summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--NEWS3
-rw-r--r--include/stdlib.h1
-rw-r--r--misc/Versions1
-rw-r--r--misc/mktemp.c3
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sem_open.c2
7 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 78ab4abaad..248e8df125 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-16  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #14327]
+	* include/stdlib.h (__mktemp): Add declaration.
+	* misc/mktemp.c (__mktemp): Renamed from mktemp, add weak alias.
+	* misc/Versions (GLIBC_PRIVATE): Add __mktemp.
+
 2013-01-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
         * sysdeps/ieee754/dbl-64/atnat.h: Remove constant value
diff --git a/NEWS b/NEWS
index 1cdc37a215..55f65fd686 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,8 @@ Version 2.18
 
 * The following bugs are resolved with this release:
 
-  13951, 14200, 14317, 14964, 14981, 14982, 14985, 14994, 14996, 15003.
+  13951, 14200, 14317, 14327, 14964, 14981, 14982, 14985, 14994, 14996,
+  15003.
 
 
 Version 2.17
diff --git a/include/stdlib.h b/include/stdlib.h
index d45b2f02de..2e536641b9 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -77,6 +77,7 @@ extern struct drand48_data __libc_drand48_data attribute_hidden;
 extern int __setenv (const char *__name, const char *__value, int __replace);
 extern int __unsetenv (const char *__name);
 extern int __clearenv (void);
+extern char *__mktemp (char *__template) __THROW __nonnull ((1));
 extern char *__canonicalize_file_name (const char *__name);
 extern char *__realpath (const char *__name, char *__resolved);
 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
diff --git a/misc/Versions b/misc/Versions
index 64632f0bfa..ec5aea7b52 100644
--- a/misc/Versions
+++ b/misc/Versions
@@ -151,6 +151,7 @@ libc {
   }
   GLIBC_PRIVATE {
     __madvise;
+    __mktemp;
     __libc_ifunc_impl_list;
   }
 }
diff --git a/misc/mktemp.c b/misc/mktemp.c
index 9886c5d751..55421fd74a 100644
--- a/misc/mktemp.c
+++ b/misc/mktemp.c
@@ -22,7 +22,7 @@
    The last six characters of TEMPLATE must be "XXXXXX";
    they are replaced with a string that makes the filename unique.  */
 char *
-mktemp (template)
+__mktemp (template)
      char *template;
 {
   if (__gen_tempname (template, 0, 0, __GT_NOCREATE) < 0)
@@ -31,5 +31,6 @@ mktemp (template)
 
   return template;
 }
+weak_alias (__mktemp, mktemp)
 
 link_warning (mktemp, "the use of `mktemp' is dangerous, better use `mkstemp'")
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 4aacc17e99..c4f6c630cc 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-16  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #14327]
+	* sem_open.c (sem_open): Use __mktemp instead of mktemp.
+
 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
 
 	* allocatestack.c (allocate_stack): Add comment. Remove assert
diff --git a/nptl/sem_open.c b/nptl/sem_open.c
index 5bc56c5bd9..83b2fdf472 100644
--- a/nptl/sem_open.c
+++ b/nptl/sem_open.c
@@ -329,7 +329,7 @@ sem_open (const char *name, int oflag, ...)
 	     since the file must be opened with a specific mode.  The
 	     mode cannot later be set since then we cannot apply the
 	     file create mask.  */
-	  if (mktemp (tmpfname) == NULL)
+	  if (__mktemp (tmpfname) == NULL)
 	    return SEM_FAILED;
 
 	  /* Open the file.  Make sure we do not overwrite anything.  */