[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: commit: ldap/servers/slapd result.c



OK, in the case of no trailing slash, the LDAPURL is treated only as a
hostport, with no other info. In the case of a trailing slash present, it is
treated as a hostport and a DN, with DN being null in this case. I think the
client side code is doing the right thing, and it's just a bug in the
slapd-ref-slave.conf file. Here's a relevant log for the two cases, by the
way:

chasing LDAP referral: <ldap://localhost:9009/>
re_encode_request: new msgid 3, new dn <>
ber_scanf fmt ({i) ber:
ber_dump: buf 0x804dc80, ptr 0x804dc80, end 0x804dcc5
         0  C 02 01 02  c  > 04 1e  o  =  U  n  i  v  e
         r  s  i  t  y 20  o  f 20  M  i  c  h  i  g  a
         n  , 20  c  =  U  S 0a 01 02 0a 01 00 02 01 00
        02 01 00 01 01 00 87 0b  o  b  j  e  c  t  c  l
         a  s  s  0 00
re_encode_request new request is:
ber_dump: buf 0x804ee20, ptr 0x804ee47, end 0x804f220
         0  % 02 01 03  c 20 04 00 0a 01 02 0a 01 00 02
        01 00 02 01 00 01 01 00 87 0b  o  b  j  e  c  t
         c  l  a  s  s  0 00
ldap_send_server_request
...
chasing LDAP referral: <ldap://localhost:9009>
re_encode_request: new msgid 5, new dn <NONE>
ber_scanf fmt ({i) ber:
ber_dump: buf 0x804dc80, ptr 0x804dc80, end 0x804dcc5
         0  C 02 01 02  c  > 04 1e  o  =  U  n  i  v  e
         r  s  i  t  y 20  o  f 20  M  i  c  h  i  g  a
         n  , 20  c  =  U  S 0a 01 02 0a 01 00 02 01 00
        02 01 00 01 01 00 87 0b  o  b  j  e  c  t  c  l
         a  s  s  0 00
re_encode_request new request is:
ber_dump: buf 0x804f388, ptr 0x804f3cd, end 0x804f788
         0  C 02 01 05  c  > 04 1e  o  =  U  n  i  v  e
         r  s  i  t  y 20  o  f 20  M  i  c  h  i  g  a
         n  , 20  c  =  U  S 0a 01 02 0a 01 00 02 01 00
        02 01 00 01 01 00 87 0b  o  b  j  e  c  t  c  l
         a  s  s  0 00
ldap_send_server_request

> Ugh. After applying this patch, test009-referral fails. It will succeed if
> data/slapd-ref-slave.conf is changed to drop the trailing '/' from the
> referral directive. It's as if the test has always relied on
> broken behavior
> in slapd. Why is the trailing '/' making a difference?
>
> --- s1.conf     Sat Sep 18 18:33:37 1999
> +++ slapd-ref-slave.conf        Wed Dec  1 23:24:58 1999
> @@ -12,7 +12,8 @@
>  # ldbm database definitions
>  #######################################################################
>
> -referral       "ldap://localhost:9009/";
> +#referral      "ldap://localhost:9009/";
> +referral       "ldap://localhost:9009";
>
>  database       ldbm
>  cachesize      0
>
> -----Original Message-----
> From: owner-openldap-commit@OpenLDAP.org
> [mailto:owner-openldap-commit@OpenLDAP.org] On Behalf Of
> hyc@OpenLDAP.org
> Sent: Wednesday, December 01, 1999 8:19 PM
> To: OpenLDAP Commit
> Subject: commit: ldap/servers/slapd result.c
>
>
> Update of /repo/OpenLDAP/pkg/ldap/servers/slapd
>
> Modified Files:
> 	result.c  1.70 -> 1.71
>
> Log Message:
> Fix off-by-one in v2ref
>
>
> CVS Web URLs:
>   http://www.openldap.org/devel/cvsweb.cgi/servers/slapd/
>     http://www.openldap.org/devel/cvsweb.cgi/servers/slapd/result.c
>
> Changes are generally available on cvs.openldap.org (and CVSweb)
> within 30 minutes of being committed.
>
>