summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_id_netgroup.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/ldap/ldap_id_netgroup.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/ldap/ldap_id_netgroup.c')
-rw-r--r--src/providers/ldap/ldap_id_netgroup.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/providers/ldap/ldap_id_netgroup.c b/src/providers/ldap/ldap_id_netgroup.c
index 5f44c0a9b..759a9353b 100644
--- a/src/providers/ldap/ldap_id_netgroup.c
+++ b/src/providers/ldap/ldap_id_netgroup.c
@@ -33,6 +33,7 @@
struct ldap_netgroup_get_state {
struct tevent_context *ev;
struct sdap_id_ctx *ctx;
+ struct sdap_domain *sdom;
struct sdap_id_op *op;
struct sdap_id_conn_ctx *conn;
struct sysdb_ctx *sysdb;
@@ -57,6 +58,7 @@ static void ldap_netgroup_get_done(struct tevent_req *subreq);
struct tevent_req *ldap_netgroup_get_send(TALLOC_CTX *memctx,
struct tevent_context *ev,
struct sdap_id_ctx *ctx,
+ struct sdap_domain *sdom,
struct sdap_id_conn_ctx *conn,
const char *name)
{
@@ -70,6 +72,7 @@ struct tevent_req *ldap_netgroup_get_send(TALLOC_CTX *memctx,
state->ev = ev;
state->ctx = ctx;
+ state->sdom = sdom;
state->conn = conn;
state->dp_error = DP_ERR_FATAL;
@@ -80,8 +83,8 @@ struct tevent_req *ldap_netgroup_get_send(TALLOC_CTX *memctx,
goto fail;
}
- state->sysdb = ctx->be->domain->sysdb;
- state->domain = state->ctx->be->domain;
+ state->domain = sdom->dom;
+ state->sysdb = sdom->dom->sysdb;
state->name = name;
state->timeout = dp_opt_get_int(ctx->opts->basic, SDAP_SEARCH_TIMEOUT);
@@ -155,7 +158,7 @@ static void ldap_netgroup_get_connect_done(struct tevent_req *subreq)
subreq = sdap_get_netgroups_send(state, state->ev,
state->domain, state->sysdb,
state->ctx->opts,
- state->ctx->opts->netgroup_search_bases,
+ state->sdom->netgroup_search_bases,
sdap_id_op_handle(state->op),
state->attrs, state->filter,
state->timeout);