Manuel Vacelet writes:
>> Though it may be possible to hack it: Search with
>>  base   "ou=Groups,dc=example,dc=com"
>>  filter "(&(your intended filter)(|(cn:dn:=marketing)(cn:dn:=sales)))"
>>
>> That finds entries matching your filter which also has "cn=marketing" or
>> "cn=sales" in the DN.  However that means it'd also match e.g. an entry
>> named cn=sales,cn=Somewhere,cn=Else,ou=Groups,dc=example,dc=com.
> 
> If limit the scope of my query to "One" this shouldn't happen isn't it ?

Sorry, I seem to have "seen" another question than you asked:-(
Yes, that's right.  Or since I don't think that search can make use of
indexes (though it depends on the implementation), just use the filter
    "(|(cn=marketing)(cn=sales))"
That could find groups like this too however:
    dn: cn=sneaky group,ou=Groups,dc=example,dc=com
    cn: sneaky group
    cn: marketing
    ...
If that's a problem but you want indexing you could combine the two: the
first for indexing, the second to filter out sneaky groups:
   (|(&(cn=marketing)(cn:dn:=marketing))(&(cn=sales)(cn:dn:=sales)))

Hopefully I got it right this time:-)

-- 
Hallvard

Reply via email to