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

Re: Dynlist query



Guy Deleeuw wrote:
> Hi all
> 
> I have a small problem that require your advice.
> We try to query our ldap database from dynlist entries :
> 
> We have a tree like :
> testGroup ....
> - member
> - manager
> group2
> - member
> - manager
> 
> ect..
> 
> Each member entry is a dynlist, which have a dynamic multivalued
> attribue : "ExoMemberShipMember"
> 
> I have on our slapd.conf this line :
> dynlist-attrset ExoMemberShip ExoMemberShipURL ExoMemberShipMember
> 
> 
> 
> Now, I start a ldapsearch to show if the dynamic attribute is correctly
> populated :
> root@nova:~# ldapsearch -x -LLL -b
> "ou=groups,ou=portal,ou=www,ou=Exo,o=Eurofer,c=be" -s sub
> "(&(&(objectClass=ExoMemberShip)(ExoMemberShipURL=*)))"
> 
> dn: cn=member,ou=testGroup,ou=groups,ou=portal,ou=www,ou=Exo,o=Eurofer,c=be
> objectClass: ExoMemberShip
> objectClass: top
> cn: member
> description: member
> ExoMemberShipURL: ldap:///br=Internal,o=Eurofer,c=be??sub?(uid=*)
> ExoMemberShipMember: cn=Cassou-Mounat Dominique,br=Internal,o=Eurofer,c=be
> ExoMemberShipMember: cn=Caufriez Freddy,br=Internal,o=Eurofer,c=be
> ....
> ....
> dn: cn=member,ou=group2,ou=groups,ou=portal,ou=www,ou=Exo,o=Eurofer,c=be
> objectClass: ExoMemberShip
> objectClass: top
> cn: member
> description: member
> ExoMemberShipURL: ldap:///br=Internal,o=Eurofer,c=be??sub?(uid=*)
> ExoMemberShipMember: cn=Cassou-Mounat Dominique,br=Internal,o=Eurofer,c=be
> ExoMemberShipMember: cn=Caufriez Freddy,br=Internal,o=Eurofer,c=be
> ...
> ...
> 
> 
> All work fine, I can retrieve the two group entries.
> 
> Now, I try to retrieve the group which have a particular member
> (ExoMemberShipMember):
> ldapsearch -x -LLL -b "ou=groups,ou=portal,ou=www,ou=Exo,o=Eurofer,c=be"
> -s sub
> "(&(&(objectClass=ExoMemberShip)(ExoMemberShipURL=*))(ExoMemberShipMember=cn=De
> Leeuw Guy,br=Internal,o=Eurofer,c=be))"
> 
> 
> And I receive an empty respond.
> 
> Could you give me your advice about the feasibility of this kind of query ?

This occurs because you can't filter for dynamically created members, as
they get added to the entry while it's being returned.  So the dynamic
members are not present in the entry during search, when the filter is
evaluated.  You can only filter for static data.

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
---------------------------------------