Lines Matching refs:op
106 autogroup_add_member_to_group( Operation *op, BerValue *dn, BerValue *ndn, autogroup_entry_t *age )
108 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
113 Operation o = *op;
146 (void)op->o_bd->be_modify( &o, &sreply );
159 autogroup_add_member_values_to_group( Operation *op, Entry *e, autogroup_entry_t *age, AttributeDescription *attrdesc )
161 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
166 Operation o = *op;
197 (void)op->o_bd->be_modify( &o, &sreply );
209 autogroup_delete_member_from_group( Operation *op, BerValue *dn, BerValue *ndn, autogroup_entry_t *age )
211 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
216 Operation o = *op;
258 (void)op->o_bd->be_modify( &o, &sreply );
271 autogroup_delete_member_values_from_group( Operation *op, Entry *e, autogroup_entry_t *age, AttributeDescription *attrdesc )
273 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
278 Operation o = *op;
309 (void)op->o_bd->be_modify( &o, &sreply );
322 autogroup_member_search_cb( Operation *op, SlapReply *rs )
324 assert( op->o_tag == LDAP_REQ_SEARCH );
327 autogroup_ga_t *agg = (autogroup_ga_t *)op->o_callback->sc_private;
380 autogroup_member_search_modify_cb( Operation *op, SlapReply *rs )
382 assert( op->o_tag == LDAP_REQ_SEARCH );
385 autogroup_ga_t *agg = (autogroup_ga_t *)op->o_callback->sc_private;
455 autogroup_add_members_from_filter( Operation *op, Entry *e, autogroup_entry_t *age, autogroup_filter_t *agf, int modify)
457 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
458 Operation o = *op;
502 op->o_bd->be_search( &o, &rs );
508 o = *op;
519 (void)op->o_bd->be_modify( &o, &rs );
539 autogroup_add_group( Operation *op, autogroup_info_t *agi, autogroup_def_t *agd, Entry *e, BerValue *ndn, int scan, int modify)
543 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
550 if ( overlay_entry_get_ov( op, ndn, NULL, NULL, 0, &e, on ) !=
588 overlay_entry_release_ov( op, e, 0, on );
667 autogroup_add_members_from_filter( op, e, (*agep), agf, modify );
696 autogroup_group_add_cb( Operation *op, SlapReply *rs )
698 assert( op->o_tag == LDAP_REQ_SEARCH );
701 autogroup_sc_t *ags = (autogroup_sc_t *)op->o_callback->sc_private;
706 autogroup_add_group( op, ags->ags_info, ags->ags_def, rs->sr_entry, NULL, 0, 0);
718 autogroup_add_entry( Operation *op, SlapReply *rs)
720 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
728 op->ora_e->e_name.bv_val, 0, 0);
734 if ( is_entry_objectclass_or_sub( op->ora_e, agd->agd_oc ) ) {
746 modify_delete_values( op->ora_e, &mod, /* permissive */ 1, &text, textbuf, sizeof( textbuf ) );
748 autogroup_add_group( op, agi, agd, op->ora_e, NULL, 1 , 0);
762 if ( dnIsSuffix( &op->o_req_ndn, &agf->agf_ndn ) ) {
763 rc = test_filter( op, op->ora_e, agf->agf_filter );
766 autogroup_add_member_values_to_group( op, op->ora_e, age, agf->agf_anlist[0].an_desc );
768 autogroup_add_member_to_group( op, &op->ora_e->e_name, &op->ora_e->e_nname, age );
841 autogroup_delete_entry( Operation *op, SlapReply *rs)
843 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
850 Debug( LDAP_DEBUG_TRACE, "==> autogroup_delete_entry <%s>\n", op->o_req_dn.bv_val, 0, 0);
854 if ( overlay_entry_get_ov( op, &op->o_req_ndn, NULL, NULL, 0, &e, on ) !=
856 Debug( LDAP_DEBUG_TRACE, "autogroup_delete_entry: cannot get entry for <%s>\n", op->o_req_dn.bv_val, 0, 0);
884 overlay_entry_release_ov( op, e, 0, on );
896 if ( dnIsSuffix( &op->o_req_ndn, &agf->agf_ndn ) ) {
897 rc = test_filter( op, e, agf->agf_filter );
907 autogroup_delete_member_from_group( op, &e->e_name, &e->e_nname, age );
916 overlay_entry_release_ov( op, e, 0, on );
923 autogroup_response( Operation *op, SlapReply *rs )
925 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
936 if ( op->o_tag == LDAP_REQ_DELETE || op->o_tag == LDAP_REQ_MODIFY ) {
937 if ( rs->sr_type == REP_RESULT && rs->sr_err == LDAP_SUCCESS && !get_manageDSAit( op ) ) {
947 autogroup_delete_member_from_group( op, NULL, NULL, age) ;
950 autogroup_add_members_from_filter( op, NULL, age, agf, 1 );
959 } else if ( op->o_tag == LDAP_REQ_MODRDN ) {
960 if ( rs->sr_type == REP_RESULT && rs->sr_err == LDAP_SUCCESS && !get_manageDSAit( op )) {
962 Debug( LDAP_DEBUG_TRACE, "==> autogroup_response MODRDN from <%s>\n", op->o_req_dn.bv_val, 0, 0);
966 if ( op->oq_modrdn.rs_newSup ) {
967 pdn = *op->oq_modrdn.rs_newSup;
969 dnParent( &op->o_req_dn, &pdn );
971 build_new_dn( &new_dn, &pdn, &op->orr_newrdn, op->o_tmpmemctx );
973 if ( op->oq_modrdn.rs_nnewSup ) {
974 pdn = *op->oq_modrdn.rs_nnewSup;
976 dnParent( &op->o_req_ndn, &pdn );
978 build_new_dn( &new_ndn, &pdn, &op->orr_nnewrdn, op->o_tmpmemctx );
982 dnMatch( &dn_equal, 0, NULL, NULL, &op->o_req_ndn, &new_ndn );
984 if ( overlay_entry_get_ov( op, &new_ndn, NULL, NULL, 0, &e, on ) !=
996 overlay_entry_release_ov( op, e, 0, on );
1009 op->o_tmpmemctx ) == 0 )
1014 dnMatch( &match, 0, NULL, NULL, &age->age_ndn, &op->o_req_ndn );
1020 op->o_tmpfree( new_dn.bv_val, op->o_tmpmemctx );
1021 op->o_tmpfree( new_ndn.bv_val, op->o_tmpmemctx );
1022 overlay_entry_release_ov( op, e, 0, on );
1063 if ( overlay_entry_get_ov( op, &age->age_ndn, NULL, NULL, 0, &group, on ) !=
1067 op->o_tmpfree( new_dn.bv_val, op->o_tmpmemctx );
1068 op->o_tmpfree( new_ndn.bv_val, op->o_tmpmemctx );
1070 overlay_entry_release_ov( op, e, 0, on );
1082 a->a_nvals, ea ? ea->a_nvals : &op->o_req_ndn, op->o_tmpmemctx ) == 0 )
1089 overlay_entry_release_ov( op, group, 0, on );
1105 autogroup_delete_member_from_group( op, NULL, NULL, age) ;
1108 autogroup_add_members_from_filter( op, NULL, age, agf, 1 );
1116 autogroup_delete_member_values_from_group( op, e, age, age->age_filter->agf_anlist[0].an_desc );
1118 autogroup_delete_member_from_group( op, &op->o_req_dn, &op->o_req_ndn, age );
1122 if ( test_filter( op, e, agf->agf_filter ) == LDAP_COMPARE_TRUE ) {
1124 autogroup_add_member_values_to_group( op, e, age, age->age_filter->agf_anlist[0].an_desc );
1126 autogroup_add_member_to_group( op, &new_dn, &new_ndn, age );
1134 autogroup_delete_member_from_group( op, NULL, NULL, age) ;
1137 autogroup_add_members_from_filter( op, NULL, age, agf, 1 );
1141 autogroup_delete_member_from_group( op, &op->o_req_dn, &op->o_req_ndn, age );
1142 autogroup_add_member_to_group( op, &new_dn, &new_ndn, age );
1149 op->o_tmpfree( new_dn.bv_val, op->o_tmpmemctx );
1150 op->o_tmpfree( new_ndn.bv_val, op->o_tmpmemctx );
1152 overlay_entry_release_ov( op, e, 0, on );
1158 if ( op->o_tag == LDAP_REQ_MODIFY ) {
1159 if ( rs->sr_type == REP_RESULT && rs->sr_err == LDAP_SUCCESS && !get_manageDSAit( op ) ) {
1160 Debug( LDAP_DEBUG_TRACE, "==> autogroup_response MODIFY <%s>\n", op->o_req_dn.bv_val, 0, 0);
1164 if ( overlay_entry_get_ov( op, &op->o_req_ndn, NULL, NULL, 0, &e, on ) !=
1166 Debug( LDAP_DEBUG_TRACE, "autogroup_response MODIFY cannot get entry for <%s>\n", op->o_req_dn.bv_val, 0, 0);
1175 Debug( LDAP_DEBUG_TRACE, "autogroup_response MODIFY entry <%s> has no objectClass\n", op->o_req_dn.bv_val, 0, 0);
1176 overlay_entry_release_ov( op, e, 0, on );
1189 op->o_tmpmemctx ) == 0 )
1194 m = op->orm_modlist;
1199 dnMatch( &match, 0, NULL, NULL, &op->o_req_ndn, &age->age_ndn );
1206 op->o_req_dn.bv_val, 0, 0);
1208 overlay_entry_release_ov( op, e, 0, on );
1210 autogroup_delete_member_from_group( op, NULL, NULL, age );
1213 autogroup_add_group( op, agi, group_agd, NULL, &op->o_req_ndn, 1, 1);
1215 overlay_entry_release_ov( op, e, 0, on );
1228 overlay_entry_release_ov( op, e, 0, on );
1257 if ( overlay_entry_get_ov( op, &age->age_ndn, NULL, NULL, 0, &group, on ) !=
1262 overlay_entry_release_ov( op, e, 0, on );
1274 a->a_nvals, ea ? ea->a_nvals : &op->o_req_ndn, op->o_tmpmemctx ) == 0 )
1281 overlay_entry_release_ov( op, group, 0, on );
1284 if ( dnIsSuffix( &op->o_req_ndn, &agf->agf_ndn ) ) {
1285 if ( test_filter( op, e, agf->agf_filter ) == LDAP_COMPARE_TRUE ) {
1294 autogroup_delete_member_values_from_group( op, e, age, age->age_filter->agf_anlist[0].an_desc );
1296 autogroup_delete_member_from_group( op, &op->o_req_dn, &op->o_req_ndn, age );
1300 autogroup_add_member_values_to_group( op, e, age, age->age_filter->agf_anlist[0].an_desc );
1302 autogroup_add_member_to_group( op, &op->o_req_dn, &op->o_req_ndn, age );
1308 overlay_entry_release_ov( op, e, 0, on );
1350 autogroup_modify_entry( Operation *op, SlapReply *rs)
1352 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
1359 if ( get_manageDSAit( op ) ) {
1363 Debug( LDAP_DEBUG_TRACE, "==> autogroup_modify_entry <%s>\n", op->o_req_dn.bv_val, 0, 0);
1366 if ( overlay_entry_get_ov( op, &op->o_req_ndn, NULL, NULL, 0, &e, on ) !=
1368 Debug( LDAP_DEBUG_TRACE, "autogroup_modify_entry cannot get entry for <%s>\n", op->o_req_dn.bv_val, 0, 0);
1379 for ( m = op->orm_modlist ; m ; m = m->sml_next ) {
1381 if ( dnIsSuffix( &op->o_req_ndn, &agf->agf_ndn ) ) {
1382 int rc = test_filter( op, e, agf->agf_filter );
1391 if ( autogroup_memberOf_filter( agf->agf_filter, &op->o_req_ndn, agi->agi_memberof_ad ) ) {
1400 Debug( LDAP_DEBUG_TRACE, "autogroup_modify_entry entry <%s> has no objectClass\n", op->o_req_dn.bv_val, 0, 0);
1412 op->o_tmpmemctx ) == 0 )
1417 m = op->orm_modlist;
1420 dnMatch( &match, 0, NULL, NULL, &op->o_req_ndn, &age->age_ndn );
1425 overlay_entry_release_ov( op, e, 0, on );
1427 Debug( LDAP_DEBUG_TRACE, "autogroup_modify_entry attempted to modify group's <%s> member attribute\n", op->o_req_dn.bv_val, 0, 0);
1428 send_ldap_error(op, rs, LDAP_CONSTRAINT_VIOLATION, "attempt to modify dynamic group member attribute");
1436 overlay_entry_release_ov( op, e, 0, on );
1442 overlay_entry_release_ov( op, e, 0, on );
1451 autogroup_modrdn_entry( Operation *op, SlapReply *rs)
1453 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
1458 if ( get_manageDSAit( op ) ) {
1462 Debug( LDAP_DEBUG_TRACE, "==> autogroup_modrdn_entry <%s>\n", op->o_req_dn.bv_val, 0, 0);
1465 if ( overlay_entry_get_ov( op, &op->o_req_ndn, NULL, NULL, 0, &e, on ) !=
1467 Debug( LDAP_DEBUG_TRACE, "autogroup_modrdn_entry cannot get entry for <%s>\n", op->o_req_dn.bv_val, 0, 0);
1477 if ( dnIsSuffix( &op->o_req_ndn, &agf->agf_ndn ) ) {
1478 int rc = test_filter( op, e, agf->agf_filter );
1487 overlay_entry_release_ov( op, e, 0, on );
1497 autogroup_build_def_filter( autogroup_def_t *agd, Operation *op )
1503 op->ors_filterstr.bv_len = STRLENOF( "(=)" )
1506 ptr = op->ors_filterstr.bv_val = op->o_tmpalloc( op->ors_filterstr.bv_len + 1, op->o_tmpmemctx );
1514 op->ors_filter = str2filter_x( op, op->ors_filterstr.bv_val );
1516 assert( op->ors_filterstr.bv_len == ptr - op->ors_filterstr.bv_val );
1587 if ( c->op == SLAP_CONFIG_EMIT ) {
1625 }else if ( c->op == LDAP_MOD_DELETE ) {
1877 Operation *op;
1891 op = &opbuf.ob_op;
1893 op->ors_attrsonly = 0;
1894 op->o_tag = LDAP_REQ_SEARCH;
1895 op->o_dn = be->be_rootdn;
1896 op->o_ndn = be->be_rootndn;
1898 op->o_req_dn = be->be_suffix[0];
1899 op->o_req_ndn = be->be_nsuffix[0];
1901 op->ors_scope = LDAP_SCOPE_SUBTREE;
1902 op->ors_deref = LDAP_DEREF_NEVER;
1903 op->ors_limit = NULL;
1904 op->ors_tlimit = SLAP_NO_LIMIT;
1905 op->ors_slimit = SLAP_NO_LIMIT;
1906 op->ors_attrs = slap_anlist_no_attrs;
1908 op->o_bd = be;
1909 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1917 op->o_callback = &cb;
1922 autogroup_build_def_filter(agd, op);
1926 op->o_bd->be_search( op, &rs );
1928 filter_free_x( op, op->ors_filter, 1 );
1929 op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );