This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.14-530-gd62a820


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  d62a8200e1523a19c722eab97f54e34079fc3d0e (commit)
      from  116415f80eeb88e1973a160b8a2ee707d24481b4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d62a8200e1523a19c722eab97f54e34079fc3d0e

commit d62a8200e1523a19c722eab97f54e34079fc3d0e
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Nov 15 14:00:58 2011 -0500

    Use O_CLOEXEC in a few more places

diff --git a/ChangeLog b/ChangeLog
index 84cd700..c469e10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-15  Ulrich Drepper  <drepper@gmail.com>
+
+	* locale/loadarchive.c (_nl_load_locale_from_archive): Open files to
+	O_CLOEXEC.
+	* locale/loadlocale.c (_nl_load_locale): Likewise.
+
 2011-11-15  Andreas Schwab  <schwab@redhat.com>
 
 	* sysdeps/unix/sysv/linux/clock_gettime.c (SYSDEP_GETTIME_CPU)
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index 663202e..47a6127 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -1,5 +1,5 @@
 /* Code to load locale data from the locale archive file.
-   Copyright (C) 2002, 2003, 2005, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2005, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -203,7 +203,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
       archmapped = &headmap;
 
       /* The archive has never been opened.  */
-      fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
+      fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
       if (fd < 0)
 	/* Cannot open the archive, for whatever reason.  */
 	return NULL;
@@ -394,7 +394,8 @@ _nl_load_locale_from_archive (int category, const char **namep)
 	  if (fd == -1)
 	    {
 	      struct stat64 st;
-	      fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
+	      fd = open_not_cancel_2 (archfname,
+				      O_RDONLY|O_LARGEFILE|O_CLOEXEC);
 	      if (fd == -1)
 		/* Cannot open the archive, for whatever reason.  */
 		return NULL;
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 61e6f7f..d33a494 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -1,5 +1,5 @@
 /* Functions to read locale data files.
-   Copyright (C) 1996-2004, 2005, 2006, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1996-2004, 2005, 2006, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -173,7 +173,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
   file->decided = 1;
   file->data = NULL;
 
-  fd = open_not_cancel_2 (file->filename, O_RDONLY);
+  fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC);
   if (__builtin_expect (fd, 0) < 0)
     /* Cannot open the file.  */
     return;
@@ -201,7 +201,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
 		 _nl_category_names.str + _nl_category_name_idxs[category],
 		 _nl_category_name_sizes[category] + 1);
 
-      fd = open_not_cancel_2 (newp, O_RDONLY);
+      fd = open_not_cancel_2 (newp, O_RDONLY | O_CLOEXEC);
       if (__builtin_expect (fd, 0) < 0)
 	return;
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog            |    6 ++++++
 locale/loadarchive.c |    7 ++++---
 locale/loadlocale.c  |    6 +++---
 3 files changed, 13 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]