From: Howard Chu Date: Sat, 15 Oct 2005 05:13:05 +0000 (+0000) Subject: Use generic filter for findbase X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~243 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1bd689d5d0141d61f42421a22bd09bfd929d1611;p=openldap Use generic filter for findbase --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index dfce872ef4..74b2352e9b 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -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;