]> git.sur5r.net Git - openldap/commitdiff
Use generic filter for findbase
authorHoward Chu <hyc@openldap.org>
Sat, 15 Oct 2005 05:13:05 +0000 (05:13 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 15 Oct 2005 05:13:05 +0000 (05:13 +0000)
servers/slapd/overlays/syncprov.c

index dfce872ef487395757641a94371f491aa607bec0..74b2352e9b07012ac51cbcab49ac85d90cf222f3 100644 (file)
@@ -383,6 +383,9 @@ findbase_cb( Operation *op, SlapReply *rs )
        return LDAP_SUCCESS;
 }
 
+static Filter generic_filter = { LDAP_FILTER_PRESENT, { 0 }, NULL };
+static struct berval generic_filterstr = BER_BVC("(objectclass=*)");
+
 static int
 syncprov_findbase( Operation *op, fbase_cookie *fc )
 {
@@ -422,6 +425,8 @@ syncprov_findbase( Operation *op, fbase_cookie *fc )
                fop.ors_tlimit = SLAP_NO_LIMIT;
                fop.ors_attrs = slap_anlist_no_attrs;
                fop.ors_attrsonly = 1;
+               fop.ors_filter = &generic_filter;
+               fop.ors_filterstr = generic_filterstr;
 
                fop.o_bd->bd_info = on->on_info->oi_orig;
                rc = fop.o_bd->be_search( &fop, &frs );
@@ -2531,6 +2536,8 @@ syncprov_init()
 
        syncprov.on_bi.bi_cf_ocs = spocs;
 
+       generic_filter.f_desc = slap_schema.si_ad_objectClass;
+
        rc = config_register_schema( spcfg, spocs );
        if ( rc ) return rc;