Lines Matching refs:op
62 Operation *op,
69 if(!op || !rs) return(0);
74 uc = op->o_callback->sc_private;
88 Operation *op,
94 slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
116 uq.ndn = &op->o_req_ndn;
120 nop->o_ndn = op->o_bd->be_rootndn;
130 op->o_bd->bd_info = (BackendInfo *) on->on_info;
138 op->o_bd->bd_info = (BackendInfo *) on->on_info;
146 static __attribute__ ((noinline)) int dynid_addownerguid(Operation *op, SlapReply *rs)
148 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
154 int cache = op->o_do_not_cache;
155 struct berval op_dn = op->o_dn,
156 op_ndn = op->o_ndn;
157 BackendDB *op_bd = op->o_bd;
162 if (!ddmap->owneruuidAttr || !ddmap->uuidAttr || BER_BVISNULL(&op->o_ndn)) {
166 target_bd = select_backend( &op->o_req_ndn, 0);
170 //op->o_do_not_cache = 1;
171 op->o_dn = op->o_bd->be_rootdn;
172 op->o_ndn = op->o_bd->be_rootndn;
173 op->o_bd = target_bd;
175 if (op->o_conn->c_authz.c_sai_krb5_auth_data_provisioned) {
177 rc = attr_merge_one( op->oq_add.rs_e, ddmap->owneruuidAttr, &op->o_conn->c_authz.c_sai_krb5_pac_id, NULL );
179 rc = be_entry_get_rw( op, target_ndn, NULL, ddmap->uuidAttr, 0, &e );
183 owneruuidAttr = attr_find( op->oq_add.rs_e->e_attrs, ddmap->owneruuidAttr );
187 rc = attr_delete(&(op->oq_add.rs_e->e_attrs), ddmap->owneruuidAttr );
195 rc = attr_merge_one( op->oq_add.rs_e, ddmap->owneruuidAttr, owneruuidAttr->a_vals, NULL );
197 be_entry_release_rw( op, e, 0 );
200 op->o_do_not_cache = cache;
201 op->o_dn = op_dn;
202 op->o_ndn = op_ndn;
203 op->o_bd = op_bd;
214 static __attribute__ ((noinline)) int dynid_addownerguidextended(Operation *op, SlapReply *rs)
216 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
222 int cache = op->o_do_not_cache;
223 struct berval op_dn = op->o_dn,
224 op_ndn = op->o_ndn;
225 BackendDB *op_bd = op->o_bd;
230 if (!ddmap->owneruuidAttr || !ddmap->uuidAttr || BER_BVISNULL(&op->o_ndn)) {
234 target_bd = select_backend( &op->o_req_ndn, 0);
235 target_ndn = &op->o_ndn;
238 rc = be_entry_get_rw( op, target_ndn, NULL, ddmap->uuidAttr, 0, &e );
242 owneruuidAttr = attr_find( op->oq_add.rs_e->e_attrs, ddmap->owneruuidAttr );
246 rc = attr_delete(&(op->oq_add.rs_e->e_attrs), ddmap->owneruuidAttr );
254 rc = attr_merge_one( op->oq_add.rs_e, ddmap->owneruuidAttr, owneruuidAttr->a_vals, NULL );
256 be_entry_release_rw( op, e, 0 );
269 static __attribute__ ((noinline)) int dynid_generate_id(Operation *op)
271 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
278 Operation nop = *op;
299 rc = attr_delete(&(op->oq_add.rs_e->e_attrs), ddmap->idAttr );
300 rc = attr_merge_one( op->oq_add.rs_e, ddmap->idAttr, &bv, NULL );
302 idNumber = attr_find( op->oq_add.rs_e->e_attrs, ddmap->idAttr );
311 op->o_tag = LDAP_REQ_ADD;
314 static __attribute__ ((noinline)) int dynid_generate_uuid(Operation *op)
316 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
328 uuidAttr = attr_find( op->oq_add.rs_e->e_attrs, ddmap->uuidAttr );
332 rc = attr_delete(&(op->oq_add.rs_e->e_attrs), ddmap->uuidAttr );
338 rc = attr_merge_one( op->oq_add.rs_e, ddmap->uuidAttr, &bv, NULL );
345 Operation *op,
350 dynid_ismember_t *ismember = (dynid_ismember_t *)op->o_callback->sc_private;
363 Operation *op,
369 Operation nop = *op;
377 target_bd = select_backend(&op->o_req_ndn, 0);
411 static int __attribute__ ((noinline)) dynid_is_match(Operation *op)
414 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
418 Operation nop = *op;
421 struct berval op_dn = op->o_dn,
422 op_ndn = op->o_ndn;
423 BackendDB *op_bd = op->o_bd;
428 if (!BER_BVISNULL(&op->o_req_ndn) && !BER_BVISNULL(&ddmap->target_dn) && dnIsSuffix(&op->o_req_ndn, &ddmap->target_dn)) {
429 if (!BER_BVISNULL(&ddmap->override_dn) && !op->o_conn->c_authz.c_sai_krb5_auth_data_provisioned) {
432 target_bd = select_backend( &op->o_req_ndn, 0);
436 op->o_dn = op->o_bd->be_rootdn;
437 op->o_ndn = op->o_bd->be_rootndn;
438 op->o_bd = target_bd;
440 entry_rc = be_entry_get_rw( op, &op_ndn, NULL , dynid_uuid, 0, &theEntry ); // user uuid
449 dynid_is_member ( op, &ddmap->override_dn, dynid_memberships, uuidAttr->a_nvals , &isMember);
459 be_entry_release_r(op, theEntry);
462 op->o_dn = op_dn;
463 op->o_ndn = op_ndn;
464 op->o_bd = op_bd;
477 static int dynid_add(Operation *op, SlapReply *rs) {
478 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
484 if ( !op->o_bd ) return SLAP_CB_CONTINUE;
486 switch(op->o_tag) {
488 //Debug( LDAP_DEBUG_TRACE, "dynid: LDAP_REQ_ADD[%s]\n", op->o_req_dn.bv_val, 0, 0);
489 if (dynid_is_match(op) == LDAP_COMPARE_TRUE)
493 dynid_generate_id(op);
497 dynid_generate_uuid(op);
501 dynid_addownerguid(op, rs);
624 if ( c->op == SLAP_CONFIG_EMIT ) {