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

Search Problem !!



I  have  following hierarchy of classes-

                     A(  with attributes - a1,a2,a3 and dn="dc=abc")
                      |
                     B ( with attributes-b1,b2,b3 and  dn for this level
= "b1=<b1>,dc=abc" where  <b1> is some value unique for each entry)
                     |
                     C ( with attributes- c1,c2,c3 and dn for this level
= "c1=<c1>,b1=<b1>,dc=abc" where  sub dn "b1 =<b1> , dc=abc" entry has
already  benn inserted .

My Question is -
         If I just know the  bas dn i.e "dc=abc" and  I want to extract
entries of only class "C" for which my search is -
             ldap_search_ext_s( ld, "dc=abc", LDAP_SCOPE_SUBENTRY
,("objectclass=C") ,null,1,&resuls)
 But I also get  entries corresponding  to  class A and B.


                My problem is - though I can find by looking into each
entry's attribute that they are for class "C", but I also allocate
memory dynamically for all entries I found by  finding number of entries
match by calling "ldap_count_entries" , which also incorporates entries
of parent level, I allocate redundant memory which is not required.

          Is there any  search ( may be scope or filter combination) by
which I  get only entries for class C only.

Thanks for any help
Regards
Upma