1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Use O_CLOEXEC when loading objects in ld.so

This commit is contained in:
Ulrich Drepper
2011-09-08 00:00:01 -04:00
parent fdc86bc9a8
commit b49865be8e
2 changed files with 3 additions and 1 deletions

View File

@@ -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;