diff options
author | David Zeuthen <davidz@redhat.com> | 2009-01-16 14:41:48 -0500 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2009-01-16 14:41:48 -0500 |
commit | 796bfa1deb02ea2718baad6dc82430b7b8a9f4af (patch) | |
tree | 86153dbbef600d02b72218f6cb2ac5243462fa0a /src/polkit/polkitsubject.c | |
parent | 19eb8a92f6e61661cdec8350428b22519e61bd77 (diff) | |
download | polkit-796bfa1deb02ea2718baad6dc82430b7b8a9f4af.tar.gz |
add PolkitUnixSession and associcated functions
Diffstat (limited to 'src/polkit/polkitsubject.c')
-rw-r--r-- | src/polkit/polkitsubject.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/polkit/polkitsubject.c b/src/polkit/polkitsubject.c index 4732262..d7c5434 100644 --- a/src/polkit/polkitsubject.c +++ b/src/polkit/polkitsubject.c @@ -29,6 +29,7 @@ #include "polkitunixuser.h" #include "polkitunixgroup.h" #include "polkitunixprocess.h" +#include "polkitunixsession.h" #include "polkitsystembusname.h" #include "polkiterror.h" #include "polkitprivate.h" @@ -188,6 +189,11 @@ polkit_subject_new_for_real (_PolkitSubject *real) s = polkit_unix_process_new_full (egg_dbus_variant_get_uint (variant), egg_dbus_variant_get_uint64 (variant2)); } + else if (strcmp (kind, "unix-session") == 0) + { + variant = egg_dbus_hash_map_lookup (details, "session-id"); + s = polkit_unix_session_new (egg_dbus_variant_get_string (variant)); + } else if (strcmp (kind, "system-bus-name") == 0) { variant = egg_dbus_hash_map_lookup (details, "name"); @@ -236,6 +242,13 @@ polkit_subject_get_real (PolkitSubject *subject) "start-time", egg_dbus_variant_new_for_uint64 (polkit_unix_process_get_start_time (POLKIT_UNIX_PROCESS (subject)))); } + else if (POLKIT_IS_UNIX_SESSION (subject)) + { + kind = "unix-session"; + egg_dbus_hash_map_insert (details, + "session-id", + egg_dbus_variant_new_for_string (polkit_unix_session_get_session_id (POLKIT_UNIX_SESSION (subject)))); + } else if (POLKIT_IS_SYSTEM_BUS_NAME (subject)) { kind = "system-bus-name"; |