changeset 22513:1ad74db7efa8

merge of '3161d3b09a1cb0dfe2a905306fbe19a6e76f5531' and '936fb35924ee04ab0274875100b8b63d7feca83d'
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 20 Mar 2008 03:37:33 +0000
parents aed6cbd18a3b (diff) eee94c5446a9 (current diff)
children c66dd9db3b09
files
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c	Thu Mar 20 02:59:50 2008 +0000
+++ b/libpurple/protocols/jabber/auth.c	Thu Mar 20 03:37:33 2008 +0000
@@ -490,6 +490,12 @@
 	{
 		char *mech_name = xmlnode_get_data(mechnode);
 #ifdef HAVE_CYRUS_SASL
+		/* Skip the GSSAPI mechanism unless it's enabled for this account */
+		if (mech_name && !strcmp(mech_name, "GSSAPI") &&
+			!purple_account_get_bool(js->gc->account, "auth_gssapi", FALSE)) {
+			continue;
+		}
+
 		g_string_append(js->sasl_mechs, mech_name);
 		g_string_append_c(js->sasl_mechs, ' ');
 #else
--- a/libpurple/protocols/jabber/libxmpp.c	Thu Mar 20 02:59:50 2008 +0000
+++ b/libpurple/protocols/jabber/libxmpp.c	Thu Mar 20 03:37:33 2008 +0000
@@ -224,6 +224,14 @@
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 						   option);
 
+#ifdef HAVE_CYRUS_SASL
+	option = purple_account_option_bool_new(
+											_("Use GSSAPI (Kerberos v5) for authentication"),
+											"auth_gssapi", FALSE);
+	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
+											   option);	
+#endif
+	
 	option = purple_account_option_int_new(_("Connect port"), "port", 5222);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 						   option);