diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2012-02-07 07:01:20 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-02-24 14:58:26 -0500 |
commit | fdab7bbf8933351f6254438c30ff361cd748b15a (patch) | |
tree | f782a369096adae55d1d7776219414c4a4d309e5 /src/providers/ipa/ipa_session.c | |
parent | 2f3ee3f49019f5b60adbe073070f31e6e2d7c7ab (diff) | |
download | sssd-fdab7bbf8933351f6254438c30ff361cd748b15a.tar.gz sssd-fdab7bbf8933351f6254438c30ff361cd748b15a.tar.xz sssd-fdab7bbf8933351f6254438c30ff361cd748b15a.zip |
IPA hosts refactoring
Diffstat (limited to 'src/providers/ipa/ipa_session.c')
-rw-r--r-- | src/providers/ipa/ipa_session.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/providers/ipa/ipa_session.c b/src/providers/ipa/ipa_session.c index 6b7fc8efb..e23b0120e 100644 --- a/src/providers/ipa/ipa_session.c +++ b/src/providers/ipa/ipa_session.c @@ -35,18 +35,12 @@ #include "providers/ipa/ipa_selinux_common.h" #include "providers/ipa/ipa_selinux_maps.h" -/* FIXME: this is temporary until host map is implemented in ipa_common.c */ -#include "providers/ipa/ipa_hbac_private.h" - struct ipa_get_selinux_state { struct be_req *be_req; struct pam_data *pd; struct ipa_session_ctx *session_ctx; struct sdap_id_op *op; - /* Just tmp stuff so we can free it after query */ - const char **attrs; - const char *hostname; struct sysdb_attrs *host; struct sysdb_attrs *user; @@ -251,21 +245,13 @@ static void ipa_get_selinux_connect_done(struct tevent_req *subreq) /* FIXME: detect if HBAC is configured * - if yes, we can skip host retrieval and get it directly from sysdb */ - state->attrs = talloc_array(state, const char *, 3); - if (state->attrs == NULL) { - ret = ENOMEM; - goto fail; - } - state->attrs[0] = "objectClass"; - state->attrs[1] = IPA_MEMBEROF; - state->attrs[2] = NULL; - subreq = ipa_host_info_send(state, bctx->ev, bctx->sysdb, sdap_id_op_handle(state->op), id_ctx->sdap_id_ctx->opts, state->hostname, - state->attrs, NULL, 0, - false, state->session_ctx->host_search_bases); + id_ctx->ipa_options->host_map, + NULL, + state->session_ctx->host_search_bases); if (subreq == NULL) { ret = ENOMEM; goto fail; @@ -300,11 +286,6 @@ static void ipa_get_selinux_hosts_done(struct tevent_req *subreq) } state->host = host[0]; - ret = sysdb_attrs_add_string(state->host, SYSDB_NAME, state->hostname); - if (ret != EOK) { - goto done; - } - ret = sss_selinux_extract_user(state, bctx->sysdb, state->pd->user, &state->user); if (ret != EOK) { @@ -314,6 +295,7 @@ static void ipa_get_selinux_hosts_done(struct tevent_req *subreq) subreq = ipa_selinux_get_maps_send(state, bctx->ev, bctx->sysdb, sdap_id_op_handle(state->op), id_ctx->opts, + state->session_ctx->id_ctx->ipa_options, state->session_ctx->selinux_search_bases); if (subreq == NULL) { ret = ENOMEM; |