mirror of git://sourceware.org/git/glibc.git
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>
|
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
|
* elf/dl-libc.c (dlerror_run): Pass back error code from
|
||||||
dl_catch_error.
|
dl_catch_error.
|
||||||
|
|
||||||
|
|
|
@ -1706,7 +1706,7 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Open the file. We always open files read-only. */
|
/* 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)
|
if (fd != -1)
|
||||||
{
|
{
|
||||||
ElfW(Ehdr) *ehdr;
|
ElfW(Ehdr) *ehdr;
|
||||||
|
|
Loading…
Reference in New Issue