diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/schema/schema_init.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 5ca0e6d47e..ff853018a2 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -1014,6 +1014,26 @@ const char *dsdb_lDAPDisplayName_by_id(const struct dsdb_schema *schema, return NULL; } +WERROR dsdb_linked_attribute_lDAPDisplayName_list(const struct dsdb_schema *schema, TALLOC_CTX *mem_ctx, const char ***attr_list_ret) +{ + const char **attr_list = NULL; + struct dsdb_attribute *cur; + int i = 0; + for (cur = schema->attributes; cur; cur = cur->next) { + if (cur->linkID == 0) continue; + + attr_list = talloc_realloc(mem_ctx, attr_list, const char *, i+2); + if (!attr_list) { + return WERR_NOMEM; + } + attr_list[i] = cur->lDAPDisplayName; + i++; + } + attr_list[i] = NULL; + *attr_list_ret = attr_list; + return WERR_OK; +} + int dsdb_set_schema(struct ldb_context *ldb, struct dsdb_schema *schema) { int ret; |