From b49865be8e798e567a23c01f188546aef514ba06 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 8 Sep 2011 00:00:01 -0400 Subject: Use O_CLOEXEC when loading objects in ld.so --- elf/dl-load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'elf') diff --git a/elf/dl-load.c b/elf/dl-load.c index 7d7008dd75..e8d0401f24 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1706,7 +1706,7 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader, #endif /* Open the file. We always open files read-only. */ - int fd = __open (name, O_RDONLY); + int fd = __open (name, O_RDONLY | O_CLOEXEC); if (fd != -1) { ElfW(Ehdr) *ehdr; -- cgit 1.4.1