freebsd-dev/libexec
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
..
atf Add ATF to the build. This is may be a bit rought around the egdes, 2012-10-22 01:18:41 +00:00
atrun atrun(8): scale default load average limit with the number of CPUs 2012-10-30 19:46:00 +00:00
bootpd Make sure sections are sorted into conventional order. 2012-03-25 16:00:56 +00:00
comsat Bump date missed in r202756 2012-09-14 17:50:42 +00:00
fingerd
ftpd Bump date missed in r202756 2012-09-14 17:50:42 +00:00
getty mdoc: terminate quoted strings. 2012-03-26 15:18:14 +00:00
lukemftpd
mail.local
mknetid
pppoed
rbootd Rework all non-contributed files that use `struct timezone'. 2012-09-01 14:45:15 +00:00
revnetgroup Fix two instances of the file names generated by revnetgroup(8). 2012-08-18 09:26:51 +00:00
rlogind
rpc.rquotad
rpc.rstatd Rework all non-contributed files that use `struct timezone'. 2012-09-01 14:45:15 +00:00
rpc.rusersd More -Wmissing-variable-declarations fixes. 2012-10-20 10:33:15 +00:00
rpc.rwalld
rpc.sprayd
rshd None of these programs actually use auth.conf. 2012-06-11 16:18:39 +00:00
rtld-aout More -Wmissing-variable-declarations fixes. 2012-10-19 14:49:42 +00:00
rtld-elf rtld: Fix fd leak with parallel dlopen and fork/exec. 2012-11-04 21:42:24 +00:00
save-entropy 1. Use install -d to create the entropy_dir if missing so that we can do it 2012-09-04 16:00:51 +00:00
smrsh
talkd More -Wmissing-variable-declarations fixes. 2012-10-20 10:33:15 +00:00
tcpd
telnetd
tftp-proxy
tftpd Check the return error of set[e][ug]id. While this can never fail in the 2012-10-22 03:07:05 +00:00
ulog-helper Do a better job at determining the username of the login session. 2012-04-19 21:12:08 +00:00
ypxfr
Makefile Add ATF to the build. This is may be a bit rought around the egdes, 2012-10-22 01:18:41 +00:00
Makefile.inc