+2008-03-22 Colin Walters <walters@verbum.org>
authorwalters <walters@517b70f8-ed25-0410-8bf6-f5db08f7b76e>
Sat, 22 Mar 2008 04:26:58 +0000 (04:26 +0000)
committerwalters <walters@517b70f8-ed25-0410-8bf6-f5db08f7b76e>
Sat, 22 Mar 2008 04:26:58 +0000 (04:26 +0000)
+
+ * MAINTAINERS: New file.
+ * src/krb5-auth-dialog.c: Connect to session bus
+ to be sure we exit when the session dies.
+

git-svn-id: http://svn.gnome.org/svn/krb5-auth-dialog/trunk@70 517b70f8-ed25-0410-8bf6-f5db08f7b76e

ChangeLog
src/krb5-auth-dialog.c

index 7a9178aaff588c0751dc548718e964cc3ccdd3dd..45ce8f6f757d6dd49914274fe7703c9e68e2ea62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-22  Colin Walters  <walters@verbum.org>
+
+       * MAINTAINERS: New file.
+       * src/krb5-auth-dialog.c: Connect to session bus
+       to be sure we exit when the session dies.
+
 2006-10-29  Christopher Aillon  <caillon@redhat.com>
 
        * src/krb5-auth-dialog.c: Clean up the #ifdefs to
index 1f29c325bd8bc14df4f867a2a402434348011246..36387a9453de7c405aad1304196f957a4615db36 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <sys/wait.h>
 #include <string.h>
+#include <dbus/dbus-glib.h>
 
 
 #ifdef ENABLE_NETWORK_MANAGER
@@ -570,6 +571,8 @@ main (int argc, char *argv[])
 {
        GtkWidget *dialog;
        GnomeClient *client;
+       DBusGConnection *session;
+       GError *error = NULL;
        int run_auto = 0, run_always = 0;
        struct poptOption options[] = {
                {"auto", 'a', 0, &run_auto, 0,
@@ -591,6 +594,9 @@ main (int argc, char *argv[])
        client = gnome_master_client ();
        gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
 
+       /* Connect to the session bus so we get exit-on-disconnect semantics. */
+       session = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+
        if (run_always && !run_auto) {
                always_run++;
        }