mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-19 13:40:59 +08:00
Use O_CLOEXEC when loading objects in ld.so
This commit is contained in:
parent
fdc86bc9a8
commit
b49865be8e
@ -1,5 +1,7 @@
|
||||
2011-09-07 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* elf/dl-load.c (open_verify): Use O_CLOEXEC.
|
||||
|
||||
* elf/dl-libc.c (dlerror_run): Pass back error code from
|
||||
dl_catch_error.
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user