summaryrefslogtreecommitdiffstats
path: root/src/providers/ad/ad_subdomains.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-05-27 08:48:02 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-06-07 00:14:13 +0200
commit749cfb5d3270b5daf389d51a0dbd3fd2aec6e05d (patch)
tree65abb8438d2d31bd627861ff2fdc8cda6c07c960 /src/providers/ad/ad_subdomains.c
parent9aa117a93e315f790a1922d9ac7bd484878b621e (diff)
downloadsssd-749cfb5d3270b5daf389d51a0dbd3fd2aec6e05d.tar.gz
sssd-749cfb5d3270b5daf389d51a0dbd3fd2aec6e05d.tar.xz
sssd-749cfb5d3270b5daf389d51a0dbd3fd2aec6e05d.zip
LDAP: new SDAP domain structure
Previously an sdap_id_ctx was always tied to one domain with a single set of search bases. But with the introduction of Global Catalog lookups, primary domain and subdomains might have different search bases. This patch introduces a new structure sdap_domain that contains an sssd domain or subdomain and a set of search bases. With this patch, there is only one sdap_domain that describes the primary domain.
Diffstat (limited to 'src/providers/ad/ad_subdomains.c')
-rw-r--r--src/providers/ad/ad_subdomains.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
index da0c85e76..098663cc8 100644
--- a/src/providers/ad/ad_subdomains.c
+++ b/src/providers/ad/ad_subdomains.c
@@ -44,6 +44,7 @@
struct ad_subdomains_ctx {
struct be_ctx *be_ctx;
struct sdap_id_ctx *sdap_id_ctx;
+ struct sdap_domain *sdom;
struct sss_idmap_ctx *idmap_ctx;
char *domain_name;
@@ -164,7 +165,7 @@ static errno_t ad_subdomains_get_master_sid(struct ad_subdomains_req_ctx *ctx)
const char *master_sid_attrs[] = {AD_AT_OBJECT_SID, NULL};
- base = ctx->sd_ctx->sdap_id_ctx->opts->search_bases[ctx->base_iter];
+ base = ctx->sd_ctx->sdom->search_bases[ctx->base_iter];
if (base == NULL) {
return EOK;
}
@@ -497,6 +498,7 @@ int ad_subdom_init(struct be_ctx *be_ctx,
}
ctx->be_ctx = be_ctx;
+ ctx->sdom = id_ctx->sdap_id_ctx->opts->sdom;
ctx->sdap_id_ctx = id_ctx->sdap_id_ctx;
ctx->domain_name = talloc_strdup(ctx, ad_domain);
if (ctx->domain_name == NULL) {