Fix: explicitly send client credentials during handshake
The notification client does not send its credentials during
the handshake. However, the session daemon will still receive
them except in very rare, and hard to reproduce, cases.
It appears that the kernel will provide the credential cmsg
regardless of whether or not the client has actually sent them.
Inspecting the kernel source (af_unix.c) seems to indicate that
the credentials will be passed on sendmsg whenever one of the
sockets involved has set the SO_PASSCRED flag. It also seems to
maintain compatibility with applications that expect write() to
pass credentials by default. This explains why the explicit
passing didn't seem needed.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.025399 seconds and 4 git commands to generate.