summaryrefslogtreecommitdiffstats
path: root/usr.sbin/btxld
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2012-11-04 21:42:24 +0000
committerjilles <jilles@FreeBSD.org>2012-11-04 21:42:24 +0000
commitd793145a726ef848e5e79be78b79e4e0f54cd2cf (patch)
tree969ce31ca989f0ab57d7d234f716e31b0d9b96db /usr.sbin/btxld
parent01c2c225d270083238186edecb2d6f9202461c0e (diff)
downloadFreeBSD-src-d793145a726ef848e5e79be78b79e4e0f54cd2cf.zip
FreeBSD-src-d793145a726ef848e5e79be78b79e4e0f54cd2cf.tar.gz
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
Diffstat (limited to 'usr.sbin/btxld')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud