diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-09 16:39:42 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-21 22:17:33 +0100 |
commit | 24b715f096613d18f182cf0fff537e1fc79647fa (patch) | |
tree | 69559d58896dcfa37aabffd6683038781ba657a8 | |
parent | df0596ec12bc5091608371e2977f3111241e8caf (diff) | |
download | sssd-24b715f096613d18f182cf0fff537e1fc79647fa.tar.gz sssd-24b715f096613d18f182cf0fff537e1fc79647fa.tar.bz2 sssd-24b715f096613d18f182cf0fff537e1fc79647fa.zip |
Remove sysdb as a be request structure member
The sysdb context is already available through the 'domain' context.
-rw-r--r-- | src/providers/ad/ad_access.c | 1 | ||||
-rw-r--r-- | src/providers/data_provider_be.c | 1 | ||||
-rw-r--r-- | src/providers/dp_backend.h | 1 | ||||
-rw-r--r-- | src/providers/ipa/ipa_access.h | 2 | ||||
-rw-r--r-- | src/providers/ipa/ipa_selinux.c | 4 | ||||
-rw-r--r-- | src/providers/ipa/ipa_subdomains.c | 8 | ||||
-rw-r--r-- | src/providers/ldap/sdap_access.c | 4 |
7 files changed, 9 insertions, 12 deletions
diff --git a/src/providers/ad/ad_access.c b/src/providers/ad/ad_access.c index 314cdcfa..16b2423f 100644 --- a/src/providers/ad/ad_access.c +++ b/src/providers/ad/ad_access.c @@ -49,7 +49,6 @@ ad_access_handler(struct be_req *breq) breq->fn(breq, DP_ERR_FATAL, PAM_SYSTEM_ERR, NULL); return; } - breq->sysdb = breq->domain->sysdb; } /* Verify that the account is not locked */ diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index 748b1c12..00033a6a 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -1041,7 +1041,6 @@ static int be_pam_handler(DBusMessage *message, struct sbus_connection *conn) be_req->fn = be_pam_handler_callback; be_req->pvt = reply; be_req->domain = be_req->be_ctx->domain; - be_req->sysdb = be_req->be_ctx->domain->sysdb; dbus_error_init(&dbus_error); diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h index cce52976..e20f2b0b 100644 --- a/src/providers/dp_backend.h +++ b/src/providers/dp_backend.h @@ -149,7 +149,6 @@ struct be_req { int phase; struct sss_domain_info *domain; - struct sysdb_ctx *sysdb; }; struct be_acct_req { diff --git a/src/providers/ipa/ipa_access.h b/src/providers/ipa/ipa_access.h index 0a13d7be..6d36ea61 100644 --- a/src/providers/ipa/ipa_access.h +++ b/src/providers/ipa/ipa_access.h @@ -86,7 +86,7 @@ static inline struct be_ctx *hbac_ctx_be(struct hbac_ctx *hbac_ctx) static inline struct sysdb_ctx *hbac_ctx_sysdb(struct hbac_ctx *hbac_ctx) { struct be_req *be_req = hbac_ctx->be_req; - return be_req != NULL ? be_req->sysdb : NULL; + return be_req != NULL ? be_req->domain->sysdb : NULL; } /* Get tevent context associated with HBAC context */ diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c index 6c04af4a..2711486e 100644 --- a/src/providers/ipa/ipa_selinux.c +++ b/src/providers/ipa/ipa_selinux.c @@ -99,7 +99,7 @@ void ipa_selinux_handler(struct be_req *be_req) goto fail; } - op_ctx = ipa_selinux_create_op_ctx(be_req, be_req->sysdb, be_req->domain, + op_ctx = ipa_selinux_create_op_ctx(be_req, be_req->domain->sysdb, be_req->domain, be_req, pd->user, hostname); if (op_ctx == NULL) { DEBUG(SSSDBG_OP_FAILURE, ("Cannot create op context\n")); @@ -215,7 +215,7 @@ static void ipa_selinux_handler_done(struct tevent_req *req) } in_transaction = true; - ret = sysdb_delete_usermaps(breq->sysdb, breq->domain); + ret = sysdb_delete_usermaps(breq->domain->sysdb, breq->domain); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, ("Cannot delete existing maps from sysdb\n")); diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c index 7c3ad494..0ea3f045 100644 --- a/src/providers/ipa/ipa_subdomains.c +++ b/src/providers/ipa/ipa_subdomains.c @@ -693,8 +693,8 @@ static void ipa_subdomains_handler_done(struct tevent_req *req) ctx = tevent_req_callback_data(req, struct ipa_subdomains_req_ctx); be_req = ctx->be_req; - if (be_req && be_req->sysdb) { - sysdb = be_req->sysdb; + if (be_req && be_req->domain) { + sysdb = be_req->domain->sysdb; domain = be_req->domain; } else { sysdb = ctx->sd_ctx->be_ctx->domain->sysdb; @@ -786,8 +786,8 @@ static void ipa_subdomains_handler_ranges_done(struct tevent_req *req) ctx = tevent_req_callback_data(req, struct ipa_subdomains_req_ctx); be_req = ctx->be_req; - if (be_req && be_req->sysdb) { - sysdb = be_req->sysdb; + if (be_req && be_req->domain) { + sysdb = be_req->domain->sysdb; domain = be_req->domain; } else { sysdb = ctx->sd_ctx->be_ctx->domain->sysdb; diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c index 42e321d2..18d38ebb 100644 --- a/src/providers/ldap/sdap_access.c +++ b/src/providers/ldap/sdap_access.c @@ -133,7 +133,7 @@ sdap_access_send(TALLOC_CTX *mem_ctx, ret = sysdb_get_user_attr(state, user_dom->sysdb, user_dom, pd->user, attrs, &res); } else { - ret = sysdb_get_user_attr(state, be_req->sysdb, be_req->domain, + ret = sysdb_get_user_attr(state, be_req->domain->sysdb, be_req->domain, pd->user, attrs, &res); } if (ret != EOK) { @@ -1018,7 +1018,7 @@ static void sdap_access_filter_get_access_done(struct tevent_req *subreq) goto done; } - ret = sysdb_set_user_attr(state->be_req->sysdb, + ret = sysdb_set_user_attr(state->be_req->domain->sysdb, state->be_req->domain, state->username, attrs, SYSDB_MOD_REP); |