From a091e5b7831ea84c739493dc20a84ad834f6df7e Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 25 Sep 2013 13:42:24 +0200 Subject: IPA: store forest name for forest member domains In order to fix https://fedorahosted.org/sssd/ticket/2093 the name of the forest must be known for a member domain of the forest. --- src/util/domain_info_utils.c | 11 ++++++++++- src/util/util.h | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c index 7ac4d9d0e..4af967cfd 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; diff --git a/src/util/util.h b/src/util/util.h index 1273b2768..4c2013ec8 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -564,7 +564,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); errno_t sssd_domain_init(TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, -- cgit