Lines Matching refs:op
67 rdnval_unique_check_cb( Operation *op, SlapReply *rs )
70 int *p = (int *)op->o_callback->sc_private;
78 rdnval_unique_check( Operation *op, BerVarray vals )
80 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
82 BackendDB db = *op->o_bd;
83 Operation op2 = *op;
92 if ( op->o_tag == LDAP_REQ_ADD
93 && be_issuffix( op->o_bd, &op->o_req_ndn ) )
101 op2.o_dn = op->o_bd->be_rootdn;
102 op2.o_ndn = op->o_bd->be_rootndn;
107 dnParent( &op->o_req_ndn, &op2.o_req_dn );
121 fvals = op->o_tmpcalloc( sizeof( struct berval ), i + 1,
122 op->o_tmpmemctx );
131 1, op->o_tmpmemctx );
136 op2.ors_filterstr.bv_val = op->o_tmpalloc( op2.ors_filterstr.bv_len + 1, op->o_tmpmemctx );
156 op2.ors_filter = str2filter_x( op, op2.ors_filterstr.bv_val );
161 filter_free_x( op, op2.ors_filter, 1 );
162 op->o_tmpfree( op2.ors_filterstr.bv_val, op->o_tmpmemctx );
165 op->o_tmpfree( fvals[ i ].bv_val, op->o_tmpmemctx );
168 op->o_tmpfree( fvals, op->o_tmpmemctx );
179 Operation *op,
196 LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) )
201 op->o_log_prefix, dn->bv_val, 0 );
209 (char **)&rs->sr_text, LDAP_DN_FORMAT_LDAP, op->o_tmpmemctx ) )
214 op->o_log_prefix, ndn->bv_val, 0 );
239 op->o_log_prefix,
249 op->o_log_prefix, rdn[ i ]->la_attr.bv_val, 0 );
258 op->o_tmpmemctx )
268 if ( rdnval_unique_check( op, *valsp ) != LDAP_SUCCESS ) {
276 ldap_rdnfree_x( rdn, op->o_tmpmemctx );
280 ldap_rdnfree_x( nrdn, op->o_tmpmemctx );
297 rdnval_op_add( Operation *op, SlapReply *rs )
305 assert( op->ora_e != NULL );
307 if ( BER_BVISEMPTY( &op->ora_e->e_nname ) ) {
311 a = attr_find( op->ora_e->e_attrs, ad_rdnValue );
317 rc = rdnval_rdn2vals( op, rs, &op->ora_e->e_name, &op->ora_e->e_nname,
320 send_ldap_result( op, rs );
329 for ( ap = &op->ora_e->e_attrs; *ap != NULL; ap = &(*ap)->a_next )
338 rdnval_op_rename( Operation *op, SlapReply *rs )
346 dnRdn( &op->o_req_dn, &old );
347 if ( dn_match( &old, &op->orr_newrdn ) ) {
348 dnRdn( &op->o_req_ndn, &old );
349 if ( dn_match( &old, &op->orr_nnewrdn ) ) {
354 rc = rdnval_rdn2vals( op, rs, &op->orr_newrdn, &op->orr_nnewrdn,
357 send_ldap_result( op, rs );
371 for ( mlp = &op->orr_modlist; *mlp != NULL; mlp = &(*mlp)->sml_next )
419 rdnval_repair_cb( Operation *op, SlapReply *rs )
422 rdnval_repair_cb_t *rcb = op->o_callback->sc_private;
427 BackendDB *save_bd = op->o_bd;
443 op->o_bd = rcb->bd;
444 rc = rdnval_rdn2vals( op, rs, &rs->sr_entry->e_name, &rs->sr_entry->e_nname,
446 op->o_bd = save_bd;
452 mod = op->o_tmpalloc( len, op->o_tmpmemctx );
464 op->o_log_prefix, rs->sr_entry->e_name.bv_val, 0 );
476 Operation *op;
485 op = &opbuf.ob_op;
487 op->o_tag = LDAP_REQ_SEARCH;
488 memset( &op->oq_search, 0, sizeof( op->oq_search ) );
492 op->o_bd = select_backend( &be->be_nsuffix[ 0 ], 0 );
493 assert( op->o_bd != NULL );
494 assert( op->o_bd->be_nsuffix != NULL );
496 op->o_req_dn = op->o_bd->be_suffix[ 0 ];
497 op->o_req_ndn = op->o_bd->be_nsuffix[ 0 ];
499 op->o_dn = op->o_bd->be_rootdn;
500 op->o_ndn = op->o_bd->be_rootndn;
502 op->ors_scope = LDAP_SCOPE_SUBTREE;
503 op->ors_tlimit = SLAP_NO_LIMIT;
504 op->ors_slimit = SLAP_NO_LIMIT;
505 op->ors_attrs = slap_anlist_no_attrs;
507 op->ors_filterstr.bv_len = STRLENOF( "(!(=*))" ) + ad_rdnValue->ad_cname.bv_len;
508 op->ors_filterstr.bv_val = op->o_tmpalloc( op->ors_filterstr.bv_len + 1, op->o_tmpmemctx );
509 snprintf( op->ors_filterstr.bv_val, op->ors_filterstr.bv_len + 1,
512 op->ors_filter = str2filter_x( op, op->ors_filterstr.bv_val );
513 if ( op->ors_filter == NULL ) {
518 op->o_callback = ≻
525 (void)op->o_bd->bd_info->bi_op_search( op, &rs );
527 op->o_tag = LDAP_REQ_MODIFY;
530 memset( &op->oq_modify, 0, sizeof( req_modify_s ) );
548 op->o_req_dn = rmod->ndn;
549 op->o_req_ndn = rmod->ndn;
551 op->orm_modlist = mod;
553 op->o_bd->be_modify( op, &rs2 );
555 slap_mods_free( op->orm_modlist, 1 );
558 op->o_log_prefix, rmod->ndn.bv_val, 0 );
563 op->o_log_prefix, rmod->ndn.bv_val, rs2.sr_err );
567 op->o_tmpfree( rmod, op->o_tmpmemctx );
572 op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
573 filter_free_x( op, op->ors_filter, 1 );