diff options
author | Guido Günther <agx@sigxcpu.org> | 2009-03-01 15:00:22 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2009-03-01 15:00:22 +0100 |
commit | 80cd3a95eff65a62dd09b09c35581b258a20af52 (patch) | |
tree | b068c4c4feffffb06842d26da65b148c3e5ab57d /src/krb5-auth-dbus.c | |
parent | document changes and release 0.8-3 (diff) | |
parent | Imported Upstream version 0.8+svn128 (diff) | |
download | krb5-auth-dialog-80cd3a95eff65a62dd09b09c35581b258a20af52.tar.gz krb5-auth-dialog-80cd3a95eff65a62dd09b09c35581b258a20af52.tar.bz2 krb5-auth-dialog-80cd3a95eff65a62dd09b09c35581b258a20af52.zip |
Merge commit 'upstream/0.8+svn128'
Diffstat (limited to 'src/krb5-auth-dbus.c')
-rw-r--r-- | src/krb5-auth-dbus.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/krb5-auth-dbus.c b/src/krb5-auth-dbus.c index f658c8d..b4c8742 100644 --- a/src/krb5-auth-dbus.c +++ b/src/krb5-auth-dbus.c @@ -1,6 +1,6 @@ /* Krb5 Auth Applet -- Acquire and release kerberos tickets * - * (C) 2008 Guido Guenther <agx@sigxcpu.org> + * (C) 2008,2009 Guido Guenther <agx@sigxcpu.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,13 +23,38 @@ #include <dbus/dbus-glib.h> #include "krb5-auth-applet.h" #include "krb5-auth-dbus.h" +#include "krb5-auth-applet-dbus-glue.h" + +static DBusGConnection *session; + +gboolean +ka_dbus_acquire_tgt (KaApplet *applet, + const gchar *principal, DBusGMethodInvocation *context) +{ + gboolean success; + + KA_DEBUG("Getting TGT for '%s'", principal); + success = ka_check_credentials(applet, principal); + dbus_g_method_return(context, success); + return TRUE; +} + + +gboolean +ka_dbus_service(KaApplet* applet) +{ + dbus_g_connection_register_g_object (session, + "/org/gnome/KrbAuthDialog", + G_OBJECT(applet)); + return TRUE; +} + gboolean ka_dbus_connect(unsigned int* status) { guint request_name_reply; unsigned int flags; - DBusGConnection *session; DBusGProxy *bus_proxy; GError* error = NULL; @@ -46,6 +71,9 @@ ka_dbus_connect(unsigned int* status) "/org/freedesktop/DBus", "org.freedesktop.DBus"); + dbus_g_object_type_install_info(KA_TYPE_APPLET, + &dbus_glib_krb5_auth_dialog_object_info); + if (!dbus_g_proxy_call (bus_proxy, "RequestName", &error, |