Re: unexpected result of query
Graham Barr <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.ldap |
|---|---|
| Message-ID | <[email protected]> |
On Dec 15, 2008, at 7:40 AM, Karsten Kankowski wrote: > > cn=catiav5,cu=catiav5,cu=sequence,cu=DA350_XX0,cu=codice,..... > cn=reader,cu=HPUX32,cu=adobe,cu=cosoft,cu=DA350_XX0,cu=codice,..... > > To query this tree i try to pass following parameters > my $attr=['*']; > $ldap->search ( > base => "cu=DA350_XX0,cu=codice,cu=a- > d,cu=natco,dc=cax,dc=airbus,dc=com", > scope => "sub", > filter => "(&(cu=*) (cu=sequence)",attrs => $attr); Does cu=sequence appear as an attribute in all entries below cu=sequence,cu=DA350_XX0,cu=codice,..... Only the RDN (the first part of the DN) has to appear as an attribute in the entry itself. Filters only compare actual attributes, not parts of the DN. Which is why you only see the one entry returned. Using a base of "cu=sequence,cu=DA350_XX0,cu=codice,..." and filter on (cu=*) will get all entries below cu-sequence that have a cu attribute Graham.