Module Name: src Committed By: christos Date: Tue Sep 16 01:30:28 UTC 2014
Modified Files: src/lib/libc/nls: catopen.c Log Message: belt-n-suspenders, close on exec catalog files. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libc/nls/catopen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/nls/catopen.c diff -u src/lib/libc/nls/catopen.c:1.32 src/lib/libc/nls/catopen.c:1.33 --- src/lib/libc/nls/catopen.c:1.32 Mon Aug 19 04:03:34 2013 +++ src/lib/libc/nls/catopen.c Mon Sep 15 21:30:28 2014 @@ -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 @@ load_msgcat(const char *path) _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) {