Lines Matching refs:op
182 typedef CachedQuery *(QCfunc)(Operation *op, struct query_manager_s*,
184 typedef CachedQuery *(AddQueryfunc)(Operation *op, struct query_manager_s*,
334 Operation *op,
340 Operation *op,
349 Operation *op,
356 query2url( Operation *op, CachedQuery *q, struct berval *urlbv, int dolock )
375 filter2bv_x( op, q->filter, &bv_filter );
406 ptr = urlbv->bv_val = ber_memalloc_x( urlbv->bv_len + 1, op->o_tmpmemctx );
426 ber_memfree_x( bv_filter.bv_val, op->o_tmpmemctx );
593 Operation *op,
756 Operation op2 = *op;
779 if ( filter2template( op, query.filter, &tempstr ) ) {
799 cq = add_query( op, qm, &query, qt, PC_POSITIVE, 0 );
829 Operation *op,
856 op->o_tag = LDAP_REQ_ADD;
857 op->o_protocol = LDAP_VERSION3;
858 op->o_callback = &cb;
859 op->o_time = slap_get_time();
860 op->o_do_not_cache = 1;
862 op->ora_e = e;
863 op->o_req_dn = e->e_name;
864 op->o_req_ndn = e->e_nname;
865 rc = op->o_bd->be_add( op, &sreply );
872 op->o_tag = LDAP_REQ_MODIFY;
873 op->orm_modlist = modlist;
874 op->o_managedsait = SLAP_CONTROL_CRITICAL;
875 op->o_bd->be_modify( op, &sreply );
879 syncrepl_add_glue( op, e );
888 if ( op->ora_e == e )
1133 merge_init_final(Operation *op, struct berval* init, struct berval* any,
1149 merged = (struct berval*)op->o_tmpalloc( (count+1)*sizeof(struct berval),
1150 op->o_tmpmemctx );
1154 ber_dupbv_x( temp, init, op->o_tmpmemctx );
1159 ber_dupbv_x( temp, any, op->o_tmpmemctx );
1164 ber_dupbv_x( temp, final, op->o_tmpmemctx );
1199 substr_containment_substr(Operation *op, Filter* stored, Filter* incoming)
1222 remaining_incoming = merge_init_final(op, &init_incoming,
1225 ber_bvarray_free_x( remaining_incoming, op->o_tmpmemctx );
1232 substr_containment_equality(Operation *op, Filter* stored, Filter* incoming)
1246 ber_dupbv_x( incoming_val, incoming_val+1, op->o_tmpmemctx );
1249 op->o_tmpfree( incoming_val[0].bv_val, op->o_tmpmemctx );
1270 find_filter( Operation *op, Avlnode *root, Filter *inputf, Filter *first )
1357 fsp = op->o_tmpalloc(sizeof(fstack), op->o_tmpmemctx);
1371 && substr_containment_equality( op,
1377 ) && substr_containment_substr( op,
1418 op->o_tmpfree(fsp, op->o_tmpmemctx);
1433 query_containment(Operation *op, query_manager *qm,
1499 qc = find_filter( op, qbptr->scopes[tscope],
1516 if ( be_issuffix( op->o_bd, &qbase.base ))
1547 Operation *op,
1642 new_cached_query = find_filter( op, qbase->scopes[query->scope],
1761 Operation *op,
1776 qi = op->o_tmpalloc( sizeof( struct query_info ), op->o_tmpmemctx );
1777 qi->next = op->o_callback->sc_private;
1778 op->o_callback->sc_private = qi;
1779 ber_dupbv_x( &qi->xdn, &rs->sr_entry->e_nname, op->o_tmpmemctx );
1787 Operation *op,
1798 op->ors_filterstr.bv_len = snprintf(filter_str, sizeof(filter_str),
1804 op->o_tag = LDAP_REQ_SEARCH;
1805 op->o_protocol = LDAP_VERSION3;
1806 op->o_callback = &cb;
1807 op->o_time = slap_get_time();
1808 op->o_do_not_cache = 1;
1810 op->o_req_dn = op->o_bd->be_suffix[0];
1811 op->o_req_ndn = op->o_bd->be_nsuffix[0];
1812 op->ors_scope = LDAP_SCOPE_SUBTREE;
1813 op->ors_deref = LDAP_DEREF_NEVER;
1814 op->ors_slimit = SLAP_NO_LIMIT;
1815 op->ors_tlimit = SLAP_NO_LIMIT;
1816 op->ors_limit = NULL;
1817 op->ors_filter = &filter;
1818 op->ors_filterstr.bv_val = filter_str;
1819 op->ors_filterstr.bv_len = strlen(filter_str);
1820 op->ors_attrs = NULL;
1821 op->ors_attrsonly = 0;
1823 op->o_bd->be_search( op, &sreply );
1828 op->o_req_dn = qi->xdn;
1829 op->o_req_ndn = qi->xdn;
1836 op->o_tag = LDAP_REQ_DELETE;
1838 if (op->o_bd->be_delete(op, &sreply) == LDAP_SUCCESS) {
1861 op->orm_modlist = &mod;
1863 op->o_bd->be_modify( op, &sreply );
1865 op->o_tmpfree( qi->xdn.bv_val, op->o_tmpmemctx );
1866 op->o_tmpfree( qi, op->o_tmpmemctx );
1880 Operation *op,
1955 rc = filter2template( op, f, fstr );
2008 Operation *op,
2021 return_val = remove_query_data( op, uuid );
2044 fetch_queryId_cb( Operation *op, SlapReply *rs )
2054 if ( op->o_callback->sc_private != NULL ) {
2065 ber_bvarray_dup_x( &vals, a->a_nvals, op->o_tmpmemctx );
2066 op->o_callback->sc_private = (void *)vals;
2071 rs_flush_entry( op, rs, (slap_overinst *) op->o_bd->bd_info );
2082 Operation *op,
2096 if ( op == NULL ) {
2100 op = &opbuf.ob_op;
2103 op2 = *op;
2104 op = &op2;
2107 memset( &op->oq_search, 0, sizeof( op->oq_search ) );
2108 op->ors_scope = LDAP_SCOPE_SUBTREE;
2109 op->ors_deref = LDAP_DEREF_NEVER;
2113 op->ors_filter = &f;
2114 op->ors_slimit = 1;
2115 op->ors_tlimit = SLAP_NO_LIMIT;
2116 op->ors_limit = NULL;
2119 op->ors_attrs = attrs;
2120 op->ors_attrsonly = 0;
2122 op->o_req_dn = cm->db.be_suffix[ 0 ];
2123 op->o_req_ndn = cm->db.be_nsuffix[ 0 ];
2125 op->o_tag = LDAP_REQ_SEARCH;
2126 op->o_protocol = LDAP_VERSION3;
2127 op->o_managedsait = SLAP_CONTROL_CRITICAL;
2128 op->o_bd = &cm->db;
2129 op->o_dn = op->o_bd->be_rootdn;
2130 op->o_ndn = op->o_bd->be_rootndn;
2132 op->o_callback = ≻
2138 op->ors_filterstr.bv_len = snprintf( filtbuf, sizeof( filtbuf ),
2140 op->ors_filterstr.bv_val = filtbuf;
2143 rc = op->o_bd->be_search( op, &rs );
2148 vals = (BerVarray)op->o_callback->sc_private;
2155 remove_query_and_data( op, cm, &val );
2162 ber_bvarray_free_x( vals, op->o_tmpmemctx );
2163 op->o_callback->sc_private = NULL;
2175 Operation *op,
2179 Operation op2 = *op;
2196 Operation *op,
2214 if ( op == NULL ) {
2218 op = &opbuf.ob_op;
2221 op2 = *op;
2222 op = &op2;
2225 memset( &op->oq_search, 0, sizeof( op->oq_search ) );
2226 op->ors_scope = LDAP_SCOPE_BASE;
2227 op->ors_deref = LDAP_DEREF_NEVER;
2229 BER_BVSTR( &op->ors_filterstr, "(objectClass=*)" );
2234 op->ors_filterstr.bv_len = snprintf( filter_str,
2242 op->ors_filter = &f;
2243 op->ors_slimit = 1;
2244 op->ors_tlimit = SLAP_NO_LIMIT;
2245 op->ors_limit = NULL;
2248 op->ors_attrs = attrs;
2249 op->ors_attrsonly = 0;
2251 op->o_req_dn = *ndn;
2252 op->o_req_ndn = *ndn;
2254 op->o_tag = LDAP_REQ_SEARCH;
2255 op->o_protocol = LDAP_VERSION3;
2256 op->o_managedsait = SLAP_CONTROL_CRITICAL;
2257 op->o_bd = &cm->db;
2258 op->o_dn = op->o_bd->be_rootdn;
2259 op->o_ndn = op->o_bd->be_rootndn;
2261 op->o_callback = ≻
2263 rc = op->o_bd->be_search( op, &rs );
2268 vals = (BerVarray)op->o_callback->sc_private;
2275 remove_query_and_data( op, cm, &val );
2282 ber_bvarray_free_x( vals, op->o_tmpmemctx );
2290 Operation *op,
2293 struct search_info *si = op->o_callback->sc_private;
2339 pcache_op_cleanup( Operation *op, SlapReply *rs ) {
2340 slap_callback *cb = op->o_callback;
2347 op->o_abandon || rs->sr_err == SLAPD_ABANDON )
2351 op->ors_attrs = si->save_attrs;
2353 if ( (op->o_abandon || rs->sr_err == SLAPD_ABANDON) &&
2368 CachedQuery *qc = qm->addfunc(op, qm, &si->query,
2374 cache_entries( op, &qc->q_uuid );
2425 op->o_callback = op->o_callback->sc_next;
2426 op->o_tmpfree( cb, op->o_tmpmemctx );
2434 Operation *op,
2437 struct search_info *si = op->o_callback->sc_private;
2441 op->ors_attrs = si->save_attrs;
2462 if ( cm->check_cacheability && test_filter( op, rs->sr_entry, si->query.filter ) != LDAP_COMPARE_TRUE ) {
2464 op->o_log_prefix, rs->sr_entry->e_name.bv_val, 0 );
2474 op->o_log_prefix, rs->sr_entry->e_name.bv_val,
2544 Operation *op,
2550 switch( op->o_pagedresults ) {
2560 op->o_log_prefix, non, stripped );
2562 slap_remove_control( op, rs, slap_cids.sc_pagedResults, NULL );
2574 pc_setpw( Operation *op, struct berval *pwd, cache_manager *cm )
2606 op->o_tag = LDAP_REQ_MODIFY;
2607 op->orm_modlist = &mod;
2608 op->o_bd = &cm->db;
2609 op->o_dn = op->o_bd->be_rootdn;
2610 op->o_ndn = op->o_bd->be_rootndn;
2611 op->o_callback = &cb;
2613 op->o_req_dn.bv_val, 0, 0 );
2614 rc = op->o_bd->be_modify( op, &sr );
2626 pc_bind_save( Operation *op, SlapReply *rs )
2629 bindcacheinfo *bci = op->o_callback->sc_private;
2637 Operation op2 = *op;
2638 if ( pc_setpw( &op2, &op->orb_cred, cm ) == LDAP_SUCCESS )
2639 bci->qc->bindref_time = op->o_time + bci->qc->qtemp->bindttr;
2651 pc_bind_attrs( Operation *op, Entry *e, QueryTemplate *temp,
2659 vals = op->o_tmpalloc( temp->bindnattrs * sizeof( struct berval ),
2660 op->o_tmpmemctx );
2672 fbv->bv_val = op->o_tmpalloc( fbv->bv_len + 1, op->o_tmpmemctx );
2687 op->o_tmpfree( vals, op->o_tmpmemctx );
2692 Filter *f = str2filter_x( op, fbv->bv_val );
2702 pc_bind_search( Operation *op, SlapReply *rs )
2705 bindinfo *pbi = op->o_callback->sc_private;
2712 op->o_time < pbi->bi_cq->bindref_time ) {
2724 pbi->bi_cq->bindref_time, op->o_time, 0 );
2732 f = pc_bind_attrs( op, rs->sr_entry, pbi->bi_templ, &fbv );
2733 op->o_tmpfree( fbv.bv_val, op->o_tmpmemctx );
2735 filter_free_x( op, f, 1 );
2743 pc_bind_resp( Operation *op, SlapReply *rs )
2745 bindinfo *pbi = op->o_callback->sc_private;
2747 slap_callback *sc = op->o_callback;
2751 sc = op->o_callback;
2762 Operation *op,
2765 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
2771 if ( op->o_ctrlflag[ privDB_cid ] != SLAP_CONTROL_CRITICAL ) {
2777 send_ldap_error( op, rs, LDAP_UNAVAILABLE,
2783 if ( !be_isroot( op ) ) {
2784 save_cb = op->o_callback;
2785 op->o_callback = NULL;
2786 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
2788 op->o_callback = save_cb;
2794 type = slap_req2op( op->o_tag );
2802 Operation op2 = *op;
2808 op->o_conn->c_authz_cookie = cm->db.be_private;
2816 save_cb = op->o_callback;
2817 op->o_callback = NULL;
2818 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
2820 op->o_callback = save_cb;
2828 Operation *op,
2831 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
2842 if ( op->o_ctrlflag[ privDB_cid ] == SLAP_CONTROL_CRITICAL )
2843 return pcache_op_privdb( op, rs );
2852 if ( temp->bindttr && dnIsSuffix( &op->o_req_ndn, &temp->bindbase ))
2863 op2 = *op;
2864 op2.o_dn = op->o_bd->be_rootdn;
2865 op2.o_ndn = op->o_bd->be_rootndn;
2870 rc = be_entry_get_rw( &op2, &op->o_req_ndn, NULL, NULL, 0, &e );
2873 op2.ors_filter = pc_bind_attrs( op, e, temp, &op2.ors_filterstr );
2880 op2.o_bd = op->o_bd;
2909 BackendDB *be = op->o_bd;
2910 op->o_bd = &cm->db;
2913 op->o_req_dn.bv_val, 0, 0 );
2915 if ( op->o_bd->be_bind( op, rs ) == LDAP_SUCCESS ) {
2916 op->o_conn->c_authz_cookie = cm->db.be_private;
2918 op->o_bd = be;
2930 sc = op->o_tmpalloc( sizeof(slap_callback) + sizeof(bindcacheinfo),
2931 op->o_tmpmemctx );
2936 sc->sc_next = op->o_callback;
2937 op->o_callback = sc;
2948 Operation *op,
2951 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
2968 if ( op->o_ctrlflag[ privDB_cid ] == SLAP_CONTROL_CRITICAL ) {
2969 return pcache_op_privdb( op, rs );
2975 send_ldap_error( op, rs, LDAP_UNAVAILABLE,
2981 cm->db.be_acl = op->o_bd->be_acl;
2986 slap_callback *cb = op->o_callback;
3002 query.filter = op->ors_filter;
3011 answerable = qm->qcfunc(op, qm, &query, qtemp);
3014 tempstr.bv_val = op->o_tmpalloc( op->ors_filterstr.bv_len+1,
3015 op->o_tmpmemctx );
3017 if ( filter2template( op, op->ors_filter, &tempstr ))
3019 op->o_tmpfree( tempstr.bv_val, op->o_tmpmemctx );
3027 attr_set = get_attr_set(op->ors_attrs, qm, cm->numattrsets);
3029 query.base = op->o_req_ndn;
3030 query.scope = op->ors_scope;
3042 op->ors_filterstr.bv_val, 0, 0 );
3043 answerable = qm->qcfunc(op, qm, &query, qt);
3050 op->o_tmpfree( tempstr.bv_val, op->o_tmpmemctx );
3054 BackendDB *save_bd = op->o_bd;
3069 send_ldap_result( op, rs );
3077 op->o_bd = &cm->db;
3085 if ( overlay_callback_after_backover( op, &cb, 0) == 0 ) {
3087 for ( scp = &op->o_callback; *scp != NULL;
3096 i = cm->db.bd_info->bi_op_search( op, rs );
3101 op->o_bd = save_bd;
3113 if (op->ors_attrsonly)
3121 query.filter = filter_dup(op->ors_filter, NULL);
3123 cb = op->o_tmpalloc( sizeof(*cb) + sizeof(*si), op->o_tmpmemctx );
3137 if ( op->ors_slimit > 0 && op->ors_slimit < cm->num_entries_limit ) {
3138 si->slimit = op->ors_slimit;
3139 op->ors_slimit = cm->num_entries_limit;
3144 si->save_attrs = op->ors_attrs;
3149 op->ors_attrs = qtemp->t_attrs.attrs;
3152 cb->sc_next = op->o_callback;
3153 op->o_callback = cb;
3162 for ( pcb = &op->o_callback; *pcb; pcb = &(*pcb)->sc_next );
3264 static dnlist *dnl_alloc( Operation *op, struct berval *bvdn )
3266 dnlist *dn = op->o_tmpalloc( sizeof(dnlist) + bvdn->bv_len + 1,
3267 op->o_tmpmemctx );
3276 refresh_merge( Operation *op, SlapReply *rs )
3279 refresh_info *ri = op->o_callback->sc_private;
3285 ocb = op->o_callback;
3287 op->o_bd = ri->ri_be;
3288 rc = be_entry_get_rw( op, &rs->sr_entry->e_nname, NULL, NULL, 0, &e );
3293 merge_entry( op, rs->sr_entry, 1, &ri->ri_q->q_uuid );
3319 syncrepl_diff_entry( op, ne.e_attrs, rs->sr_entry->e_attrs,
3321 be_entry_release_r( op, e );
3327 struct berval dn = op->o_req_dn;
3328 struct berval ndn = op->o_req_ndn;
3329 op->o_tag = LDAP_REQ_MODIFY;
3330 op->orm_modlist = mods;
3331 op->o_req_dn = rs->sr_entry->e_name;
3332 op->o_req_ndn = rs->sr_entry->e_nname;
3333 op->o_callback = &cb;
3334 op->o_bd->be_modify( op, &rs2 );
3338 op->o_req_dn = dn;
3339 op->o_req_ndn = ndn;
3344 dnl = dnl_alloc( op, &rs->sr_entry->e_nname );
3352 op->o_callback = ocb;
3358 refresh_purge( Operation *op, SlapReply *rs )
3361 refresh_info *ri = op->o_callback->sc_private;
3369 op->o_tmpfree( *dn, op->o_tmpmemctx );
3378 dnlist *dnl = dnl_alloc( op, &rs->sr_entry->e_nname );
3390 refresh_query( Operation *op, CachedQuery *query, slap_overinst *on )
3410 ri.ri_be = op->o_bd;
3413 op->o_tag = LDAP_REQ_SEARCH;
3414 op->o_protocol = LDAP_VERSION3;
3415 op->o_callback = &cb;
3416 op->o_do_not_cache = 1;
3418 op->o_req_dn = query->qbase->base;
3419 op->o_req_ndn = query->qbase->base;
3420 op->ors_scope = query->scope;
3421 op->ors_slimit = SLAP_NO_LIMIT;
3422 op->ors_tlimit = SLAP_NO_LIMIT;
3423 op->ors_limit = NULL;
3424 op->ors_filter = query->filter;
3425 filter2bv_x( op, query->filter, &op->ors_filterstr );
3426 op->ors_attrs = query->qtemp->t_attrs.attrs;
3427 op->ors_attrsonly = 0;
3429 op->o_bd = on->on_info->oi_origdb;
3430 rc = op->o_bd->be_search( op, &rs );
3432 op->o_bd = ri.ri_be;
3439 op->o_bd = ri.ri_be;
3440 op->o_req_dn = op->o_bd->be_suffix[0];
3441 op->o_req_ndn = op->o_bd->be_nsuffix[0];
3442 op->ors_scope = LDAP_SCOPE_SUBTREE;
3443 op->ors_deref = LDAP_DEREF_NEVER;
3444 op->ors_filterstr.bv_len = snprintf(filter_str, sizeof(filter_str),
3451 op->ors_attrs = attrs;
3452 op->ors_attrsonly = 0;
3454 rc = op->o_bd->be_search( op, &rs );
3458 op->o_req_dn = dn->dn;
3459 op->o_req_ndn = dn->dn;
3462 op->o_tag = LDAP_REQ_DELETE;
3463 op->o_bd->be_delete( op, &rs );
3479 op->o_tag = LDAP_REQ_MODIFY;
3480 op->orm_modlist = &mod;
3481 op->o_bd->be_modify( op, &rs );
3484 op->o_tmpfree( dn, op->o_tmpmemctx );
3489 slap_sl_mem_create(SLAP_SLAB_SIZE, SLAP_SLAB_STACK, op->o_threadctx, 1 );
3504 Operation *op;
3517 op = &opbuf.ob_op;
3519 op->o_bd = &cm->db;
3520 op->o_dn = cm->db.be_rootdn;
3521 op->o_ndn = cm->db.be_rootndn;
3529 op->o_time = slap_get_time();
3537 ttl += op->o_time;
3542 if ( query->refresh_time && query->refresh_time < op->o_time ) {
3549 query->expiry_time = op->o_time + templ->ttl;
3550 if ( query->expiry_time > op->o_time ) {
3551 refresh_query( op, query, on );
3556 if (query->expiry_time < op->o_time) {
3579 return_val = remove_query_data(op, &query->q_uuid);
3775 pc_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca )
3796 config_build_entry( op, rs, pe, ca, &bv, cm->db.bd_info->bi_cf_ocs,
3816 if ( c->op == SLAP_CONFIG_EMIT ) {
3922 } else if ( c->op == LDAP_MOD_DELETE ) {
4533 pcache_cachedquery_open_cb( Operation *op, SlapReply *rs )
4535 assert( op->o_tag == LDAP_REQ_SEARCH );
4546 valsp = op->o_callback->sc_private;
4549 ber_bvarray_dup_x( valsp, a->a_nvals, op->o_tmpmemctx );
4557 pcache_cachedquery_count_cb( Operation *op, SlapReply *rs )
4559 assert( op->o_tag == LDAP_REQ_SEARCH );
4562 int *countp = (int *)op->o_callback->sc_private;
4609 Operation *op;
4618 op = &opbuf.ob_op;
4620 op->o_bd = &cm->db;
4622 op->o_tag = LDAP_REQ_SEARCH;
4623 op->o_protocol = LDAP_VERSION3;
4626 op->o_callback = &cb;
4627 op->o_time = slap_get_time();
4628 op->o_do_not_cache = 1;
4629 op->o_managedsait = SLAP_CONTROL_CRITICAL;
4631 op->o_dn = cm->db.be_rootdn;
4632 op->o_ndn = cm->db.be_rootndn;
4633 op->o_req_dn = cm->db.be_suffix[ 0 ];
4634 op->o_req_ndn = cm->db.be_nsuffix[ 0 ];
4636 op->ors_scope = LDAP_SCOPE_BASE;
4637 op->ors_deref = LDAP_DEREF_NEVER;
4638 op->ors_slimit = 1;
4639 op->ors_tlimit = SLAP_NO_LIMIT;
4640 op->ors_limit = NULL;
4641 ber_str2bv( "(pcacheQueryURL=*)", 0, 0, &op->ors_filterstr );
4644 op->ors_filter = &f;
4647 op->ors_attrs = attrs;
4648 op->ors_attrsonly = 0;
4650 rc = op->o_bd->be_search( op, &rs );
4655 if ( url2query( vals[ i ].bv_val, op, qm ) == 0 ) {
4660 ber_bvarray_free_x( vals, op->o_tmpmemctx );
4670 ber_str2bv( "(!(objectClass=glue))", 0, 0, &op->ors_filterstr );
4672 op->ors_slimit = SLAP_NO_LIMIT;
4673 op->ors_scope = LDAP_SCOPE_SUBTREE;
4674 op->ors_attrs = slap_anlist_no_attrs;
4677 op->o_callback->sc_response = pcache_cachedquery_count_cb;
4678 op->o_callback->sc_private = &rs.sr_nentries;
4680 rc = op->o_bd->be_search( op, &rs );
4795 Operation *op;
4804 op = &opbuf.ob_op;
4812 if ( query2url( op, qc, &bv, 0 ) == 0 ) {
4813 ber_bvarray_add_x( &vals, &bv, op->o_tmpmemctx );
4820 op->o_bd = &cm->db;
4821 op->o_dn = cm->db.be_rootdn;
4822 op->o_ndn = cm->db.be_rootndn;
4824 op->o_tag = LDAP_REQ_MODIFY;
4825 op->o_protocol = LDAP_VERSION3;
4827 op->o_callback = &cb;
4828 op->o_time = slap_get_time();
4829 op->o_do_not_cache = 1;
4830 op->o_managedsait = SLAP_CONTROL_CRITICAL;
4832 op->o_req_dn = op->o_bd->be_suffix[0];
4833 op->o_req_ndn = op->o_bd->be_nsuffix[0];
4846 op->orm_modlist = &mod;
4848 op->o_bd->be_modify( op, &rs );
4850 ber_bvarray_free_x( vals, op->o_tmpmemctx );
4946 Operation *op,
4950 if ( op->o_ctrlflag[ privDB_cid ] != SLAP_CONTROL_NONE ) {
4965 op->o_ctrlflag[ privDB_cid ] = SLAP_CONTROL_CRITICAL;
5185 Operation *op,
5188 BackendDB *bd = op->o_bd;
5200 rs->sr_err = pcache_parse_query_delete( op->ore_reqdata,
5201 &tag, &op->o_req_ndn, uuidp,
5202 &rs->sr_text, op->o_tmpmemctx );
5208 assert( !BER_BVISNULL( &op->o_req_ndn ) );
5209 len = snprintf( buf, sizeof( buf ), " dn=\"%s\"", op->o_req_ndn.bv_val );
5216 op->o_log_prefix, buf, 0 );
5218 op->o_req_dn = op->o_req_ndn;
5220 op->o_bd = select_backend( &op->o_req_ndn, 0 );
5221 if ( op->o_bd == NULL ) {
5222 send_ldap_error( op, rs, LDAP_NO_SUCH_OBJECT,
5225 rs->sr_err = backend_check_restrictions( op, rs,
5231 if ( op->o_bd->be_extended == NULL ) {
5232 send_ldap_error( op, rs, LDAP_UNAVAILABLE_CRITICAL_EXTENSION,
5237 op->o_bd->be_extended( op, rs );
5240 if ( !BER_BVISNULL( &op->o_req_ndn ) ) {
5241 op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
5242 BER_BVZERO( &op->o_req_ndn );
5243 BER_BVZERO( &op->o_req_dn );
5247 op->o_tmpfree( uuid.bv_val, op->o_tmpmemctx );
5250 op->o_bd = bd;
5257 pcache_op_extended( Operation *op, SlapReply *rs )
5259 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
5263 if ( op->o_ctrlflag[ privDB_cid ] == SLAP_CONTROL_CRITICAL ) {
5264 return pcache_op_privdb( op, rs );
5269 if ( bvmatch( &op->ore_reqoid, &pcache_exop_QUERY_DELETE ) ) {
5273 rs->sr_err = pcache_parse_query_delete( op->ore_reqdata,
5274 &tag, NULL, &uuid, &rs->sr_text, op->o_tmpmemctx );
5279 rs->sr_err = pcache_remove_entry_queries_from_cache( op,
5280 cm, &op->o_req_ndn, &uuid );
5285 rs->sr_err = pcache_remove_query_from_cache( op,
5295 op->o_tmpfree( uuid.bv_val, op->o_tmpmemctx );
5301 if ( bvmatch( &op->ore_reqoid, &pcache_exop_MODIFY_PASSWD ) &&
5307 Operation op2 = *op;
5313 op2.o_dn = op->o_bd->be_rootdn;
5314 op2.o_ndn = op->o_bd->be_rootndn;
5315 rc = be_entry_get_rw( &op2, &op->o_req_ndn, NULL,
5329 rc = overlay_op_walk( op, rs, op_extended, on->on_info,
5332 req_pwdexop_s *qpw = &op->oq_pwdexop;
5344 pcache_entry_release( Operation *op, Entry *e, int rw )
5346 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
5348 BackendDB *db = op->o_bd;
5351 op->o_bd = &cm->db;
5352 rc = be_entry_release_rw( op, e, rw );
5353 op->o_bd = db;
5361 Operation *op,
5382 if ( query2url( op, qc, &bv, 1 ) == 0 ) {
5383 ber_bvarray_add_x( &vals, &bv, op->o_tmpmemctx );
5391 ber_bvarray_free_x( vals, op->o_tmpmemctx );