--- polkit-gnome-0.100/src/main.c	2011-02-21 16:32:54.000000000 -0500
+++ polkit-gnome-hacked/src/main.c	2011-02-28 22:24:41.635647796 -0500
@@ -43,6 +43,7 @@
   GMainLoop *loop;
   PolkitAgentListener *listener;
   GError *error;
+  GDBusConnection *session_bus_connection;
 
   g_type_init ();
   gtk_init (&argc, &argv);
@@ -92,6 +93,11 @@
       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;
