Lines Matching defs:del_ctx

104     struct mbof_del_ctx *del_ctx;
1283 static int mbof_del_cleanup_parents(struct mbof_del_ctx *del_ctx);
1286 static int mbof_del_cleanup_children(struct mbof_del_ctx *del_ctx);
1302 static int mbof_del_fill_muop(struct mbof_del_ctx *del_ctx,
1304 static int mbof_del_fill_ghop(struct mbof_del_ctx *del_ctx,
1309 static int mbof_del_ghop(struct mbof_del_ctx *del_ctx);
1326 struct mbof_del_ctx *del_ctx;
1341 del_ctx = talloc_zero(ctx, struct mbof_del_ctx);
1342 if (!del_ctx) {
1346 del_ctx->ctx = ctx;
1351 first = talloc_zero(del_ctx, struct mbof_del_operation);
1356 del_ctx->first = first;
1358 first->del_ctx = del_ctx;
1367 sret = sss_filter_sanitize(del_ctx, dn, &clean_dn);
1373 expression = talloc_asprintf(del_ctx,
1382 ret = ldb_build_search_req(&search, ldb, del_ctx,
1401 struct mbof_del_ctx *del_ctx;
1406 del_ctx = first->del_ctx;
1407 ctx = del_ctx->ctx;
1470 ret = mbof_orig_del(del_ctx);
1481 static int mbof_orig_del(struct mbof_del_ctx *del_ctx)
1487 ctx = del_ctx->ctx;
1491 del_ctx, mbof_orig_del_callback,
1504 struct mbof_del_ctx *del_ctx;
1508 del_ctx = talloc_get_type(req->context, struct mbof_del_ctx);
1509 ctx = del_ctx->ctx;
1535 if (del_ctx->first->num_parents) {
1538 ret = mbof_del_fill_muop(del_ctx, del_ctx->first->entry);
1545 ret = mbof_del_fill_ghop(del_ctx, del_ctx->first->entry);
1552 ret = mbof_del_cleanup_parents(del_ctx);
1554 else if (ldb_msg_find_element(del_ctx->first->entry, DB_MEMBER)) {
1556 ret = mbof_del_cleanup_children(del_ctx);
1559 else if (del_ctx->muops) {
1560 return mbof_del_muop(del_ctx);
1563 else if (del_ctx->ghops) {
1564 return mbof_del_ghop(del_ctx);
1582 static int mbof_del_cleanup_parents(struct mbof_del_ctx *del_ctx)
1593 first = del_ctx->first;
1594 ctx = del_ctx->ctx;
1621 del_ctx, mbof_del_clean_par_callback,
1635 struct mbof_del_ctx *del_ctx;
1639 del_ctx = talloc_get_type(req->context, struct mbof_del_ctx);
1640 first = del_ctx->first;
1641 ctx = del_ctx->ctx;
1665 ret = mbof_del_cleanup_parents(del_ctx);
1671 ret = mbof_del_cleanup_children(del_ctx);
1674 else if (del_ctx->muops) {
1675 return mbof_del_muop(del_ctx);
1678 else if (del_ctx->ghops) {
1679 return mbof_del_ghop(del_ctx);
1699 static int mbof_del_cleanup_children(struct mbof_del_ctx *del_ctx)
1708 first = del_ctx->first;
1709 ctx = del_ctx->ctx;
1743 delop->del_ctx = parent->del_ctx;
1763 struct mbof_del_ctx *del_ctx;
1774 del_ctx = delop->del_ctx;
1775 ctx = del_ctx->ctx;
1784 ret = sss_filter_sanitize(del_ctx, dn, &clean_dn);
1789 expression = talloc_asprintf(del_ctx,
1814 struct mbof_del_ctx *del_ctx;
1821 del_ctx = delop->del_ctx;
1822 ctx = del_ctx->ctx;
1950 struct mbof_del_ctx *del_ctx;
1958 del_ctx = delop->del_ctx;
1959 ctx = del_ctx->ctx;
1981 struct mbof_del_ctx *del_ctx;
1991 del_ctx = delop->del_ctx;
1992 ctx = del_ctx->ctx;
2059 if (ldb_dn_compare(valdn, del_ctx->first->entry_dn) == 0) {
2102 struct mbof_del_ctx *del_ctx;
2116 del_ctx = delop->del_ctx;
2117 ctx = del_ctx->ctx;
2147 diff = talloc_array(del_ctx, struct ldb_dn *,
2158 if (!del_ctx->is_mod) {
2159 if (ldb_dn_compare(del_ctx->first->entry_dn, diff[j]) == 0) {
2235 ret = mbof_append_muop(del_ctx, &del_ctx->muops,
2236 &del_ctx->num_muops,
2243 talloc_steal(del_ctx->muops, diff[i]);
2263 struct mbof_del_ctx *del_ctx;
2269 del_ctx = delop->del_ctx;
2270 ctx = del_ctx->ctx;
2316 struct mbof_del_ctx *del_ctx;
2323 del_ctx = delop->del_ctx;
2324 ctx = del_ctx->ctx;
2360 if (del_ctx->muops) {
2361 return mbof_del_muop(del_ctx);
2364 else if (del_ctx->ghops) {
2365 return mbof_del_ghop(del_ctx);
2368 if (del_ctx->follow_mod) {
2369 return mbof_mod_add(del_ctx->follow_mod,
2370 del_ctx->follow_mod->mb_add,
2371 del_ctx->follow_mod->gh_add);
2385 struct mbof_del_ctx *del_ctx;
2388 del_ctx = delop->del_ctx;
2391 save = talloc_zero(del_ctx, struct mbof_dn);
2397 if (del_ctx->history) {
2398 tmp = del_ctx->history;
2402 del_ctx->history = save;
2417 for (tmp = del_ctx->history; tmp; tmp = tmp->next) {
2435 static int mbof_del_fill_muop(struct mbof_del_ctx *del_ctx,
2464 name = talloc_strdup(del_ctx,
2473 valdn = ldb_dn_from_ldb_val(del_ctx,
2474 ldb_module_get_ctx(del_ctx->ctx->module),
2477 ldb_debug(ldb_module_get_ctx(del_ctx->ctx->module),
2483 ret = mbof_append_muop(del_ctx, &del_ctx->muops,
2484 &del_ctx->num_muops,
2491 talloc_steal(del_ctx->muops, valdn);
2497 static int mbof_del_fill_ghop_ex(struct mbof_del_ctx *del_ctx,
2528 ldb_debug(ldb_module_get_ctx(del_ctx->ctx->module),
2534 valdn = ldb_dn_from_ldb_val(del_ctx,
2535 ldb_module_get_ctx(del_ctx->ctx->module),
2538 ldb_debug(ldb_module_get_ctx(del_ctx->ctx->module),
2544 ldb_debug(ldb_module_get_ctx(del_ctx->ctx->module),
2550 ret = mbof_append_muop(del_ctx, &del_ctx->ghops,
2551 &del_ctx->num_ghops,
2559 talloc_steal(del_ctx->ghops, valdn);
2566 static int mbof_del_fill_ghop(struct mbof_del_ctx *del_ctx,
2577 return mbof_del_fill_ghop_ex(del_ctx, entry,
2582 static int mbof_del_muop(struct mbof_del_ctx *del_ctx)
2590 ctx = del_ctx->ctx;
2593 msg = ldb_msg_new(del_ctx);
2596 msg->dn = del_ctx->muops[del_ctx->cur_muop].dn;
2597 msg->elements = del_ctx->muops[del_ctx->cur_muop].el;
2600 ret = ldb_build_mod_req(&mod_req, ldb, del_ctx,
2602 del_ctx, mbof_del_muop_callback,
2614 struct mbof_del_ctx *del_ctx;
2618 del_ctx = talloc_get_type(req->context, struct mbof_del_ctx);
2619 ctx = del_ctx->ctx;
2648 del_ctx->cur_muop++;
2649 if (del_ctx->cur_muop < del_ctx->num_muops) {
2650 ret = mbof_del_muop(del_ctx);
2653 else if (del_ctx->ghops) {
2654 return mbof_del_ghop(del_ctx);
2657 else if (del_ctx->follow_mod) {
2658 return mbof_mod_add(del_ctx->follow_mod,
2659 del_ctx->follow_mod->mb_add,
2660 del_ctx->follow_mod->gh_add);
2680 static int mbof_del_ghop(struct mbof_del_ctx *del_ctx)
2688 ctx = del_ctx->ctx;
2691 msg = ldb_msg_new(del_ctx);
2694 msg->dn = del_ctx->ghops[del_ctx->cur_ghop].dn;
2696 ret = ldb_msg_add(msg, del_ctx->ghops[del_ctx->cur_ghop].el,
2716 ret = ldb_build_mod_req(&mod_req, ldb, del_ctx,
2718 del_ctx, mbof_del_ghop_callback,
2730 struct mbof_del_ctx *del_ctx;
2734 del_ctx = talloc_get_type(req->context, struct mbof_del_ctx);
2735 ctx = del_ctx->ctx;
2765 del_ctx->cur_ghop++;
2766 if (del_ctx->cur_ghop < del_ctx->num_ghops) {
2767 ret = mbof_del_ghop(del_ctx);
2770 else if (del_ctx->follow_mod) {
2771 return mbof_mod_add(del_ctx->follow_mod,
2772 del_ctx->follow_mod->mb_add,
2773 del_ctx->follow_mod->gh_add);
3699 struct mbof_del_ctx *del_ctx;
3705 del_ctx = talloc_zero(mod_ctx, struct mbof_del_ctx);
3706 if (!del_ctx) {
3709 del_ctx->ctx = ctx;
3710 del_ctx->is_mod = true;
3715 first = talloc_zero(del_ctx, struct mbof_del_operation);
3719 del_ctx->first = first;
3724 del_ctx->follow_mod = mod_ctx;
3727 first->del_ctx = del_ctx;
3732 ret = mbof_del_fill_ghop_ex(del_ctx, del_ctx->first->entry,
3753 return mbof_del_ghop(del_ctx);