From 82af0fa8de8201803ac670fa0de7d702ce9f0f18 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Nov 2011 18:46:46 -0500 Subject: [PATCH] Use O_CLOEXEC in tzfile handling --- ChangeLog | 4 ++++ time/tzfile.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbbf5926a1..054fbc2ac2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-11-14 Ulrich Drepper + + * time/tzfile.c (__tzfile_read): Use "e" in fopen call. + 2011-11-14 Andreas Schwab * malloc/arena.c (arena_get2): Don't call reused_arena when diff --git a/time/tzfile.c b/time/tzfile.c index f4cba46e50..144e20ba2e 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006,2007,2009 +/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006,2007,2009,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -178,8 +178,8 @@ __tzfile_read (const char *file, size_t extra, char **extrap) } /* Note the file is opened with cancellation in the I/O functions - disabled. */ - f = fopen (file, "rc"); + disabled and if available FD_CLOEXEC set. */ + f = fopen (file, "rce"); if (f == NULL) goto ret_free_transitions; -- 2.43.5