Passing FDs to activatable service

Ernestas Kulik ernestas.kulik at gmail.com
Thu Mar 14 09:08:08 UTC 2019


Hi,

I have a minor issue with passing FDs to a D-Bus service and would
love some pointers, if any.

To set the scene: ABRT has a bus-activatable service (abrt-dbus, sits
on the system bus) that allows clients to manipulate problem
directories; that particular API is consumed by yet another daemon
(reportd, which in turn currently only has WIP support in Cockpit) to
copy files over to its own cache (by calling ReadElements) and to
later copy them back (by calling SaveElements). Both of them are
implemented using GDBus.

All those things work as one would expect, except for one particular
case - running reportd as root, letting it activate abrt-dbus and
calling SaveElements with a bunch of FDs (it makes sure to not go over
16). abrt-dbus receives the message with the UNIX_FDS header set
accordingly, but the actual FDs never seem to arrive. ReadElements
seems to always work fine, and SaveElements also works if I run
abrt-dbus from a root shell.

What could possibly be the reason for FD passing to fail like this?



More information about the dbus mailing list