1 --- PackageKit-1.0.7/src/pk-dbus.c~ 2015-04-22 11:54:49.000000000 +0200
2 +++ PackageKit-1.0.7/src/pk-dbus.c 2015-08-02 12:57:29.398321174 +0200
7 + #include <systemd/sd-daemon.h>
8 #include <systemd/sd-login.h>
12 pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
14 gchar *session = NULL;
16 _cleanup_error_free_ GError *error = NULL;
19 _cleanup_variant_unref_ GVariant *value = NULL;
23 /* get session from systemd or ConsoleKit */
25 + if (sd_booted () > 0) {
26 session = pk_dbus_get_session_systemd (pid);
30 /* get session from ConsoleKit */
31 value = g_dbus_proxy_call_sync (dbus->priv->proxy_session,
32 "GetSessionForUnixProcess",
36 g_variant_get (value, "(o)", &session);