source3/rpc_server/rpc_server.c set socket close on exec
authorGary Lockyer <gary@catalyst.net.nz>
Sun, 10 Dec 2017 20:39:43 +0000 (09:39 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 18 Dec 2017 03:38:20 +0000 (04:38 +0100)
commit3a504d48c39a9dda97b3d02d63c247329631d168
tree32628dd8975ab8152c70bb532ec8bad0e2e40b16
parent34f7894719dccd701f2bd9eee5669ea8b1ab7473
source3/rpc_server/rpc_server.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/rpc_server/rpc_server.c