| Summary: | [PATCH] SASL Authentication fails if another client of sasl is loaded | ||
|---|---|---|---|
| Product: | [Unmaintained] kio | Reporter: | Andreas Roth <aroth> |
| Component: | imap | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Fix callbacks for IMAP and SIEVE kioslave | ||
|
Description
Andreas Roth
2007-06-09 14:36:30 UTC
Created attachment 20819 [details]
Fix callbacks for IMAP and SIEVE kioslave
The patch fixes the SASL callbacks for the IMAP and SIEVE kioslaves. It simply
specifies the callbacks for every connection (in sasl_client_new) instead of
using the callbacks specified through sasl_client_init.
SVN commit 674932 by winterz:
Fix bug "SASL Authentication fails if another client of sasl is loaded"
Patch provided by Andreas. Thanks!
BUGS: 146585
M +13 -3 imap4/imapparser.cc
M +28 -28 sieve/sieve.cpp
--- branches/KDE/3.5/kdepim/kioslaves/imap4/imapparser.cc #674931:674932
@@ -45,6 +45,16 @@
extern "C" {
#include <sasl/sasl.h>
}
+static sasl_callback_t callbacks[] = {
+ { SASL_CB_ECHOPROMPT, NULL, NULL },
+ { SASL_CB_NOECHOPROMPT, NULL, NULL },
+ { SASL_CB_GETREALM, NULL, NULL },
+ { SASL_CB_USER, NULL, NULL },
+ { SASL_CB_AUTHNAME, NULL, NULL },
+ { SASL_CB_PASS, NULL, NULL },
+ { SASL_CB_CANON_USER, NULL, NULL },
+ { SASL_CB_LIST_END, NULL, NULL }
+};
#endif
#include <qregexp.h>
@@ -222,7 +232,7 @@
result = sasl_client_new( "imap", /* FIXME: with cyrus-imapd, even imaps' digest-uri
must be 'imap'. I don't know if it's good or bad. */
aFQDN.latin1(),
- 0, 0, 0, 0, &conn );
+ 0, 0, callbacks, 0, &conn );
if ( result != SASL_OK ) {
kdDebug(7116) << "sasl_client_new failed with: " << result << endl;
@@ -1800,7 +1810,7 @@
QString temp = (*it);
int pt = temp.find ('/');
- if (pt > 0)
+ if (pt > 0)
{
if (temp.findRev ('"', pt) == -1 || temp.find('"', pt) == -1)
{
@@ -1832,7 +1842,7 @@
if (!_box.isEmpty () && _box[_box.length () - 1] == '/')
_box.truncate(_box.length() - 1);
}
- kdDebug(7116) << "URL: box= " << _box << ", section= " << _section << ", type= "
+ kdDebug(7116) << "URL: box= " << _box << ", section= " << _section << ", type= "
<< _type << ", uid= " << _uid << ", validity= " << _validity << ", info= " << _info << endl;
}
--- branches/KDE/3.5/kdepim/kioslaves/sieve/sieve.cpp #674931:674932
@@ -14,7 +14,7 @@
* *
***************************************************************************/
-/**
+/**
* Portions adapted from the SMTP ioslave.
* Copyright (c) 2000, 2001 Alex Zepeda <jazepeda@pacbell.net>
* Copyright (c) 2001 Michael H
|