Mercurial > pidgin
changeset 22509:aed6cbd18a3b
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.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Thu, 20 Mar 2008 00:20:27 +0000 |
parents | 6bd3a83e9d8c |
children | 1ad74db7efa8 |
files | libpurple/protocols/jabber/auth.c libpurple/protocols/jabber/libxmpp.c |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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);