source4/lib/socket/socket_ip.c set socket close on exec
authorGary Lockyer <gary@catalyst.net.nz>
Sun, 10 Dec 2017 21:03:45 +0000 (10:03 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 18 Dec 2017 07:49:57 +0000 (08:49 +0100)
commit416b7e93fc37bdf19ac52f3c9beb8b231d1cdd78
tree2313808fc50d2d2a82588e61d52de9b1f9f0d1f3
parent242aacb0e25c606ba1d003fb37e41d0b1b8c8e96
source4/lib/socket/socket_ip.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>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Dec 18 08:49:57 CET 2017 on sn-devel-144
source4/lib/socket/socket_ip.c