diff options
Diffstat (limited to 'src/util/domain_info_utils.c')
-rw-r--r-- | src/util/domain_info_utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index 7b1eb1a3..7ac4d9d0 100644 --- a/src/util/domain_info_utils.c +++ b/src/util/domain_info_utils.c @@ -27,6 +27,19 @@ /* the directory domain - realm mappings are written to */ #define KRB5_MAPPING_DIR PUBCONF_PATH"/krb5.include.d" +struct sss_domain_info *get_domains_head(struct sss_domain_info *domain) +{ + struct sss_domain_info *dom = NULL; + + /* get to the top level domain */ + for (dom = domain; dom->parent != NULL; dom = dom->parent); + + /* proceed to the list head */ + for (; dom->prev != NULL; dom = dom->prev); + + return dom; +} + struct sss_domain_info *get_next_domain(struct sss_domain_info *domain, bool descend) { |