[PolicyKit-gnome] Connect to the session bus
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [PolicyKit-gnome] Connect to the session bus
- Date: Tue, 1 Mar 2011 15:45:02 +0000 (UTC)
commit 766ee527bbf82f97a750f01a5728f62393c3ebb0
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Mar 1 10:43:51 2011 -0500
Connect to the session bus
This is a 'poor mans session management' to prevent the authentication
agent from leaking out of gdms login session.
https://bugzilla.gnome.org/show_bug.cgi?id=643551
src/main.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index b02b8f7..496bbc7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,6 +43,7 @@ main (int argc, char **argv)
GMainLoop *loop;
PolkitAgentListener *listener;
GError *error;
+ GDBusConnection *session_bus_connection;
g_type_init ();
gtk_init (&argc, &argv);
@@ -92,6 +93,11 @@ main (int argc, char **argv)
goto out;
}
+ /* Poor mans session management - connect to the session bus
+ * so we get killed when it goes away
+ */
+ session_bus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+
g_main_loop_run (loop);
ret = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]