Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/nls belt-n-suspenders, close on exec catalog files.



details:   https://anonhg.NetBSD.org/src/rev/b5b2b5264848
branches:  trunk
changeset: 802466:b5b2b5264848
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Sep 16 01:30:28 2014 +0000

description:
belt-n-suspenders, close on exec catalog files.

diffstat:

 lib/libc/nls/catopen.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 43ada00194a0 -r b5b2b5264848 lib/libc/nls/catopen.c
--- a/lib/libc/nls/catopen.c    Tue Sep 16 01:30:00 2014 +0000
+++ b/lib/libc/nls/catopen.c    Tue Sep 16 01:30:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: catopen.c,v 1.32 2013/08/19 08:03:34 joerg Exp $       */
+/*     $NetBSD: catopen.c,v 1.33 2014/09/16 01:30:28 christos Exp $    */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: catopen.c,v 1.32 2013/08/19 08:03:34 joerg Exp $");
+__RCSID("$NetBSD: catopen.c,v 1.33 2014/09/16 01:30:28 christos Exp $");
 
 #define _NLS_PRIVATE
 #define __SETLOCALE_SOURCE__
@@ -163,7 +163,7 @@
 
        _DIAGASSERT(path != NULL);
 
-       if ((fd = open(path, O_RDONLY)) == -1)
+       if ((fd = open(path, O_RDONLY|O_CLOEXEC)) == -1)
                return (nl_catd)-1;
 
        if (fstat(fd, &st) != 0) {



Home | Main Index | Thread Index | Old Index