Fix: set FD_CLOEXEC on incoming FDs.
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 2 Mar 2020 19:21:33 +0000 (14:21 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 4 Mar 2020 15:08:54 +0000 (10:08 -0500)
commit18ef3e51fcd38bc6ca0f67fa23559186eba8fb33
treeab11f3541567454e74901db9e4cc6417054081cb
parent38b48c9bcc752ce5eb32ea2d131c0a10027ea8dd
Fix: set FD_CLOEXEC on incoming FDs.

The stream shm FDs are allocated by the consumer process, and then
passed to the applications over unix sockets. When opening those
file descriptors on reception, the FD_CLOEXEC flag is not set.

In a fork + exec scenario, parent process streams shm FDs and channel
wake FDs are present in the resulting child process.

Set FD_CLOEXEC on reception (ustcomm_recv_fds_unix_sock) to
prevent such scenario.

Change-Id: Id58077b272be9c1ab239846639ffd8103b3d50f1
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-comm/lttng-ust-comm.c
libringbuffer/shm.c
This page took 0.025373 seconds and 5 git commands to generate.