[git commit master] ldso: use O_CLOEXEC for cache file

Mike Frysinger vapier at gentoo.org
Thu Oct 8 02:53:39 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=3cf9c9a2969ddc9927401a4cf9d8d498ec3d8313
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 ldso/ldso/dl-elf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index d1cf2d7..e4086d5 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -51,7 +51,7 @@ int _dl_map_cache(void)
 		return 0;
 
 	if (_dl_stat(LDSO_CACHE, &st)
-	    || (fd = _dl_open(LDSO_CACHE, O_RDONLY, 0)) < 0) {
+	    || (fd = _dl_open(LDSO_CACHE, O_RDONLY|O_CLOEXEC, 0)) < 0) {
 		_dl_cache_addr = MAP_FAILED;	/* so we won't try again */
 		return -1;
 	}
-- 
1.6.3.3



More information about the uClibc-cvs mailing list