summaryrefslogtreecommitdiff
path: root/src/providers/ipa
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-11 18:13:36 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-21 22:17:34 +0100
commitcbaba2f47da96c4191971bce86f03afb3f88864a (patch)
treea599a9c3680e4476d975ea42ca163716f1ee327b /src/providers/ipa
parent03abdaa21ecf562b714f204ca42379ff08626f75 (diff)
downloadsssd-cbaba2f47da96c4191971bce86f03afb3f88864a.tar.gz
sssd-cbaba2f47da96c4191971bce86f03afb3f88864a.tar.bz2
sssd-cbaba2f47da96c4191971bce86f03afb3f88864a.zip
Add be_req_get_data() helper funciton.
In preparation for making struct be_req opaque.
Diffstat (limited to 'src/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_access.c6
-rw-r--r--src/providers/ipa/ipa_auth.c3
-rw-r--r--src/providers/ipa/ipa_hostid.c2
-rw-r--r--src/providers/ipa/ipa_id.c4
-rw-r--r--src/providers/ipa/ipa_selinux.c5
5 files changed, 11 insertions, 9 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index 7a3dbaaf..430b2f7a 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -39,7 +39,7 @@ static void ipa_access_reply(struct hbac_ctx *hbac_ctx, int pam_status)
{
struct be_req *be_req = hbac_ctx->be_req;
struct pam_data *pd;
- pd = talloc_get_type(be_req->req_data, struct pam_data);
+ pd = talloc_get_type(be_req_get_data(be_req), struct pam_data);
pd->pam_status = pam_status;
/* destroy HBAC context now to release all used resources and LDAP connection */
@@ -80,7 +80,7 @@ void ipa_access_handler(struct be_req *be_req)
struct tevent_req *req;
struct be_ctx *be_ctx = be_req_get_be_ctx(be_req);
- pd = talloc_get_type(be_req->req_data, struct pam_data);
+ pd = talloc_get_type(be_req_get_data(be_req), struct pam_data);
ipa_access_ctx = talloc_get_type(be_ctx->bet_info[BET_ACCESS].pvt_bet_data,
struct ipa_access_ctx);
@@ -112,7 +112,7 @@ static void ipa_hbac_check(struct tevent_req *req)
be_req = tevent_req_callback_data(req, struct be_req);
be_ctx = be_req_get_be_ctx(be_req);
- pd = talloc_get_type(be_req->req_data, struct pam_data);
+ pd = talloc_get_type(be_req_get_data(be_req), struct pam_data);
ret = sdap_access_recv(req, &pam_status);
talloc_zfree(req);
diff --git a/src/providers/ipa/ipa_auth.c b/src/providers/ipa/ipa_auth.c
index 5c5b34ae..2a033db9 100644
--- a/src/providers/ipa/ipa_auth.c
+++ b/src/providers/ipa/ipa_auth.c
@@ -189,7 +189,8 @@ void ipa_auth(struct be_req *be_req)
{
struct tevent_req *req;
struct ipa_auth_state *state;
- struct pam_data *pd = talloc_get_type(be_req->req_data, struct pam_data);
+ struct pam_data *pd =
+ talloc_get_type(be_req_get_data(be_req), struct pam_data);
struct be_ctx *be_ctx = be_req_get_be_ctx(be_req);
state = talloc_zero(be_req, struct ipa_auth_state);
diff --git a/src/providers/ipa/ipa_hostid.c b/src/providers/ipa/ipa_hostid.c
index 448914ba..cb37e9a4 100644
--- a/src/providers/ipa/ipa_hostid.c
+++ b/src/providers/ipa/ipa_hostid.c
@@ -75,7 +75,7 @@ ipa_host_info_handler(struct be_req *breq)
goto done;
}
- hr = talloc_get_type(breq->req_data, struct be_host_req);
+ hr = talloc_get_type(be_req_get_data(breq), struct be_host_req);
if (hr->filter_type != BE_FILTER_NAME) {
ret = EINVAL;
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
index 0344a184..5f94eb2c 100644
--- a/src/providers/ipa/ipa_id.c
+++ b/src/providers/ipa/ipa_id.c
@@ -80,7 +80,7 @@ void ipa_account_info_handler(struct be_req *breq)
return sdap_handler_done(breq, DP_ERR_OFFLINE, EAGAIN, "Offline");
}
- ar = talloc_get_type(breq->req_data, struct be_acct_req);
+ ar = talloc_get_type(be_req_get_data(breq), struct be_acct_req);
if (strcasecmp(ar->domain, be_ctx->domain->name) != 0) {
/* if domain names do not match, this is a subdomain case */
@@ -110,7 +110,7 @@ void ipa_account_info_handler(struct be_req *breq)
static void ipa_account_info_done(struct tevent_req *req)
{
struct be_req *breq = tevent_req_callback_data(req, struct be_req);
- struct be_acct_req *ar = talloc_get_type(breq->req_data,
+ struct be_acct_req *ar = talloc_get_type(be_req_get_data(breq),
struct be_acct_req);
const char *error_text;
int ret, dp_error;
diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
index 2203069c..29e98870 100644
--- a/src/providers/ipa/ipa_selinux.c
+++ b/src/providers/ipa/ipa_selinux.c
@@ -89,7 +89,7 @@ void ipa_selinux_handler(struct be_req *be_req)
struct pam_data *pd;
const char *hostname;
- pd = talloc_get_type(be_req->req_data, struct pam_data);
+ pd = talloc_get_type(be_req_get_data(be_req), struct pam_data);
selinux_ctx = talloc_get_type(be_ctx->bet_info[BET_SELINUX].pvt_bet_data,
struct ipa_selinux_ctx);
@@ -194,7 +194,8 @@ static void ipa_selinux_handler_done(struct tevent_req *req)
struct sysdb_attrs **maps = NULL;
bool in_transaction = false;
char *default_user = NULL;
- struct pam_data *pd = talloc_get_type(breq->req_data, struct pam_data);
+ struct pam_data *pd =
+ talloc_get_type(be_req_get_data(breq), struct pam_data);
char *map_order = NULL;
size_t hbac_count = 0;
struct sysdb_attrs **hbac_rules = 0;