[systemd-devel] Authenticating "sd bus" fails with Invalid argument

Simon McVittie smcv at collabora.com
Tue Jun 19 13:30:43 UTC 2018


On Tue, 19 Jun 2018 at 12:32:19 +0000, magnus at minimum.se wrote:
> The system is on a quite old kernel (3.18.44)
...
> At this point, things go wrong when
> recvmsg() is called on bus->input_fd with flags MSG_DONTWAIT|MSG_NOSIGNAL|
> MSG_CMSG_CLOEXEC. This syscall returns -22 (Invalid argument) which propagates
> all the way up to the user.

(I hate the way kernel/syscall/libc error-reporting isn't accompanied
by a human-readable message that could tell you *which* argument is
invalid... compare with GLib/D-Bus errors)

MSG_NOSIGNAL is meaningless for recvmsg()
<https://www.spinics.net/lists/linux-man/msg10557.html> so it's possible
that your older kernel doesn't allow it, but newer kernels allow and
ignore it? sd-bus should probably only use that flag for sendmsg()
and the rest of the send(2) family.

    smcv


More information about the systemd-devel mailing list