ASF Bugzilla – Attachment 10470 Details for
Bug 27134
mod_ldap/util_ldap blindly rebind connection in checkuserid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch using option one in the solution explained above
util_ldap.unified.diff.patch (text/plain), 1.33 KB, created by
Denis Gervalle
on 2004-02-21 14:23:27 UTC
(
hide
)
Description:
Patch using option one in the solution explained above
Filename:
MIME Type:
Creator:
Denis Gervalle
Created:
2004-02-21 14:23:27 UTC
Size:
1.33 KB
patch
obsolete
>--- util_ldap-old.c Fri Feb 20 21:47:37 2004 >+++ util_ldap.c Fri Feb 20 23:16:45 2004 >@@ -870,17 +870,19 @@ > * fails, it means that the password is wrong (the dn obviously > * exists, since we just retrieved it) > */ >- if ((result = >- ldap_simple_bind_s(ldc->ldap, const_cast(*binddn), const_cast(bindpw))) == >- LDAP_SERVER_DOWN) { >- ldc->reason = "ldap_simple_bind_s() to check user credentials failed with server down"; >- ldap_msgfree(res); >- goto start_over; >- } >- >- /* failure? if so - return */ >- if (result != LDAP_SUCCESS) { >- ldc->reason = "ldap_simple_bind_s() to check user credentials failed"; >+ ldc->bound = 0; >+ ldc->binddn = apr_pstrdup(st->pool, *binddn); >+ ldc->bindpw = apr_pstrdup(st->pool, bindpw); >+ >+ if ((result = util_ldap_connection_open(r, ldc)) != LDAP_SUCCESS) { >+ /* failure? if so - return >+ * because util_ldap_connection_open has already done 10 tries >+ * on server down condition, there is really few chances that >+ * a start over would succeed. */ >+ if(result == LDAP_SERVER_DOWN) >+ ldc->reason = "util_ldap_connection_open() to check user credentials failed with server down"; >+ else >+ ldc->reason = "util_ldap_connection_open() to check user credentials failed"; > ldap_msgfree(res); > return result; > }
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 27134
: 10470 |
11296