aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/0002-don-t-try-pkinit-if-pk_userid-is-non-null-but-empty.patch
blob: 79dfb623afebf015b7a8989342c3115a58b2eb93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From: guidog <guidog@517b70f8-ed25-0410-8bf6-f5db08f7b76e>
Date: Mon, 19 Jan 2009 21:13:19 +0000
Subject: [PATCH] don't try pkinit if pk_userid is non-null but empty

git-svn-id: svn+ssh://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(-)

diff --git a/src/krb5-auth-dialog.c b/src/krb5-auth-dialog.c
index c8fc27c..d6de3d7 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 : "<disabled>");
+	KA_DEBUG("Setting pk_userid to '%s'", applet->pk_userid ? applet->pk_userid : "<disabled>");
 	return TRUE;
 }
 
-- 
bgstack15