Lines Matching defs:delop

1289 static int mbof_del_execute_op(struct mbof_del_operation *delop);
1292 static int mbof_del_execute_cont(struct mbof_del_operation *delop);
1293 static int mbof_del_ancestors(struct mbof_del_operation *delop);
1296 static int mbof_del_mod_entry(struct mbof_del_operation *delop);
1299 static int mbof_del_progeny(struct mbof_del_operation *delop);
1300 static int mbof_del_get_next(struct mbof_del_operation *delop,
1312 static void free_delop_contents(struct mbof_del_operation *delop);
1736 struct mbof_del_operation *delop;
1738 delop = talloc_zero(parent, struct mbof_del_operation);
1739 if (!delop) {
1743 delop->del_ctx = parent->del_ctx;
1744 delop->parent = parent;
1745 delop->entry_dn = entry_dn;
1751 talloc_free(delop);
1755 parent->children[parent->num_children] = delop;
1761 static int mbof_del_execute_op(struct mbof_del_operation *delop)
1774 del_ctx = delop->del_ctx;
1779 dn = ldb_dn_get_linearized(delop->entry_dn);
1797 ret = ldb_build_search_req(&search, ldb, delop,
1800 delop, mbof_del_exop_search_callback,
1813 struct mbof_del_operation *delop;
1820 delop = talloc_get_type(req->context, struct mbof_del_operation);
1821 del_ctx = delop->del_ctx;
1840 if (ldb_dn_compare(msg->dn, delop->entry_dn) == 0) {
1842 if (delop->entry != NULL) {
1845 ldb_dn_get_linearized(delop->entry_dn));
1851 delop->entry = talloc_steal(delop, msg);
1852 if (delop->entry == NULL) {
1857 delop->parents = talloc_realloc(delop, delop->parents,
1859 delop->num_parents + 1);
1860 if (!delop->parents) {
1864 msg = talloc_steal(delop->parents, msg);
1869 delop->parents[delop->num_parents] = msg;
1870 delop->num_parents++;
1878 if (delop->entry == NULL) {
1885 ret = mbof_del_execute_cont(delop);
1897 static int mbof_del_execute_cont(struct mbof_del_operation *delop)
1903 anc_ctx = talloc_zero(delop, struct mbof_del_ancestors_ctx);
1907 delop->anc_ctx = anc_ctx;
1917 new_list->num = delop->num_parents;
1920 delop->anc_ctx->new_list = new_list;
1921 delop->anc_ctx->num_direct = new_list->num;
1928 return mbof_del_mod_entry(delop);
1938 for (i = 0; i < delop->num_parents; i++) {
1939 new_list->dns[i] = delop->parents[i]->dn;
1944 return mbof_del_ancestors(delop);
1947 static int mbof_del_ancestors(struct mbof_del_operation *delop)
1958 del_ctx = delop->del_ctx;
1961 anc_ctx = delop->anc_ctx;
1967 delop, mbof_del_anc_callback,
1980 struct mbof_del_operation *delop;
1990 delop = talloc_get_type(req->context, struct mbof_del_operation);
1991 del_ctx = delop->del_ctx;
1994 anc_ctx = delop->anc_ctx;
2084 ret = mbof_del_ancestors(delop);
2087 ret = mbof_del_mod_entry(delop);
2100 static int mbof_del_mod_entry(struct mbof_del_operation *delop)
2116 del_ctx = delop->del_ctx;
2119 new_list = delop->anc_ctx->new_list;
2124 ret = entry_is_user_object(delop->entry);
2143 el = ldb_msg_find_element(delop->entry, DB_MEMBEROF);
2170 msg = ldb_msg_new(delop);
2173 msg->dn = delop->entry_dn;
2229 name = ldb_msg_find_attr_as_string(delop->entry, DB_NAME, NULL);
2247 ret = ldb_build_mod_req(&mod_req, ldb, delop,
2249 delop, mbof_del_mod_callback,
2262 struct mbof_del_operation *delop;
2268 delop = talloc_get_type(req->context, struct mbof_del_operation);
2269 del_ctx = delop->del_ctx;
2298 ret = mbof_del_progeny(delop);
2313 static int mbof_del_progeny(struct mbof_del_operation *delop)
2323 del_ctx = delop->del_ctx;
2330 el = ldb_msg_find_element(delop->entry, DB_MEMBER);
2333 valdn = ldb_dn_from_ldb_val(delop, ldb, &el->values[i]);
2340 ret = mbof_append_delop(delop, valdn);
2348 ret = mbof_del_get_next(delop, &nextop);
2353 free_delop_contents(delop);
2381 static int mbof_del_get_next(struct mbof_del_operation *delop,
2388 del_ctx = delop->del_ctx;
2390 /* first of all, save the current delop in the history */
2395 save->dn = delop->entry_dn;
2406 for (top = delop; top; top = top->parent) {
2792 /* delop may carry on a lot of memory, so we need a function to clean up
2793 * the payload without breaking the delop chain */
2794 static void free_delop_contents(struct mbof_del_operation *delop)
2796 talloc_zfree(delop->entry);
2797 talloc_zfree(delop->parents);
2798 talloc_zfree(delop->anc_ctx);
2799 delop->num_parents = 0;
2800 delop->cur_parent = 0;