From: Jérémie Galarneau Date: Sun, 28 May 2017 17:35:40 +0000 (-0400) Subject: Fix: explicitly send client credentials during handshake X-Git-Tag: v2.11.0-rc1~551 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=01ea340e0a3914f12a50875e6477bfd9a9eee099;hp=01ea340e0a3914f12a50875e6477bfd9a9eee099;p=lttng-tools.git 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 ---