diff options
Diffstat (limited to 'src/util/domain_info_utils.c')
-rw-r--r-- | src/util/domain_info_utils.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index 7ac4d9d0..4af967cf 100644 --- a/src/util/domain_info_utils.c +++ b/src/util/domain_info_utils.c @@ -183,7 +183,8 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, const char *flat_name, const char *id, bool mpg, - bool enumerate) + bool enumerate, + const char *forest) { struct sss_domain_info *dom; @@ -239,6 +240,14 @@ struct sss_domain_info *new_subdomain(TALLOC_CTX *mem_ctx, } } + if (forest != NULL) { + dom->forest = talloc_strdup(dom, forest); + if (dom->forest == NULL) { + DEBUG(SSSDBG_OP_FAILURE, ("Failed to copy forest.\n")); + goto fail; + } + } + dom->enumerate = enumerate; dom->fqnames = true; dom->mpg = mpg; |