Lines Matching defs:components
76 struct ldb_dn_component *components;
262 if (dn->components) {
292 talloc_free(dn->components);
297 /* in the common case we have 3 or more components */
298 /* make sure all components are zeroed, other functions depend on it */
299 dn->components = talloc_zero_array(dn, struct ldb_dn_component, 3);
300 if ( ! dn->components) {
306 data = talloc_array(dn->components, char, strlen(parse_dn) + 1);
465 dn->components[dn->comp_num].name = talloc_strdup(dn->components, dt);
466 if ( ! dn->components[dn->comp_num].name) {
556 dn->components[dn->comp_num].value.data = (uint8_t *)talloc_strdup(dn->components, dt);
557 dn->components[dn->comp_num].value.length = l;
558 if ( ! dn->components[dn->comp_num].value.data) {
567 dn->components = talloc_realloc(dn,
568 dn->components,
571 if ( ! dn->components) {
575 /* make sure all components are zeroed, other functions depend on this */
576 memset(&dn->components[dn->comp_num], '\0', sizeof(struct ldb_dn_component));
662 dn->components[dn->comp_num].value.length = l;
663 dn->components[dn->comp_num].value.data =
664 (uint8_t *)talloc_strdup(dn->components, dt);
665 if ( ! dn->components[dn->comp_num].value.data) {
677 talloc_free(dn->components);
695 if ( ! dn->components) {
709 len += strlen(dn->components[i].name);
711 len += (dn->components[i].value.length * 3);
722 n = dn->components[i].name;
729 (char *)dn->components[i].value.data,
730 dn->components[i].value.length);
830 if (( ! dn->components) && ( ! ldb_dn_explode(dn))) {
837 dn->components[i].cf_name =
838 ldb_attr_casefold(dn->components,
839 dn->components[i].name);
840 if (!dn->components[i].cf_name) {
845 dn->components[i].cf_name);
847 ret = a->syntax->canonicalise_fn(dn->ldb, dn->components,
848 &(dn->components[i].value),
849 &(dn->components[i].cf_value));
861 LDB_FREE(dn->components[i].cf_name);
862 LDB_FREE(dn->components[i].cf_value.data);
893 len += strlen(dn->components[i].cf_name);
895 len += (dn->components[i].cf_value.length * 3);
906 n = dn->components[i].cf_name;
913 (char *)dn->components[i].cf_value.data,
914 dn->components[i].cf_value.length);
969 /* if base has more components,
991 char *b_name = base->components[n_base].cf_name;
992 char *dn_name = dn->components[n_dn].cf_name;
994 char *b_vdata = (char *)base->components[n_base].cf_value.data;
995 char *dn_vdata = (char *)dn->components[n_dn].cf_value.data;
997 size_t b_vlen = base->components[n_base].cf_value.length;
998 size_t dn_vlen = dn->components[n_dn].cf_value.length;
1067 char *dn0_name = dn0->components[i].cf_name;
1068 char *dn1_name = dn1->components[i].cf_name;
1070 char *dn0_vdata = (char *)dn0->components[i].cf_value.data;
1071 char *dn1_vdata = (char *)dn1->components[i].cf_value.data;
1073 size_t dn0_vlen = dn0->components[i].cf_value.length;
1074 size_t dn1_vlen = dn1->components[i].cf_value.length;
1182 if (dn->components) {
1185 new_dn->components =
1189 if ( ! new_dn->components) {
1195 new_dn->components[i] =
1196 ldb_dn_copy_component(new_dn->components,
1197 &dn->components[i]);
1198 if ( ! new_dn->components[i].value.data) {
1271 if (dn->components) {
1285 dn->components = talloc_realloc(dn,
1286 dn->components,
1289 if ( ! dn->components) {
1295 dn->components[dn->comp_num] =
1296 ldb_dn_copy_component(dn->components,
1297 &base->components[i]);
1298 if (dn->components[dn->comp_num].value.data == NULL) {
1395 if (dn->components) {
1411 dn->components = talloc_realloc(dn,
1412 dn->components,
1415 if ( ! dn->components) {
1421 dn->components[j] = dn->components[i];
1425 dn->components[i] =
1426 ldb_dn_copy_component(dn->components,
1427 &child->components[i]);
1428 if (dn->components[i].value.data == NULL) {
1514 /* free components */
1516 LDB_FREE(dn->components[dn->comp_num - i].name);
1517 LDB_FREE(dn->components[dn->comp_num - i].value.data);
1518 LDB_FREE(dn->components[dn->comp_num - i].cf_name);
1519 LDB_FREE(dn->components[dn->comp_num - i].cf_value.data);
1526 LDB_FREE(dn->components[i].cf_name);
1527 LDB_FREE(dn->components[i].cf_value.data);
1559 LDB_FREE(dn->components[i].name);
1560 LDB_FREE(dn->components[i].value.data);
1561 LDB_FREE(dn->components[i].cf_name);
1562 LDB_FREE(dn->components[i].cf_value.data);
1564 dn->components[i] = dn->components[j];
1571 LDB_FREE(dn->components[i].cf_name);
1572 LDB_FREE(dn->components[i].cf_value.data);
1633 /* Walk backwards down the DN, grabbing 'dc' components at first */
1635 if (ldb_attr_cmp(dn->components[i].name, "dc") != 0) {
1641 dn->components[i].value),
1645 dn->components[i].value);
1652 /* Only domain components? Finish here */
1659 /* Now walk backwards appending remaining components */
1663 dn->components[i].value));
1672 dn->components[i].value));
1704 return dn->components[num].name;
1714 return &dn->components[num].value;
1723 return dn->components[0].name;
1732 return &dn->components[0].value;
1761 talloc_free(dn->components[num].name);
1762 talloc_free(dn->components[num].value.data);
1763 dn->components[num].name = n;
1764 dn->components[num].value = v;
1769 LDB_FREE(dn->components[i].cf_name);
1770 LDB_FREE(dn->components[i].cf_value.data);