aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwalters <walters@517b70f8-ed25-0410-8bf6-f5db08f7b76e>2008-03-22 04:26:58 +0000
committerwalters <walters@517b70f8-ed25-0410-8bf6-f5db08f7b76e>2008-03-22 04:26:58 +0000
commitc4e18dbd69b9c01c73c5757c860ee8373bd3d071 (patch)
tree2944051cd042033dc8558962fe5d2187f88117e6 /src
parentdfe810dbb5eb48585fd6f3c026f33c14b8b53dd8 (diff)
+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. + git-svn-id: http://svn.gnome.org/svn/krb5-auth-dialog/trunk@70 517b70f8-ed25-0410-8bf6-f5db08f7b76e
Diffstat (limited to 'src')
-rw-r--r--src/krb5-auth-dialog.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/krb5-auth-dialog.c b/src/krb5-auth-dialog.c
index 1f29c32..36387a9 100644
--- a/src/krb5-auth-dialog.c
+++ b/src/krb5-auth-dialog.c
@@ -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++;
}