[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Referral chasing broken in libldap, unless port specified (ITS#1606)
Full_Name: Luke Howard
Version: 2.0.99
OS: Darwin
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (165.228.130.11)
The [:port] part of an LDAP URL is optional, per RFC1738. ldap_url_parse()
should be used instead of ldap_url_parse_ext() as it appears that the latter
does not set the port to a sensible default in the case that it is omitted. This
used to work a year or so ago, but it has been broken for a while :-) (Also, I
wonder whether the search scope should be set to that of the search when chasing
references, rather than the RFC-specified default of "base". This would make
things more useful IMO although I can compensate at the server.)
Index: request.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/request.c,v
retrieving revision 1.77
diff -u -r1.77 request.c
--- request.c 2002/01/04 20:17:39 1.77
+++ request.c 2002/02/20 21:54:46
@@ -650,7 +650,7 @@
/* parse out & follow referrals */
for( i=0; refarray[i] != NULL; i++) {
/* Parse the referral URL */
- if (( rc = ldap_url_parse_ext( refarray[i], &srv)) !=
LDAP_SUCCESS) {
+ if (( rc = ldap_url_parse( refarray[i], &srv)) != LDAP_SUCCESS)
{
ld->ld_errno = rc;
rc = -1;
goto done;
@@ -878,7 +878,7 @@
p = NULL;
}
- rc = ldap_url_parse_ext( ref, &srv );
+ rc = ldap_url_parse( ref, &srv );
if ( rc != LDAP_URL_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
Index: url.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/url.c,v
retrieving revision 1.64
diff -u -r1.64 url.c
--- url.c 2002/01/04 20:17:40 1.64
+++ url.c 2002/02/20 21:54:52
@@ -10,7 +10,7 @@
* LIBLDAP url.c -- LDAP URL (RFC 2255) related routines
*
* LDAP URLs look like this:
- * ldap[is]://host:port[/[dn[?[attributes][?[scope][?[filter][?exts]]]]]]
+ * ldap[is]://host[:port][/[dn[?[attributes][?[scope][?[filter][?exts]]]]]]
*
* where:
* attributes is a comma separated list