freebsd-skq/libexec/rtld-elf
Jilles Tjoelker e194282943 rtld: Fix fd leak with parallel dlopen and fork/exec.
Rtld did not set FD_CLOEXEC on its internal file descriptors; therefore,
such a file descriptor may be passed to a process created by another thread
running in parallel to dlopen() or fdlopen().

No other threads are expected to be running during parsing of the hints
and libmap files but the file descriptors need not be passed to child
processes so add O_CLOEXEC there as well.

This change will break fdlopen() (as used by OpenPAM) on kernels without
F_DUPFD_CLOEXEC (added in July). Note that running new userland on old
kernels is not supported.

Reviewed by:	kib
2012-11-04 21:42:24 +00:00
..
amd64
arm Merging of projects/armv6, part 2 2012-08-15 03:07:41 +00:00
i386
ia64
mips
powerpc
powerpc64
sparc64
debug.c
debug.h
libmap.c rtld: Fix fd leak with parallel dlopen and fork/exec. 2012-11-04 21:42:24 +00:00
libmap.h
Makefile
malloc.c
map_object.c Parse notes only after object structure had been allocated. 2012-08-03 17:04:41 +00:00
rtld_lock.c
rtld_lock.h
rtld_printf.c
rtld_printf.h
rtld_tls.h
rtld.1 Import the DragonFly BSD commit 4f0bc915b65fcf5a23214f6d221d65c80be68ad4 2012-07-15 10:53:48 +00:00
rtld.c rtld: Fix fd leak with parallel dlopen and fork/exec. 2012-11-04 21:42:24 +00:00
rtld.h Import the DragonFly BSD commit 4f0bc915b65fcf5a23214f6d221d65c80be68ad4 2012-07-15 10:53:48 +00:00
Symbol.map
xmalloc.c