GssPeerManagerDBus — D-Bus peer management and notification (implementation)

Stability Level

Stable, unless otherwise indicated


Types and Values


#include <libgsystemservice/peer-manager-dbus.h>


An implementation of the GssPeerManager interface which draws its data from the D-Bus daemon. This is the only expected runtime implementation of the interface, and has only been split out from the interface to allow for easier unit testing of anything which uses it.

The credentials of a peer are retrieved from the D-Bus daemon using GetConnectionCredentials, and reading /proc/$pid/cmdline to get the absolute path to the executable for each peer, which we use as an identifier for it. This is not atomic or particularly trusted, as PIDs can be reused in the time it takes us to query the information, and processes can modify their own cmdline file, but without an LSM enabled in the kernel and dbus-daemon, it’s the best we can do for identifying processes.


gss_peer_manager_dbus_new ()

GssPeerManagerDBus *
gss_peer_manager_dbus_new (GDBusConnection *connection);

Create a GssPeerManagerDBus object to wrap the given existing connection .



a GDBusConnection



a new GssPeerManagerDBus wrapping connection .

[transfer full]

Since: 0.1.0

Types and Values


typedef struct _GssPeerManagerDBus GssPeerManagerDBus;

An implementation of GssPeerManager.

Since: 0.1.0