diff options
author | Sumit Bose <sbose@redhat.com> | 2013-09-25 13:42:24 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-09-27 10:33:25 +0200 |
commit | c5711b0279ea85d69fe3c77dfb194360c346e1d7 (patch) | |
tree | ffc3b851532fdd0635f5b7b882f593aaa81681f4 /src/util/domain_info_utils.c | |
parent | 82d248c7e7d61dba7065a1a744823bc06c1b5b96 (diff) | |
download | sssd-c5711b0279ea85d69fe3c77dfb194360c346e1d7.tar.gz sssd-c5711b0279ea85d69fe3c77dfb194360c346e1d7.tar.xz sssd-c5711b0279ea85d69fe3c77dfb194360c346e1d7.zip |
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.
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 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; |