pidgin: 3161d3b0: Now that Adium has cyrus-sasl enabled, I...

evands at pidgin.im evands at pidgin.im
Wed Mar 19 20:25:44 EDT 2008


-----------------------------------------------------------------
Revision: 3161d3b09a1cb0dfe2a905306fbe19a6e76f5531
Ancestor: c8a7475750a83a32c26d2f40066500a948844beb
Author: evands at pidgin.im
Date: 2008-03-20T00:20:27
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3161d3b09a1cb0dfe2a905306fbe19a6e76f5531

Modified files:
        libpurple/protocols/jabber/auth.c
        libpurple/protocols/jabber/libxmpp.c

ChangeLog: 

Now that Adium has cyrus-sasl enabled, I'm having a lot of users report problems connecting to servers which ultimately turn out to be that the server supports GSSAPI in addition to other mechanisms and the user isn't configured serverside or clientside to authenticate properly.  Generally speaking, a user/password combination is the expectation for most people for connecting.
> 
> This adds an account preference, off by default, which enables GSSAPI authentication.  If there's a huge outcry against displaying this preference in Pidgin and Finch, I'd appreciate leaving it in as a 'hidden' preference (changed to TRUE by default) which UIs can use; I plan to expose it within Adium.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth.c	9967247bae8eccc3f4f1533136851cc9d363e1bd
+++ libpurple/protocols/jabber/auth.c	bef49288845bb7db03428477b53f716f7bd3cd47
@@ -490,6 +490,12 @@ jabber_auth_start(JabberStream *js, xmln
 	{
 		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
============================================================
--- libpurple/protocols/jabber/libxmpp.c	029e306d4b150ee74a1e9c83d0dff5afb1f83f78
+++ libpurple/protocols/jabber/libxmpp.c	dfe703455ce177cb914a4112f39278e61604349f
@@ -224,6 +224,14 @@ init_plugin(PurplePlugin *plugin)
 	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);


More information about the Commits mailing list