[systemd-devel] [PATCH 4/4] Always use recvmsg with MSG_CMSG_CLOEXEC
Lennart Poettering
lennart at poettering.net
Thu Feb 12 02:47:08 PST 2015
On Tue, 10.02.15 21:26, Lennart Poettering (lennart at poettering.net) wrote:
> On Tue, 10.02.15 12:06, Cristian RodrÃguez (crrodriguez at opensuse.org) wrote:
>
> Well, all but two of these recvmsg() invocations apply to network
> sockets, which cannot receive fds, hence specifying the flag is kinda
> pointless...
>
> For the other two cases we should probably close all fds we
> receive... I mean receiving them and not doing anything with them is
> not any worse or better as doing so and having O_CLOEXEC set for
> them...
>
> That said, I think it probably makes sense to enforce the general rule
> that recvmsg() must be invoked with MSG_CMSG_CLOEXEC, hence I applied
> your patch and updated the CODING_STYLE to mention this.
And reverted again. It's not OK apparently to pass MSG_CMSG_CLOEXEC
for to recvmsg() on raw sockets and suchlike...
BTW: It is greatly appreciated to test patches before submitting
them. Thanks!
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list