diff options
author | Evan Schoenberg <evands@pidgin.im> | 2008-03-20 00:20:27 +0000 |
---|---|---|
committer | Evan Schoenberg <evands@pidgin.im> | 2008-03-20 00:20:27 +0000 |
commit | a263fe3b62925de6aa7616e54a26754292da3a9f (patch) | |
tree | eda883ed1de34bfd3782ab47f9c930d1c813fac0 | |
parent | 980e5656a22c6503eb7cf547f7f93b7c22b09b1c (diff) | |
download | pidgin-a263fe3b62925de6aa7616e54a26754292da3a9f.tar.gz |
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.
-rw-r--r-- | libpurple/protocols/jabber/auth.c | 6 | ||||
-rw-r--r-- | libpurple/protocols/jabber/libxmpp.c | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libpurple/protocols/jabber/auth.c b/libpurple/protocols/jabber/auth.c index c237f256e5..8363bcccd6 100644 --- a/libpurple/protocols/jabber/auth.c +++ b/libpurple/protocols/jabber/auth.c @@ -490,6 +490,12 @@ jabber_auth_start(JabberStream *js, xmlnode *packet) { 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 --git a/libpurple/protocols/jabber/libxmpp.c b/libpurple/protocols/jabber/libxmpp.c index f33ad2cfb0..cffe9f1bea 100644 --- a/libpurple/protocols/jabber/libxmpp.c +++ b/libpurple/protocols/jabber/libxmpp.c @@ -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); |