summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2014-09-19 10:26:01 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-10-16 17:55:52 +0200
commit00c283ca719717ed483958571982d0e9ff95c4b1 (patch)
treedf7ee6a342a1c8ea44ba957d8053064089abeacd
parent7d35c7e8c5d2684321be879f7ff67816d4b31f09 (diff)
downloadsssd-00c283ca719717ed483958571982d0e9ff95c4b1.tar.gz
sssd-00c283ca719717ed483958571982d0e9ff95c4b1.tar.xz
sssd-00c283ca719717ed483958571982d0e9ff95c4b1.zip
IPA: make IPA ID context available to extdom client code
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
-rw-r--r--src/providers/ipa/ipa_id.c2
-rw-r--r--src/providers/ipa/ipa_id.h3
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c9
-rw-r--r--src/providers/ipa/ipa_subdomains_id.c7
4 files changed, 16 insertions, 5 deletions
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
index dd87a2dad..942feb19e 100644
--- a/src/providers/ipa/ipa_id.c
+++ b/src/providers/ipa/ipa_id.c
@@ -90,7 +90,7 @@ void ipa_account_info_handler(struct be_req *breq)
if (dp_opt_get_bool(ipa_ctx->ipa_options->basic, IPA_SERVER_MODE)) {
req = ipa_get_ad_acct_send(breq, be_ctx->ev, ipa_ctx, breq, ar);
} else {
- req = ipa_get_subdom_acct_send(breq, be_ctx->ev, ctx, ar);
+ req = ipa_get_subdom_acct_send(breq, be_ctx->ev, ipa_ctx, ar);
}
} else if ((ar->entry_type & BE_REQ_TYPE_MASK) == BE_REQ_NETGROUP) {
/* netgroups are handled by a separate request function */
diff --git a/src/providers/ipa/ipa_id.h b/src/providers/ipa/ipa_id.h
index 6c72f6d04..9a255ffbd 100644
--- a/src/providers/ipa/ipa_id.h
+++ b/src/providers/ipa/ipa_id.h
@@ -52,6 +52,7 @@ void ipa_check_online(struct be_req *be_req);
struct tevent_req *ipa_s2n_get_acct_info_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
+ struct ipa_id_ctx *ipa_ctx,
struct sdap_options *opts,
struct sss_domain_info *dom,
struct sdap_handle *sh,
@@ -61,7 +62,7 @@ int ipa_s2n_get_acct_info_recv(struct tevent_req *req);
struct tevent_req *ipa_get_subdom_acct_send(TALLOC_CTX *memctx,
struct tevent_context *ev,
- struct sdap_id_ctx *ctx,
+ struct ipa_id_ctx *ipa_ctx,
struct be_acct_req *ar);
int ipa_get_subdom_acct_recv(struct tevent_req *req, int *dp_error_out);
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index 0d5c35678..6f5fac337 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -874,6 +874,7 @@ done:
struct ipa_s2n_get_groups_state {
struct tevent_context *ev;
+ struct ipa_id_ctx *ipa_ctx;
struct sss_domain_info *dom;
struct sdap_handle *sh;
struct req_input req_input;
@@ -887,6 +888,7 @@ static void ipa_s2n_get_groups_next(struct tevent_req *subreq);
static struct tevent_req *ipa_s2n_get_groups_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
+ struct ipa_id_ctx *ipa_ctx,
struct sss_domain_info *dom,
struct sdap_handle *sh,
int exop_timeout,
@@ -902,6 +904,7 @@ static struct tevent_req *ipa_s2n_get_groups_send(TALLOC_CTX *mem_ctx,
}
state->ev = ev;
+ state->ipa_ctx = ipa_ctx;
state->dom = dom;
state->sh = sh;
state->group_list = group_list;
@@ -1034,6 +1037,7 @@ static int ipa_s2n_get_groups_recv(struct tevent_req *req)
struct ipa_s2n_get_user_state {
struct tevent_context *ev;
+ struct ipa_id_ctx *ipa_ctx;
struct sdap_options *opts;
struct sss_domain_info *dom;
struct sdap_handle *sh;
@@ -1049,6 +1053,7 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq);
struct tevent_req *ipa_s2n_get_acct_info_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
+ struct ipa_id_ctx *ipa_ctx,
struct sdap_options *opts,
struct sss_domain_info *dom,
struct sdap_handle *sh,
@@ -1068,6 +1073,7 @@ struct tevent_req *ipa_s2n_get_acct_info_send(TALLOC_CTX *mem_ctx,
}
state->ev = ev;
+ state->ipa_ctx = ipa_ctx;
state->opts = opts;
state->dom = dom;
state->sh = sh;
@@ -1322,7 +1328,8 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
}
if (missing_groups != NULL) {
- subreq = ipa_s2n_get_groups_send(state, state->ev, state->dom,
+ subreq = ipa_s2n_get_groups_send(state, state->ev,
+ state->ipa_ctx, state->dom,
state->sh, state->exop_timeout,
missing_groups);
if (subreq == NULL) {
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index 83f913cb9..d1bd08d6e 100644
--- a/src/providers/ipa/ipa_subdomains_id.c
+++ b/src/providers/ipa/ipa_subdomains_id.c
@@ -36,6 +36,7 @@
struct ipa_get_subdom_acct {
struct tevent_context *ev;
+ struct ipa_id_ctx *ipa_ctx;
struct sdap_id_ctx *ctx;
struct sdap_id_op *op;
struct sysdb_ctx *sysdb;
@@ -53,7 +54,7 @@ static void ipa_get_subdom_acct_done(struct tevent_req *subreq);
struct tevent_req *ipa_get_subdom_acct_send(TALLOC_CTX *memctx,
struct tevent_context *ev,
- struct sdap_id_ctx *ctx,
+ struct ipa_id_ctx *ipa_ctx,
struct be_acct_req *ar)
{
struct tevent_req *req;
@@ -65,7 +66,8 @@ struct tevent_req *ipa_get_subdom_acct_send(TALLOC_CTX *memctx,
if (!req) return NULL;
state->ev = ev;
- state->ctx = ctx;
+ state->ipa_ctx = ipa_ctx;
+ state->ctx = ipa_ctx->sdap_id_ctx;
state->dp_error = DP_ERR_FATAL;
state->op = sdap_id_op_create(state, state->ctx->conn->conn_cache);
@@ -184,6 +186,7 @@ static void ipa_get_subdom_acct_connected(struct tevent_req *subreq)
subreq = ipa_s2n_get_acct_info_send(state,
state->ev,
+ state->ipa_ctx,
state->ctx->opts,
state->domain,
sdap_id_op_handle(state->op),