krb5-auth-dialog r124 - in trunk: . src



Author: guidog
Date: Mon Jan 19 21:13:19 2009
New Revision: 124
URL: http://svn.gnome.org/viewvc/krb5-auth-dialog?rev=124&view=rev

Log:
don't try pkinit if pk_userid is non-null but empty

Modified:
   trunk/ChangeLog
   trunk/src/krb5-auth-dialog.c
   trunk/src/krb5-auth-gconf.c

Modified: trunk/src/krb5-auth-dialog.c
==============================================================================
--- trunk/src/krb5-auth-dialog.c	(original)
+++ trunk/src/krb5-auth-dialog.c	Mon Jan 19 21:13:19 2009
@@ -513,7 +513,7 @@
 	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 @@
 		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

Modified: trunk/src/krb5-auth-gconf.c
==============================================================================
--- trunk/src/krb5-auth-gconf.c	(original)
+++ trunk/src/krb5-auth-gconf.c	Mon Jan 19 21:13:19 2009
@@ -118,7 +118,7 @@
 	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 @@
 	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 : "<disabled>");
+	KA_DEBUG("Setting pk_userid to '%s'", applet->pk_userid ? applet->pk_userid : "<disabled>");
 	return TRUE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]