diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-07 21:47:25 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-07 21:47:25 +0000 |
commit | 06b58933ad0f46995c2a676671f92a335dfdfe05 (patch) | |
tree | 8ae8e65299193bbdeeb1c36c97e0bc2dc2b8999d /protocols | |
parent | aee8c19adbaffb8fe189c626d7e188e5ea008b0d (diff) |
Merging non-SASL authentication patch from #863. This also implements
hidden-default settings, which means a setting is hidden unless it was
changed from the default. This seems like appropriate behaviour for
something as obscure as this.
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/jabber/io.c | 4 | ||||
-rw-r--r-- | protocols/jabber/jabber.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index ef7d5c13..a28eea90 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -211,7 +211,7 @@ static gboolean jabber_read_callback( gpointer data, gint fd, b_input_condition /* If there's no version attribute, assume this is an old server that can't do SASL authentication. */ - if( !sasl_supported( ic ) ) + if( !set_getbool( &ic->acc->set, "sasl") || !sasl_supported( ic ) ) { /* If there's no version= tag, we suppose this server does NOT implement: XMPP 1.0, @@ -374,7 +374,7 @@ static xt_status jabber_pkt_features( struct xt_node *node, gpointer data ) support it after all, we should try to do authentication the other way. jabber.com doesn't seem to do SASL while it pretends to be XMPP 1.0 compliant! */ - else if( !( jd->flags & JFLAG_AUTHENTICATED ) && sasl_supported( ic ) ) + else if( !( jd->flags & JFLAG_AUTHENTICATED ) && set_getbool( &ic->acc->set, "sasl") && sasl_supported( ic ) ) { if( !jabber_init_iq_auth( ic ) ) return XT_ABORT; diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 802158c1..7d9547ab 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -81,6 +81,9 @@ static void jabber_init( account_t *acc ) s = set_add( &acc->set, "tls", "try", set_eval_tls, acc ); s->flags |= ACC_SET_OFFLINE_ONLY; + s = set_add( &acc->set, "sasl", "true", set_eval_bool, acc ); + s->flags |= ACC_SET_OFFLINE_ONLY | SET_HIDDEN_DEFAULT; + s = set_add( &acc->set, "user_agent", "BitlBee", NULL, acc ); s = set_add( &acc->set, "xmlconsole", "false", set_eval_bool, acc ); |