From 84c3d89f1a3fc7ab7eff08134333a18efd142d28 Mon Sep 17 00:00:00 2001 From: guidog Date: Mon, 19 Jan 2009 21:13:19 +0000 Subject: don't try pkinit if pk_userid is non-null but empty git-svn-id: http://svn.gnome.org/svn/krb5-auth-dialog/trunk@124 517b70f8-ed25-0410-8bf6-f5db08f7b76e --- src/krb5-auth-dialog.c | 4 ++-- src/krb5-auth-gconf.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/krb5-auth-dialog.c b/src/krb5-auth-dialog.c index cc4a77c..13fbcee 100644 --- a/src/krb5-auth-dialog.c +++ b/src/krb5-auth-dialog.c @@ -513,7 +513,7 @@ ka_auth_pkinit(Krb5AuthApplet* applet, krb5_creds* creds) krb5_get_init_creds_opt *opts = NULL; krb5_error_code retval; - KA_DEBUG("pkinit with %s", applet->pk_userid); + KA_DEBUG("pkinit with '%s'", applet->pk_userid); if (!applet->pk_userid) return 0; @@ -573,7 +573,7 @@ grab_credentials (Krb5AuthApplet* applet) return retval; #if ENABLE_PKINIT - if (applet->pk_userid) { /* try pkinit */ + if (applet->pk_userid && strlen(applet->pk_userid)) { /* try pkinit */ #else if (0) { #endif diff --git a/src/krb5-auth-gconf.c b/src/krb5-auth-gconf.c index a11370c..7353471 100644 --- a/src/krb5-auth-gconf.c +++ b/src/krb5-auth-gconf.c @@ -118,7 +118,7 @@ ka_gconf_set_principal (GConfClient* client, Krb5AuthApplet* applet) if(!ka_gconf_get_string (client, KA_GCONF_KEY_PRINCIPAL, &applet->principal)) { applet->principal = g_strdup (g_get_user_name()); } - KA_DEBUG("Setting principal to %s", applet->principal); + KA_DEBUG("Setting principal to '%s'", applet->principal); // FIXME: need to send set-principal signal return TRUE; } @@ -131,7 +131,7 @@ ka_gconf_set_pk_userid (GConfClient* client, Krb5AuthApplet* applet) if(!ka_gconf_get_string (client, KA_GCONF_KEY_PK_USERID, &applet->pk_userid)) { applet->pk_userid = NULL; } - KA_DEBUG("Setting pk_userid to %s", applet->pk_userid ? applet->pk_userid : ""); + KA_DEBUG("Setting pk_userid to '%s'", applet->pk_userid ? applet->pk_userid : ""); return TRUE; } -- cgit v1.2.3