# HG changeset patch # User Evan Schoenberg # Date 1205972427 0 # Node ID aed6cbd18a3bec7c176d3ff26ee153043fd8d3ea # Parent 6bd3a83e9d8c6a05d428818e30018cd14221613a 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. diff -r 6bd3a83e9d8c -r aed6cbd18a3b libpurple/protocols/jabber/auth.c --- a/libpurple/protocols/jabber/auth.c Wed Mar 19 03:13:19 2008 +0000 +++ b/libpurple/protocols/jabber/auth.c Thu Mar 20 00:20:27 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 diff -r 6bd3a83e9d8c -r aed6cbd18a3b libpurple/protocols/jabber/libxmpp.c --- a/libpurple/protocols/jabber/libxmpp.c Wed Mar 19 03:13:19 2008 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Thu Mar 20 00:20:27 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);