source3/lib/server_prefork.c set socket close on exec
authorGary Lockyer <gary@catalyst.net.nz>
Sun, 10 Dec 2017 20:46:07 +0000 (09:46 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 18 Dec 2017 03:38:20 +0000 (04:38 +0100)
commit215d6089c3b8cef53276bf808f82dd814711b2af
treed0f764056a0b3110a3edf814551596872ae95176
parent3a504d48c39a9dda97b3d02d63c247329631d168
source3/lib/server_prefork.c set socket close on exec

Set SOCKET_CLOEXEC on the sockets returned by accept.  This ensures that
the socket is unavailable to any child process created by system().
Making it harder for malicious code to set up a command channel,
as seen in the exploit for CVE-2015-0240

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/lib/server_prefork.c