summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2013-09-25 13:42:24 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-27 10:33:25 +0200
commitc5711b0279ea85d69fe3c77dfb194360c346e1d7 (patch)
treeffc3b851532fdd0635f5b7b882f593aaa81681f4 /src/util
parent82d248c7e7d61dba7065a1a744823bc06c1b5b96 (diff)
downloadsssd-c5711b0279ea85d69fe3c77dfb194360c346e1d7.tar.gz
sssd-c5711b0279ea85d69fe3c77dfb194360c346e1d7.tar.bz2
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')
-rw-r--r--src/util/domain_info_utils.c11
-rw-r--r--src/util/util.h3
2 files changed, 12 insertions, 2 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;
diff --git a/src/util/util.h b/src/util/util.h
index 6cd59d96..bd450ec7 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -566,7 +566,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,