Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 34094 Details for
Bug 55095
courier-imap (authldap) can't bind to openldap unless allow bind_v2 is set in slapd.conf
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
authldap code fix
courier-imap-3.0.2-ldap_protocol_version.patch (text/plain), 1.81 KB, created by
Jaco Kroon
on 2004-06-24 16:35:51 UTC
(
hide
)
Description:
authldap code fix
Filename:
MIME Type:
Creator:
Jaco Kroon
Created:
2004-06-24 16:35:51 UTC
Size:
1.81 KB
patch
obsolete
>--- courier-imap-3.0.2/authlib/authldaplib.c 2004-01-19 21:34:09.000000000 +0200 >+++ courier-imap-3.0.2-fixed/authlib/authldaplib.c 2004-06-25 01:13:22.590602787 +0200 >@@ -676,31 +676,8 @@ > */ > static int enable_tls_on(LDAP *conn) { > #if HAVE_LDAP_TLS >- int version; > int ldrc; > >- if (ldaperror(ldrc=ldap_get_option (conn, >- LDAP_OPT_PROTOCOL_VERSION, >- &version)) >- != LDAP_SUCCESS) >- { >- const char *s=ldap_err2string(ldrc); >- >-#if HAVE_SYSLOG_H >- syslog(LOG_DAEMON|LOG_CRIT, >- "ldap_get_option failed: %s", s); >-#endif >- return (-1); >- } >- >- if (version < LDAP_VERSION3) >- { >- version = LDAP_VERSION3; >- (void)ldap_set_option (conn, >- LDAP_OPT_PROTOCOL_VERSION, >- &version); >- } >- > if (ldaperror(ldrc=ldap_start_tls_s(conn, NULL, NULL)) > != LDAP_SUCCESS) > { >@@ -754,8 +731,9 @@ > > static int ldapopen() > { >-int ldrc; >- >+ int ldrc; >+ int version; >+ > if (my_ldap_fp) return (0); > > if (authldap_read_config(&my_ldap) == 0) >@@ -767,7 +745,36 @@ > { > return (1); > } >+ >+ // attempt to upgrade the protocol version as high as we can. >+ // We might want to add a config option like LDAP_PROTO_VERSION >+ // and try to set to that if set, or else run this. >+ if (ldaperror(ldrc=ldap_get_option (my_ldap_fp, >+ LDAP_OPT_PROTOCOL_VERSION, >+ &version)) >+ != LDAP_SUCCESS) >+ { >+ const char *s=ldap_err2string(ldrc); > >+#if HAVE_SYSLOG_H >+ syslog(LOG_DAEMON|LOG_CRIT, >+ "ldap_get_option failed: %s", s); >+#endif >+ } >+ else >+ { >+ int tmpversion = LDAP_VERSION_MAX; >+ while(tmpversion > version) >+ { >+ if(ldap_set_option (my_ldap_fp, >+ LDAP_OPT_PROTOCOL_VERSION, >+ &tmpversion) == LDAP_SUCCESS) >+ break; >+ tmpversion--; >+ } >+ version = tmpversion; >+ } >+ > #if HAVE_LDAP_TLS > if (my_ldap.tls && enable_tls_on(my_ldap_fp)) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55095
:
34094
|
34121