Fix: runas worker attempts to send invalid fd to master
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 6 Sep 2018 22:11:25 +0000 (18:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 6 Sep 2018 22:14:34 +0000 (18:14 -0400)
commitca9eb99452cf7590a034360e79fc885b8a9dafe9
treec560d5cf1a4c67b00834ca733aa774bfe7aad8e5
parent938c57de605e65da12654a4963e466eb3ea4a85e
Fix: runas worker attempts to send invalid fd to master

Commands which return a file descriptor (i.e. RUN_AS_OPEN) attempt
to send the resulting file descriptor even on failure. However,
this is not permitted by the UNIX socket interface.

As a result, skip the reception of the file descriptor payload
when a command fails. The 'master' end is also adapted to skip
the reception of the file descriptor in the case of an error.

A check has also been added to ensure that the 'master' end does
not attempt to send invalid file descriptors to the worker process.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/runas.c
This page took 0.026059 seconds and 5 git commands to generate.