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

Re: backend relay with empty suffix



Nikos Voutsinas wrote:
> My point here is that requests to ldap backend, defined with suffix
> "ou=People", are also subject to suffix transformation rules defined in
> relay backend, (i suspect because of the empty suffix "", and at least
> while searching for attr=hasSubordinates).
> 
> Is this the expected behavior?

No.  And I'm not seeing anything like that (with HEAD/re23 code, which
means after fixing the core dumps you initially reported).

Searches for "ou=People" see the suffix transformations defined for that
database, while searches for anything else see the transformations
defined for the relay database.

Just to make sure we talk about the same thing, I'm posting the relevant
portions of my second slapd.conf (the first one is that resulting from
running test003):

<slapd.conf>
database        bdb
suffix          "ou=Other,dc=example,dc=com"
# ...

database        ldap
suffix          "ou=People"
uri             "ldap://:9011";
overlay         rwm
rwm-suffixmassage       "dc=example,dc=com"

database        relay
suffix          ""
relay           "ou=Other,dc=example,dc=com" massage
</slapd.conf>

Note that the database rooted at "ou=Other,dc=example,dc=com" has been
populated by writing to slapd, so write operations succeeded as well.
As an example:

$ ldapsearch -x -H ldap://:9012 -b ou=People hasSubordinates=TRUE 1.1
dn: ou=People

dn: ou=People,ou=People

dn: ou=Groups,ou=People

dn: ou=Alumni Association,ou=People,ou=People

dn: ou=Information Technology Division,ou=People,ou=People

$ ldapsearch -x -H ldap://:9012 -LLL -b "" hasSubordinates=* 1.1
dn:

dn: cn=Ando

$ ldapsearch -x -H ldap://:9012 -LLL -b "ou=Other,dc=example,dc=com" \
	hasSubordinates=* 1.1
dn: ou=Other,dc=example,dc=com

dn: cn=Ando,ou=Other,dc=example,dc=com

$ ldapsearch -x -H ldap://:9012 -LLL -b "" -s base namingcontexts
dn:
namingContexts: ou=Other,dc=example,dc=com
namingContexts: ou=People
namingContexts:

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------