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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user