aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.cvsignore5
-rw-r--r--src/Makefile.am14
-rw-r--r--src/krb5-auth-applet.c83
-rw-r--r--src/krb5-auth-dialog.c49
-rw-r--r--src/krb5-auth-dialog.schemas.in39
-rw-r--r--src/krb5-auth-gconf-tools.c102
-rw-r--r--src/krb5-auth-gconf-tools.h41
-rw-r--r--src/krb5-auth-gconf.c135
-rw-r--r--src/org.gnome.KrbAuthDialog.service.in3
9 files changed, 368 insertions, 103 deletions
diff --git a/src/.cvsignore b/src/.cvsignore
new file mode 100644
index 0000000..b18d7e7
--- /dev/null
+++ b/src/.cvsignore
@@ -0,0 +1,5 @@
+Makefile
+Makefile.in
+krb5-auth-dialog
+krb5-auth-dialog.1
+krb5-auth-dialog.desktop
diff --git a/src/Makefile.am b/src/Makefile.am
index a0db9ec..43fd121 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -12,11 +12,18 @@ autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
schemadir = $(sysconfdir)/gconf/schemas
schema_in_files = $(PACKAGE).schemas.in
-schema_DATA = $(PACKAGE).schemas
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
%.schemas: $(srcdir)/%.schemas.in
sed -e "s,::PACKAGE::,$(PACKAGE)," < $< > $@
+servicedir = $(datadir)/dbus-1/services
+service_in_files = org.gnome.KrbAuthDialog.service.in
+service_DATA = $(service_in_files:.service.in=.service)
+
+$(service_DATA): $(service_in_files) Makefile
+ sed -e "s|\@BINDIR\@|$(bindir)|" $< > $@
+
krb5_auth_dialog_SOURCES = \
krb5-auth-dialog.c \
krb5-auth-dialog.h \
@@ -26,6 +33,8 @@ krb5_auth_dialog_SOURCES = \
krb5-auth-pwdialog.h \
krb5-auth-gconf.c \
krb5-auth-gconf.h \
+ krb5-auth-gconf-tools.c \
+ krb5-auth-gconf-tools.h \
krb5-auth-dbus.c \
krb5-auth-dbus.h \
dummy-strings.c
@@ -60,9 +69,10 @@ EXTRA_DIST = \
$(pkgdata_DATA) \
$(schema_in_files) \
$(autostart_in_files) \
+ $(service_in_files) \
krb5-auth-dialog.1.in
-CLEANFILES = $(schema_DATA)
+CLEANFILES = $(schema_DATA) $(service_DATA)
DISTCLEANFILES = \
krb5-auth-dialog.desktop \
krb5-auth-applet-dbus-glue.h
diff --git a/src/krb5-auth-applet.c b/src/krb5-auth-applet.c
index 34524df..daaef2e 100644
--- a/src/krb5-auth-applet.c
+++ b/src/krb5-auth-applet.c
@@ -43,6 +43,9 @@ enum
KA_PROP_PK_USERID,
KA_PROP_TRAYICON,
KA_PROP_PW_PROMPT_MINS,
+ KA_PROP_TGT_FORWARDABLE,
+ KA_PROP_TGT_PROXIABLE,
+ KA_PROP_TGT_RENEWABLE,
};
struct _KaApplet {
@@ -73,6 +76,9 @@ struct _KaAppletPrivate
char* principal; /* the principal to request */
gboolean renewable; /* credentials renewable? */
char* pk_userid; /* "userid" for pkint */
+ gboolean tgt_forwardable; /* request a forwardable ticket */
+ gboolean tgt_renewable; /* request a renewable ticket */
+ gboolean tgt_proxiable; /* request a proxiable ticket */
};
static void
@@ -106,6 +112,21 @@ ka_applet_set_property (GObject *object,
KA_DEBUG ("%s: %d", pspec->name, self->priv->pw_prompt_secs/60);
break;
+ case KA_PROP_TGT_FORWARDABLE:
+ self->priv->tgt_forwardable = g_value_get_boolean (value);
+ KA_DEBUG ("%s: %s", pspec->name, self->priv->tgt_forwardable ? "True" : "False");
+ break;
+
+ case KA_PROP_TGT_PROXIABLE:
+ self->priv->tgt_proxiable = g_value_get_boolean (value);
+ KA_DEBUG ("%s: %s", pspec->name, self->priv->tgt_proxiable ? "True" : "False");
+ break;
+
+ case KA_PROP_TGT_RENEWABLE:
+ self->priv->tgt_renewable = g_value_get_boolean (value);
+ KA_DEBUG ("%s: %s", pspec->name, self->priv->tgt_renewable ? "True" : "False");
+ break;
+
default:
/* We don't have any other property... */
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -139,6 +160,18 @@ ka_applet_get_property (GObject *object,
g_value_set_uint (value, self->priv->pw_prompt_secs / 60);
break;
+ case KA_PROP_TGT_FORWARDABLE:
+ g_value_set_boolean (value, self->priv->tgt_forwardable);
+ break;
+
+ case KA_PROP_TGT_PROXIABLE:
+ g_value_set_boolean (value, self->priv->tgt_proxiable);
+ break;
+
+ case KA_PROP_TGT_RENEWABLE:
+ g_value_set_boolean (value, self->priv->tgt_renewable);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -203,7 +236,7 @@ ka_applet_class_init(KaAppletClass *klass)
pspec = g_param_spec_string ("principal",
"Principal",
- "Get/Set Kerberos Principal",
+ "Get/Set Kerberos principal",
"",
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
g_object_class_install_property (object_class,
@@ -211,7 +244,7 @@ ka_applet_class_init(KaAppletClass *klass)
pspec);
pspec = g_param_spec_string ("pk-userid",
- "PKinit Identifier",
+ "PKinit identifier",
"Get/Set Pkinit identifier",
"",
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
@@ -229,13 +262,40 @@ ka_applet_class_init(KaAppletClass *klass)
pspec);
pspec = g_param_spec_uint ("pw-prompt-mins",
- "Password Prompting Interval",
- "Password Prompting Interval in Minutes",
+ "Password prompting interval",
+ "Password prompting interval in minutes",
0, G_MAXUINT, MINUTES_BEFORE_PROMPTING,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
g_object_class_install_property (object_class,
KA_PROP_PW_PROMPT_MINS,
pspec);
+
+ pspec = g_param_spec_boolean("tgt-forwardable",
+ "Forwardable ticket",
+ "wether to request forwardable tickets",
+ FALSE,
+ G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
+ g_object_class_install_property (object_class,
+ KA_PROP_TGT_FORWARDABLE,
+ pspec);
+
+ pspec = g_param_spec_boolean("tgt-proxiable",
+ "Proxiable ticket",
+ "wether to request proxiable tickets",
+ FALSE,
+ G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
+ g_object_class_install_property (object_class,
+ KA_PROP_TGT_PROXIABLE,
+ pspec);
+
+ pspec = g_param_spec_boolean("tgt-renewable",
+ "Renewable ticket",
+ "wether to request renewable tickets",
+ FALSE,
+ G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
+ g_object_class_install_property (object_class,
+ KA_PROP_TGT_RENEWABLE,
+ pspec);
}
@@ -372,6 +432,13 @@ ka_applet_menu_add_separator_item (GtkWidget* menu)
gtk_widget_show (menu_item);
}
+static void
+ka_applet_cb_preferences (GtkWidget* menuitem G_GNUC_UNUSED,
+ gpointer user_data G_GNUC_UNUSED)
+{
+ g_spawn_command_line_async ("krb5-auth-dialog-preferences", NULL);
+}
+
/* Free all resources and quit */
static void
@@ -421,6 +488,14 @@ ka_applet_create_context_menu (KaApplet* applet)
ka_applet_menu_add_separator_item (menu);
+ /* Preferences */
+ menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Preferences"));
+ g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (ka_applet_cb_preferences), applet);
+ image = gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+
+
/* About item */
menu_item = gtk_image_menu_item_new_with_mnemonic (_("_About"));
g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (ka_applet_cb_about_dialog), applet);
diff --git a/src/krb5-auth-dialog.c b/src/krb5-auth-dialog.c
index a45c480..c443cd3 100644
--- a/src/krb5-auth-dialog.c
+++ b/src/krb5-auth-dialog.c
@@ -378,9 +378,40 @@ out:
}
+/*
+ * set ticket options by looking at krb5.conf and gconf
+ */
+static void
+ka_set_ticket_options(KaApplet* applet,
+ krb5_get_init_creds_opt *out)
+{
+ gboolean flag;
+
+#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_DEFAULT_FLAGS
+ krb5_get_init_creds_opt_set_default_flags(kcontext, PACKAGE,
+ krb5_principal_get_realm(kcontext, kprincipal), out);
+#endif
+ g_object_get(applet, "tgt-forwardable", &flag, NULL);
+ if (flag)
+ krb5_get_init_creds_opt_set_forwardable(out, flag);
+ g_object_get(applet, "tgt-proxiable", &flag, NULL);
+ if (flag)
+ krb5_get_init_creds_opt_set_proxiable(out, flag);
+ g_object_get(applet, "tgt-renewable", &flag, NULL);
+ if (flag) {
+ krb5_deltat r = 3600*24*30; /* 1 month */
+ krb5_get_init_creds_opt_set_renew_life (out, r);
+ }
+}
+
+
+/*
+ * set ticket options
+ * by looking at krb5.conf, the passed in creds and gconf
+ */
static void
set_options_from_creds(const KaApplet* applet,
- krb5_context context G_GNUC_UNUSED,
+ krb5_context context,
krb5_creds *in,
krb5_get_init_creds_opt *out)
{
@@ -388,8 +419,8 @@ set_options_from_creds(const KaApplet* applet,
int flag;
#ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_DEFAULT_FLAGS
- krb5_get_init_creds_opt_set_default_flags(kcontext, PACKAGE,
- krb5_principal_get_realm(kcontext, kprincipal), out);
+ krb5_get_init_creds_opt_set_default_flags(context, PACKAGE,
+ krb5_principal_get_realm(context, kprincipal), out);
#endif
flag = get_cred_forwardable(in) != 0;
@@ -426,7 +457,7 @@ ka_auth_pkinit(KaApplet* applet, krb5_creds* creds, const char* pk_userid)
retval = krb5_get_init_creds_opt_alloc (kcontext, &opts);
if (retval)
goto out;
- set_options_from_creds (applet, kcontext, creds, opts);
+ ka_set_ticket_options (applet, opts);
retval = krb5_get_init_creds_opt_set_pkinit(kcontext, opts,
kprincipal,
@@ -461,7 +492,7 @@ ka_auth_password(KaApplet* applet, krb5_creds* creds)
retval = krb5_get_init_creds_opt_alloc (kcontext, &opts);
if (retval)
goto out;
- set_options_from_creds (applet, kcontext, creds, opts);
+ ka_set_ticket_options (applet, opts);
retval = krb5_get_init_creds_password(kcontext, creds, kprincipal,
NULL, auth_dialog_prompter, applet,
0, NULL, opts);
@@ -477,9 +508,7 @@ ka_parse_name(KaApplet* applet, krb5_context krbcontext, krb5_principal* kprinc)
krb5_error_code ret;
gchar *principal = NULL;
- g_object_get(applet, "principal", &principal,
- NULL);
-
+ g_object_get(applet, "principal", &principal, NULL);
ret = krb5_parse_name(krbcontext, principal,
kprinc);
@@ -773,8 +802,7 @@ ka_check_credentials (KaApplet *applet, const char* newprincipal)
int retval;
char* principal;
- g_object_get(applet, "principal", &principal,
- NULL);
+ g_object_get(applet, "principal", &principal, NULL);
if (strlen(newprincipal)) {
krb5_principal knewprinc;
@@ -817,7 +845,6 @@ gboolean
ka_grab_credentials (KaApplet* applet)
{
int retval;
- gboolean retry;
int success = FALSE;
KaPwDialog *pwdialog = ka_applet_get_pwdialog(applet);
diff --git a/src/krb5-auth-dialog.schemas.in b/src/krb5-auth-dialog.schemas.in
index 2a3a707..13b05b2 100644
--- a/src/krb5-auth-dialog.schemas.in
+++ b/src/krb5-auth-dialog.schemas.in
@@ -51,5 +51,44 @@
<long>Start prompting/displaying notifications that many minutes before expiry</long>
</locale>
</schema>
+
+ <schema>
+ <key>/schemas/apps/::PACKAGE::/forwardable</key>
+ <applyto>/apps/::PACKAGE::/forwardable</applyto>
+ <owner>::PACKAGE::</owner>
+ <type>bool</type>
+ <default>0</default>
+
+ <locale name="C">
+ <short>Forwardable ticket</short>
+ <long>Requested tickets should be forwardable</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/::PACKAGE::/renewable</key>
+ <applyto>/apps/::PACKAGE::/renewable</applyto>
+ <owner>::PACKAGE::</owner>
+ <type>bool</type>
+ <default>0</default>
+
+ <locale name="C">
+ <short>Renewable ticket</short>
+ <long>Requested tickets should be renewable</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/::PACKAGE::/proxiable</key>
+ <applyto>/apps/::PACKAGE::/proxiable</applyto>
+ <owner>::PACKAGE::</owner>
+ <type>bool</type>
+ <default>0</default>
+
+ <locale name="C">
+ <short>Proxiable ticket</short>
+ <long>Requested tickets should be proxiable</long>
+ </locale>
+ </schema>
</schemalist>
</gconfschemafile>
diff --git a/src/krb5-auth-gconf-tools.c b/src/krb5-auth-gconf-tools.c
new file mode 100644
index 0000000..fb67999
--- /dev/null
+++ b/src/krb5-auth-gconf-tools.c
@@ -0,0 +1,102 @@
+/* Krb5 Auth Applet -- Acquire and release kerberos tickets
+ *
+ * (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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+#include "config.h"
+
+#include <gconf/gconf-client.h>
+#include <krb5-auth-gconf-tools.h>
+
+gboolean
+ka_gconf_get_string (GConfClient* client,
+ const char* key,
+ char** value)
+{
+ GError* error = NULL;
+ gboolean success = FALSE;
+ GConfValue* gc_value;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (*value == NULL, FALSE);
+
+ if ((gc_value = gconf_client_get (client, key, &error))) {
+ if (gc_value->type == GCONF_VALUE_STRING) {
+ *value = g_strdup (gconf_value_get_string (gc_value));
+ success = TRUE;
+ } else if (error) {
+ g_print (error->message);
+ g_error_free (error);
+ }
+ gconf_value_free (gc_value);
+ }
+ return success;
+}
+
+
+gboolean
+ka_gconf_get_int (GConfClient* client,
+ const char* key,
+ int* value)
+{
+ GError* error = NULL;
+ gboolean success = FALSE;
+ GConfValue* gc_value;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ if ((gc_value = gconf_client_get (client, key, &error)))
+ {
+ if (gc_value->type == GCONF_VALUE_INT) {
+ *value = gconf_value_get_int (gc_value);
+ success = TRUE;
+ } else if (error) {
+ g_print (error->message);
+ g_error_free (error);
+ }
+ gconf_value_free (gc_value);
+ }
+ return success;
+}
+
+
+gboolean
+ka_gconf_get_bool (GConfClient* client,
+ const char* key,
+ gboolean* value)
+{
+ GError* error = NULL;
+ gboolean success = FALSE;
+ GConfValue* gc_value;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ if ((gc_value = gconf_client_get (client, key, &error))) {
+ if (gc_value->type == GCONF_VALUE_BOOL) {
+ *value = gconf_value_get_bool (gc_value);
+ success = TRUE;
+ } else if (error) {
+ g_print (error->message);
+ g_error_free (error);
+ }
+ gconf_value_free (gc_value);
+ }
+ return success;
+}
+
diff --git a/src/krb5-auth-gconf-tools.h b/src/krb5-auth-gconf-tools.h
new file mode 100644
index 0000000..9786b2f
--- /dev/null
+++ b/src/krb5-auth-gconf-tools.h
@@ -0,0 +1,41 @@
+/* Krb5 Auth Applet -- Acquire and release kerberos tickets
+ *
+ * (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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef KRB5_AUTH_GCONF_TOOLS_H
+#define KRB5_AUTH_GCONF_TOOLS_H
+
+#include "config.h"
+
+#include <gconf/gconf-client.h>
+
+#define KA_GCONF_PATH "/apps/" PACKAGE
+#define KA_GCONF_KEY_PRINCIPAL KA_GCONF_PATH "/principal"
+#define KA_GCONF_KEY_PK_USERID KA_GCONF_PATH "/pk_userid"
+#define KA_GCONF_KEY_PROMPT_MINS KA_GCONF_PATH "/prompt_minutes"
+#define KA_GCONF_KEY_SHOW_TRAYICON KA_GCONF_PATH "/show_trayicon"
+#define KA_GCONF_KEY_FORWARDABLE KA_GCONF_PATH "/forwardable"
+#define KA_GCONF_KEY_RENEWABLE KA_GCONF_PATH "/renewable"
+#define KA_GCONF_KEY_PROXIABLE KA_GCONF_PATH "/proxiable"
+
+gboolean ka_gconf_get_string (GConfClient* client, const char* key, char** value);
+gboolean ka_gconf_get_int (GConfClient* client, const char* key, int* value);
+gboolean ka_gconf_get_bool (GConfClient* client, const char* key, gboolean* value);
+
+#endif
diff --git a/src/krb5-auth-gconf.c b/src/krb5-auth-gconf.c
index 1481591..25eb555 100644
--- a/src/krb5-auth-gconf.c
+++ b/src/krb5-auth-gconf.c
@@ -22,94 +22,9 @@
#include <gconf/gconf-client.h>
#include "krb5-auth-applet.h"
+#include "krb5-auth-gconf-tools.h"
#include "krb5-auth-gconf.h"
-#define KA_GCONF_PATH "/apps/" PACKAGE
-#define KA_GCONF_KEY_PRINCIPAL KA_GCONF_PATH "/principal"
-#define KA_GCONF_KEY_PK_USERID KA_GCONF_PATH "/pk_userid"
-#define KA_GCONF_KEY_PROMPT_MINS KA_GCONF_PATH "/prompt_minutes"
-#define KA_GCONF_KEY_SHOW_TRAYICON KA_GCONF_PATH "/show_trayicon"
-
-static gboolean
-ka_gconf_get_string (GConfClient* client,
- const char* key,
- char** value)
-{
- GError* error = NULL;
- gboolean success = FALSE;
- GConfValue* gc_value;
-
- g_return_val_if_fail (key != NULL, FALSE);
- g_return_val_if_fail (*value == NULL, FALSE);
-
- if ((gc_value = gconf_client_get (client, key, &error))) {
- if (gc_value->type == GCONF_VALUE_STRING) {
- *value = g_strdup (gconf_value_get_string (gc_value));
- success = TRUE;
- } else if (error) {
- g_print (error->message);
- g_error_free (error);
- }
- gconf_value_free (gc_value);
- }
- return success;
-}
-
-
-static gboolean
-ka_gconf_get_int (GConfClient* client,
- const char* key,
- int* value)
-{
- GError* error = NULL;
- gboolean success = FALSE;
- GConfValue* gc_value;
-
- g_return_val_if_fail (key != NULL, FALSE);
- g_return_val_if_fail (value != NULL, FALSE);
-
- if ((gc_value = gconf_client_get (client, key, &error)))
- {
- if (gc_value->type == GCONF_VALUE_INT) {
- *value = gconf_value_get_int (gc_value);
- success = TRUE;
- } else if (error) {
- g_print (error->message);
- g_error_free (error);
- }
- gconf_value_free (gc_value);
- }
- return success;
-}
-
-
-static gboolean
-ka_gconf_get_bool (GConfClient* client,
- const char* key,
- gboolean* value)
-{
- GError* error = NULL;
- gboolean success = FALSE;
- GConfValue* gc_value;
-
- g_return_val_if_fail (key != NULL, FALSE);
- g_return_val_if_fail (value != NULL, FALSE);
-
- if ((gc_value = gconf_client_get (client, key, &error)))
- {
- if (gc_value->type == GCONF_VALUE_BOOL) {
- *value = gconf_value_get_bool (gc_value);
- success = TRUE;
- } else if (error) {
- g_print (error->message);
- g_error_free (error);
- }
- gconf_value_free (gc_value);
- }
- return success;
-}
-
-
static gboolean
ka_gconf_set_principal (GConfClient* client, KaApplet* applet)
{
@@ -164,6 +79,45 @@ ka_gconf_set_show_trayicon (GConfClient* client, KaApplet* applet)
}
+static gboolean
+ka_gconf_set_tgt_forwardable (GConfClient* client, KaApplet* applet)
+{
+ gboolean forwardable = FALSE;
+
+ if(!ka_gconf_get_bool(client, KA_GCONF_KEY_FORWARDABLE, &forwardable)) {
+ forwardable = TRUE;
+ }
+ g_object_set(applet, "tgt-forwardable", forwardable, NULL);
+ return TRUE;
+}
+
+
+static gboolean
+ka_gconf_set_tgt_renewable (GConfClient* client, KaApplet* applet)
+{
+ gboolean renewable = FALSE;
+
+ if(!ka_gconf_get_bool(client, KA_GCONF_KEY_RENEWABLE, &renewable)) {
+ renewable = TRUE;
+ }
+ g_object_set(applet, "tgt-renewable", renewable, NULL);
+ return TRUE;
+}
+
+
+static gboolean
+ka_gconf_set_tgt_proxiable (GConfClient* client, KaApplet* applet)
+{
+ gboolean proxiable = FALSE;
+
+ if(!ka_gconf_get_bool(client, KA_GCONF_KEY_PROXIABLE, &proxiable)) {
+ proxiable = TRUE;
+ }
+ g_object_set(applet, "tgt-proxiable", proxiable, NULL);
+ return TRUE;
+}
+
+
static void
ka_gconf_key_changed_callback (GConfClient* client,
guint cnxn_id G_GNUC_UNUSED,
@@ -186,6 +140,12 @@ ka_gconf_key_changed_callback (GConfClient* client,
ka_gconf_set_show_trayicon (client, applet);
} else if (g_strcmp0 (key, KA_GCONF_KEY_PK_USERID) == 0) {
ka_gconf_set_pk_userid (client, applet);
+ } else if (g_strcmp0 (key, KA_GCONF_KEY_FORWARDABLE) == 0) {
+ ka_gconf_set_tgt_forwardable (client, applet);
+ } else if (g_strcmp0 (key, KA_GCONF_KEY_RENEWABLE) == 0) {
+ ka_gconf_set_tgt_renewable (client, applet);
+ } else if (g_strcmp0 (key, KA_GCONF_KEY_PROXIABLE) == 0) {
+ ka_gconf_set_tgt_proxiable (client, applet);
} else
g_warning("Received notification for unknown gconf key %s", key);
return;
@@ -216,6 +176,9 @@ ka_gconf_init (KaApplet* applet,
ka_gconf_set_prompt_mins (client, applet);
ka_gconf_set_show_trayicon (client, applet);
ka_gconf_set_pk_userid(client, applet);
+ ka_gconf_set_tgt_forwardable(client, applet);
+ ka_gconf_set_tgt_renewable(client, applet);
+ ka_gconf_set_tgt_proxiable(client, applet);
success = TRUE;
out:
diff --git a/src/org.gnome.KrbAuthDialog.service.in b/src/org.gnome.KrbAuthDialog.service.in
new file mode 100644
index 0000000..f49546a
--- /dev/null
+++ b/src/org.gnome.KrbAuthDialog.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.KrbAuthDialog
+Exec=@BINDIR@/krb5-auth-dialog -A
bgstack15