directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Directory Wiki] Update of "LdapSearch" by MarcDexet
Date Sat, 11 Feb 2006 15:08:23 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Directory Wiki" for change notification.

The following page has been changed by MarcDexet:

New page:
Describe LdapSearch here.

Stuff about LpadSearch and SearchResult
== Some little things you could use ==
=== DN from my search are looking like URL with true escape code inside ===
Oh my god I get search result with ugly ldap url "ldap://" in front of.
Is it a bug ? No, it's normal and written in RFC 2251. 
An LDAP URL is returned for an alias that falls outside of the
search base.

You haven't aliasing in your context ? Maybe you use the Sun Ldap factory ? 
Let's see what happens: The URL format is set as name to the SearchResult if this one is NOT


And how could JNDI guess SearchResult is unrelative ?

If you take a look [
to sun LdapSearchEnumeration source] who creates SearchResult, relativity is set to false
if the DN doesn't contain the search base DN.

So assume you get such a search 
baseDn ="dc=acme,dc=com"
attrs =[];

If a LdapName is 
cn=John FOO,ou=dreams
it's deducted as unrelative and you will get
{{{ dn=ldap:// FOO,ou=dreams

But if LdapName is 
cn=John FOO,ou=dreams,dc=acme,dc=com 
is deducted as relative and you will get 
dn=cn=John FOO,ou=dreams

Don't forget LdapName checking is what happen ''inside'' LdapSearchEnumeration, not what you
could see at result enumeration.

View raw message