Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 71846 Details for
Bug 86802
proftpd wont connect to ldap server
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch against proftpd-1.2.10-r7 to add v3 ldap binds without TLS
proftpd-ldapv3bind.patch (text/plain), 1.75 KB, created by
Peter Fern
on 2005-10-31 21:49:40 UTC
(
hide
)
Description:
Patch against proftpd-1.2.10-r7 to add v3 ldap binds without TLS
Filename:
MIME Type:
Creator:
Peter Fern
Created:
2005-10-31 21:49:40 UTC
Size:
1.75 KB
patch
obsolete
>diff -uNr proftpd-1.2.10/contrib/mod_ldap.c proftpd-1.2.10.new/contrib/mod_ldap.c >--- proftpd-1.2.10/contrib/mod_ldap.c 2004-07-22 10:11:22.000000000 +1000 >+++ proftpd-1.2.10.new/contrib/mod_ldap.c 2005-10-30 18:18:43.000000000 +1100 >@@ -236,9 +236,7 @@ > pr_ldap_connect(void) > { > int ret; >-#ifdef USE_LDAPV3_TLS > int version = LDAP_VERSION3; >-#endif > > if ((ld = ldap_init(ldap_server, LDAP_PORT)) == NULL) { > pr_log_pri(PR_LOG_ERR, "mod_ldap: pr_ldap_connect(): ldap_init() to %s failed: %s", ldap_server, strerror(errno)); >@@ -262,6 +260,11 @@ > } > #endif /* USE_LDAPV3_TLS */ > >+ if ((ret = ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version)) != LDAP_OPT_SUCCESS) { >+ pr_log_pri(PR_LOG_ERR, "mod_ldap: pr_ldap_connect(): Setting LDAP version option failed: %s", ldap_err2string(ret)); >+ pr_ldap_unbind(); >+ return -1; >+ } > if ((ret = ldap_simple_bind_s(ld, ldap_dn, ldap_dnpass) != LDAP_SUCCESS)) { > pr_log_pri(PR_LOG_ERR, "mod_ldap: pr_ldap_connect(): ldap_simple_bind() as %s failed: %s", ldap_dn, ldap_err2string(ret)); > return -1; >@@ -1204,9 +1207,7 @@ > char *pass, *cryptpass, *hash_method; > int encname_len; > LDAP *ld_auth; >-#ifdef USE_LDAPV3_TLS > int ret, version = LDAP_VERSION3; >-#endif > > #ifdef HAVE_OPENSSL > EVP_MD_CTX EVP_Context; >@@ -1252,6 +1253,12 @@ > } > #endif /* USE_LDAPV3_TLS */ > >+ if ((ret = ldap_set_option(ld_auth, LDAP_OPT_PROTOCOL_VERSION, &version)) != LDAP_OPT_SUCCESS) { >+ pr_log_pri(PR_LOG_ERR, "mod_ldap: pr_ldap_connect(): Setting LDAP version option on rebind failed: %s", ldap_err2string(ret)); >+ pr_ldap_unbind(); >+ return ERROR(cmd); >+ } >+ > if (ldap_simple_bind_s(ld_auth, ldap_authbind_dn, cmd->argv[2]) != LDAP_SUCCESS) { > ldap_unbind(ld_auth); > return ERROR(cmd);
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 86802
:
71845
| 71846 |
71847