summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-09 21:32:43 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-21 22:17:34 +0100
commit1f5965110f3f4e1a8d35cf1e308b156e912c8639 (patch)
tree9819b2b8e425148d78f374c25c07195ccd8571a9
parent051491353666d0be95316dc62a1e7f280b4bad57 (diff)
downloadsssd-1f5965110f3f4e1a8d35cf1e308b156e912c8639.tar.gz
sssd-1f5965110f3f4e1a8d35cf1e308b156e912c8639.tar.bz2
sssd-1f5965110f3f4e1a8d35cf1e308b156e912c8639.zip
Remove hbac_ctx_sdap_id_[ctx|op]()
-rw-r--r--src/providers/ipa/ipa_access.c12
-rw-r--r--src/providers/ipa/ipa_access.h12
2 files changed, 6 insertions, 18 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index 03011c31..f1486ec4 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -208,14 +208,14 @@ static int hbac_retry(struct hbac_ctx *hbac_ctx)
if (!offline) {
if (hbac_ctx->sdap_op == NULL) {
hbac_ctx->sdap_op = sdap_id_op_create(hbac_ctx,
- hbac_ctx_sdap_id_ctx(hbac_ctx)->conn_cache);
+ hbac_ctx->sdap_ctx->conn_cache);
if (hbac_ctx->sdap_op == NULL) {
DEBUG(1, ("sdap_id_op_create failed.\n"));
return EIO;
}
}
- subreq = sdap_id_op_connect_send(hbac_ctx_sdap_id_op(hbac_ctx), hbac_ctx, &ret);
+ subreq = sdap_id_op_connect_send(hbac_ctx->sdap_op, hbac_ctx, &ret);
if (!subreq) {
DEBUG(1, ("sdap_id_op_connect_send failed: %d(%s).\n", ret, strerror(ret)));
talloc_zfree(hbac_ctx->sdap_op);
@@ -295,7 +295,7 @@ static bool hbac_check_step_result(struct hbac_ctx *hbac_ctx, int ret)
return false;
}
- ret = sdap_id_op_done(hbac_ctx_sdap_id_op(hbac_ctx), ret, &dp_error);
+ ret = sdap_id_op_done(hbac_ctx->sdap_op, ret, &dp_error);
if (ret != EOK) {
if (dp_error == DP_ERR_OFFLINE) {
/* switching to offline mode */
@@ -342,7 +342,7 @@ static int hbac_get_host_info_step(struct hbac_ctx *hbac_ctx)
req = ipa_host_info_send(hbac_ctx,
hbac_ctx->be_req->be_ctx->ev,
sdap_id_op_handle(hbac_ctx->sdap_op),
- hbac_ctx_sdap_id_ctx(hbac_ctx)->opts,
+ hbac_ctx->sdap_ctx->opts,
hostname,
hbac_ctx->access_ctx->host_map,
hbac_ctx->access_ctx->hostgroup_map,
@@ -376,7 +376,7 @@ static void hbac_get_service_info_step(struct tevent_req *req)
req = ipa_hbac_service_info_send(hbac_ctx,
hbac_ctx->be_req->be_ctx->ev,
sdap_id_op_handle(hbac_ctx->sdap_op),
- hbac_ctx_sdap_id_ctx(hbac_ctx)->opts,
+ hbac_ctx->sdap_ctx->opts,
hbac_ctx->search_bases);
if (req == NULL) {
DEBUG(1,("Could not get service info\n"));
@@ -441,7 +441,7 @@ static void hbac_get_rule_info_step(struct tevent_req *req)
hbac_ctx->get_deny_rules,
hbac_ctx->be_req->be_ctx->ev,
sdap_id_op_handle(hbac_ctx->sdap_op),
- hbac_ctx_sdap_id_ctx(hbac_ctx)->opts,
+ hbac_ctx->sdap_ctx->opts,
hbac_ctx->search_bases,
hbac_ctx->ipa_host);
if (req == NULL) {
diff --git a/src/providers/ipa/ipa_access.h b/src/providers/ipa/ipa_access.h
index 8f330625..fc817e47 100644
--- a/src/providers/ipa/ipa_access.h
+++ b/src/providers/ipa/ipa_access.h
@@ -75,18 +75,6 @@ struct hbac_ctx {
struct sysdb_attrs **servicegroups;
};
-/* Get sdap_id_ctx associated with HBAC context */
-static inline struct sdap_id_ctx *hbac_ctx_sdap_id_ctx(struct hbac_ctx *hbac_ctx)
-{
- return hbac_ctx != NULL ? hbac_ctx->sdap_ctx : NULL;
-}
-
-/* Get struct sdap_id_op associated with HBAC context */
-static inline struct sdap_id_op *hbac_ctx_sdap_id_op(struct hbac_ctx *hbac_ctx)
-{
- return hbac_ctx != NULL ? hbac_ctx->sdap_op : NULL;
-}
-
/* Check whether the current HBAC request is processed in off-line mode */
static inline bool hbac_ctx_is_offline(struct hbac_ctx *ctx)
{