Lines Matching defs:parents
67 struct mbof_dn_array *parents;
113 struct ldb_message **parents;
307 * First of all a new object cannot yet have parents, so the only memberof
316 * We take the list of memberof attributes and sort out which parents are
323 * already has all the parents (can happen if nested groups create loops).
337 * is in turn copied to all parents of that object so that retrieving a
346 struct mbof_dn_array *parents,
362 /* FIXME: check if this is right, might have to compare parents */
376 addop->parents = parents;
390 struct mbof_dn_array *parents,
397 if (!parents || parents->num == 0) {
398 /* no parents attributes ... */
419 "will add %d ghost users to %d parents\n",
420 num_gh_vals, parents->num);
422 for (i = 0; i < parents->num; i++) {
427 parents->dns[i],
450 struct mbof_dn_array *parents);
466 struct mbof_dn_array *parents;
521 parents = talloc_zero(add_ctx, struct mbof_dn_array);
522 if (!parents) {
525 parents->dns = talloc_array(parents, struct ldb_dn *, 1);
526 if (!parents->dns) {
529 parents->dns[0] = add_ctx->msg_dn;
530 parents->num = 1;
546 ret = mbof_append_addop(add_ctx, parents, valdn);
779 struct mbof_dn_array *parents;
788 parents = talloc_zero(add_ctx, struct mbof_dn_array);
789 if (!parents) {
793 parents->dns = talloc_array(parents, struct ldb_dn *,
794 addop->parents->num);
795 if (!parents->dns) {
800 for (i = 0; i < addop->parents->num; i++) {
802 if (ldb_dn_compare(addop->parents->dns[i], addop->entry_dn) == 0) {
805 parents->dns[parents->num] = addop->parents->dns[i];
806 parents->num++;
824 for (j = 0; j < parents->num; j++) {
825 if (ldb_dn_compare(parents->dns[j], elval_dn) == 0) {
830 if (j < parents->num) {
832 for (;j+1 < parents->num; j++) {
833 parents->dns[j] = parents->dns[j+1];
835 parents->num--;
839 if (parents->num == 0) {
840 /* already contains all parents as memberof, skip to next */
878 ret = mbof_append_addop(add_ctx, parents, valdn);
895 for (i = 0; i < parents->num; i++) {
899 parents->dns[i], name,
917 ret = mbof_add_fill_ghop(add_ctx, addop->entry, parents);
936 el->values = talloc_array(msg, struct ldb_val, parents->num);
940 for (i = 0, j = 0; i < parents->num; i++) {
941 if (ldb_dn_compare(parents->dns[i], msg->dn) == 0) continue;
942 val = ldb_dn_get_linearized(parents->dns[i]);
966 struct mbof_dn_array *parents)
976 return mbof_add_fill_ghop_ex(add_ctx, entry, parents,
1209 * involves an existing object that may have existing parents. So, first, we
1213 * Once we have the results, we store object and parents and proceed with the
1216 * Once the original op returns we proceed fixing parents (parents being each
1220 * points to the object we just deleted. Once done for all parents (or if no
1221 * parents exists), we proceed with the children and descendants.
1224 * the delete we just made. We set as parents of this object the parents just
1269 * attribute, we need to remove that attribute from all its parents as well.
1439 first->parents = talloc_realloc(first, first->parents,
1442 if (!first->parents) {
1446 msg = talloc_steal(first->parents, ares->message);
1451 first->parents[first->num_parents] = msg;
1537 /* if there are parents there may be memberuids to remove */
1551 /* if there are any parents, fire a removal sequence */
1567 /* no parents nor children, end ops */
1597 msg = ldb_msg_new(first->parents);
1600 msg->dn = first->parents[first->cur_parent]->dn;
1619 ret = ldb_build_mod_req(&mod_req, ldb, first->parents,
1664 /* still parents to cleanup, go on */
1857 delop->parents = talloc_realloc(delop, delop->parents,
1860 if (!delop->parents) {
1864 msg = talloc_steal(delop->parents, msg);
1869 delop->parents[delop->num_parents] = msg;
1931 /* fill in the list if we have parents */
1939 new_list->dns[i] = delop->parents[i]->dn;
2530 "will delete %d ghost users from %d parents\n",
2797 talloc_zfree(delop->parents);
2810 * operation. A list of appropriate parents and objects to modify is built, then
3637 struct mbof_dn_array *parents;
3648 /* all the parents + itself */
3649 ret = mbof_fill_dn_array(mod_ctx, ldb, el, &parents);
3664 parents, addgh->vals, addgh->num);
3671 /* Add itself to the list of the parents to also get the memberuid */
3672 parents->dns = talloc_realloc(parents, parents->dns,
3673 struct ldb_dn *, parents->num + 1);
3674 if (!parents->dns) {
3677 parents->dns[parents->num] = mod_ctx->entry->dn;
3678 parents->num++;
3682 ret = mbof_append_addop(add_ctx, parents, ael->dns[i]);