Fix: kernel adds creds on recv with SO_PASSCRED unix socket option
When a Unix socket is configured with the SO_PASSCRED option, the caller
of recv() will receive a credential control message even if the sender
did not manually include it.
This caused problem with the old implementation of the
lttcomm_recv_fds_unix_sock function since it was expecting only one
control message for the fd passing. With the SO_PASSCRED, the kernel
will add a credential(SCM_CREDENTIALS) control message before the fd
passing(SCM_RIGHTS) control message (function scm_recv() [1]).
As a fix, make the receiver have a large enough before to include both
types of message and ignore the credential control message.
[1]: include/net/scm.h:111
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.025477 seconds and 4 git commands to generate.