Lines Matching defs:components
53 struct ldb_dn_component *components;
60 return ! strcmp(dn->components[0].name, LDB_SPECIAL);
67 return ! strcmp((char *)dn->components[0].value.data, check);
275 /* we choosed to not support multpile valued components */
401 edn->components = talloc(edn, struct ldb_dn_component);
402 if (edn->components == NULL) goto failed;
403 edn->components[0].name = talloc_strdup(edn->components, LDB_SPECIAL);
404 if (edn->components[0].name == NULL) goto failed;
405 edn->components[0].value.data = (uint8_t *)talloc_strdup(edn->components, dn);
406 if (edn->components[0].value.data== NULL) goto failed;
407 edn->components[0].value.length = strlen(dn);
414 /* get the components */
428 edn->components = talloc_realloc(edn, edn->components,
431 if (edn->components == NULL)
435 edn->components[edn->comp_num] = ldb_dn_explode_component(edn, p);
436 LDB_DN_NULL_FAILED(edn->components[edn->comp_num].name);
471 edn->components = talloc(edn, struct ldb_dn_component);
472 if (edn->components == NULL) goto failed;
473 edn->components[0].name = talloc_strdup(edn->components, LDB_SPECIAL);
474 if (edn->components[0].name == NULL) goto failed;
475 edn->components[0].value.data = (uint8_t *)talloc_strdup(edn->components, dn);
476 if (edn->components[0].value.data== NULL) goto failed;
477 edn->components[0].value.length = strlen(dn);
498 dn = talloc_strdup(mem_ctx, (char *)edn->components[0].value.data);
506 value = ldb_dn_escape_value(dn, edn->components[i].value);
510 dn = talloc_asprintf_append(dn, "%s=%s", edn->components[i].name, value);
512 dn = talloc_asprintf_append(dn, ",%s=%s", edn->components[i].name, value);
552 ret = ldb_attr_cmp(base->components[n0].name,
553 dn->components[n1].name);
559 h = ldb_attrib_handler(ldb, base->components[n0].name);
560 ret = h->comparison_fn(ldb, ldb, &(base->components[n0].value),
561 &(dn->components[n1].value));
631 cedn->components = talloc_array(cedn, struct ldb_dn_component, edn->comp_num);
632 if (!cedn->components) {
642 dc.name = ldb_attr_casefold(cedn->components, edn->components[i].name);
649 ret = h->canonicalise_fn(ldb, cedn->components,
650 &(edn->components[i].value),
657 cedn->components[i] = dc;
687 dn = talloc_strdup(mem_ctx, (char *)edn->components[0].value.data);
745 new_dn->components[i] = ldb_dn_copy_component(new_dn->components, &(old->components[i]));
768 newdn->components = talloc_array(newdn, struct ldb_dn_component, newdn->comp_num);
769 if (newdn->components == NULL) goto failed;
775 newdn->components[n - i] = ldb_dn_copy_component(newdn->components,
776 &(dn->components[e - i]));
844 newdn->components = talloc_array(newdn, struct ldb_dn_component, newdn->comp_num);
845 LDB_DN_NULL_FAILED(newdn->components);
848 newdn->components[0].name = talloc_strdup(newdn->components, attr);
849 LDB_DN_NULL_FAILED(newdn->components[0].name);
851 newdn->components[0].value.data = (uint8_t *)talloc_strdup(newdn->components, value);
852 LDB_DN_NULL_FAILED(newdn->components[0].value.data);
853 newdn->components[0].value.length = strlen((char *)newdn->components[0].value.data);
877 newdn->components = talloc_array(newdn, struct ldb_dn_component, newdn->comp_num);
878 LDB_DN_NULL_FAILED(newdn->components);
891 newdn->components[i] = ldb_dn_copy_component(newdn->components,
892 &(dn1->components[i]));
893 if (newdn->components[i].value.data == NULL) {
940 /* Walk backwards down the DN, grabbing 'dc' components at first */
942 if (ldb_attr_cmp(dn->components[i].name, "dc") != 0) {
947 ldb_dn_escape_value(mem_ctx, dn->components[i].value),
950 cracked = ldb_dn_escape_value(mem_ctx, dn->components[i].value);
957 /* Only domain components? Finish here */
967 /* Now walk backwards appending remaining components */
970 ldb_dn_escape_value(mem_ctx, dn->components[i].value));
979 ldb_dn_escape_value(mem_ctx, dn->components[i].value));
982 ldb_dn_escape_value(mem_ctx, dn->components[i].value));
1005 return dn->components[num].name;
1011 return &dn->components[num].value;
1016 return dn->components[0].name;
1021 return &dn->components[0].value;
1044 talloc_free(dn->components[num].name);
1045 talloc_free(dn->components[num].value.data);
1046 dn->components[num].name = n;
1047 dn->components[num].value = v;