summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/data_provider_be.c5
-rw-r--r--src/providers/dp_backend.h1
-rw-r--r--src/providers/ipa/ipa_auth.c2
-rw-r--r--src/providers/ipa/ipa_hostid.c2
-rw-r--r--src/providers/ipa/ipa_id.c2
-rw-r--r--src/providers/ipa/ipa_selinux.c14
-rw-r--r--src/providers/ipa/ipa_subdomains.c6
-rw-r--r--src/providers/krb5/krb5_access.c2
-rw-r--r--src/providers/krb5/krb5_auth.c4
-rw-r--r--src/providers/krb5/krb5_renew_tgt.c4
-rw-r--r--src/providers/ldap/ldap_auth.c4
-rw-r--r--src/providers/ldap/ldap_common.c2
-rw-r--r--src/providers/ldap/ldap_id.c6
-rw-r--r--src/providers/ldap/ldap_id_cleanup.c10
-rw-r--r--src/providers/ldap/ldap_id_enum.c6
-rw-r--r--src/providers/ldap/ldap_id_netgroup.c2
-rw-r--r--src/providers/ldap/ldap_id_services.c2
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c2
-rw-r--r--src/providers/ldap/sdap_async_services.c2
-rw-r--r--src/providers/ldap/sdap_async_sudo.c2
-rw-r--r--src/providers/ldap/sdap_autofs.c6
-rw-r--r--src/providers/ldap/sdap_idmap.c4
-rw-r--r--src/providers/ldap/sdap_sudo.c6
-rw-r--r--src/providers/proxy/proxy_auth.c2
-rw-r--r--src/providers/proxy/proxy_id.c2
-rw-r--r--src/providers/simple/simple_access.c7
-rw-r--r--src/providers/simple/simple_access.h1
27 files changed, 52 insertions, 56 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index 91750ace..748b1c12 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -664,7 +664,7 @@ static errno_t be_initgroups_prereq(struct be_req *be_req)
const char *tmpstr;
int i;
- ret = sysdb_initgroups(be_req, be_req->be_ctx->sysdb,
+ ret = sysdb_initgroups(be_req, be_req->be_ctx->domain->sysdb,
be_req->be_ctx->domain, ar->filter_value, &res);
if (ret && ret != ENOENT) {
return ret;
@@ -1041,7 +1041,7 @@ 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->sysdb;
+ be_req->sysdb = be_req->be_ctx->domain->sysdb;
dbus_error_init(&dbus_error);
@@ -2352,7 +2352,6 @@ int be_process_init(TALLOC_CTX *mem_ctx,
DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error opening cache database\n"));
goto fail;
}
- ctx->sysdb = ctx->domain->sysdb;
ret = sss_monitor_init(ctx, ctx->ev, &monitor_be_interface,
ctx->identity, DATA_PROVIDER_VERSION,
diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h
index 58a9b749..cce52976 100644
--- a/src/providers/dp_backend.h
+++ b/src/providers/dp_backend.h
@@ -94,7 +94,6 @@ struct be_cb;
struct be_ctx {
struct tevent_context *ev;
struct confdb_ctx *cdb;
- struct sysdb_ctx *sysdb;
struct sss_domain_info *domain;
const char *identity;
const char *conf_path;
diff --git a/src/providers/ipa/ipa_auth.c b/src/providers/ipa/ipa_auth.c
index b409542d..5097899f 100644
--- a/src/providers/ipa/ipa_auth.c
+++ b/src/providers/ipa/ipa_auth.c
@@ -357,7 +357,7 @@ static void ipa_migration_flag_connect_done(struct tevent_req *req)
attrs[0] = SYSDB_ORIG_DN;
attrs[1] = NULL;
- ret = sysdb_search_user_by_name(state, state->be_req->be_ctx->sysdb,
+ ret = sysdb_search_user_by_name(state, state->be_req->be_ctx->domain->sysdb,
state->be_req->be_ctx->domain,
state->pd->user, attrs, &user_msg);
if (ret != EOK) {
diff --git a/src/providers/ipa/ipa_hostid.c b/src/providers/ipa/ipa_hostid.c
index dfd3a65b..a943cdb0 100644
--- a/src/providers/ipa/ipa_hostid.c
+++ b/src/providers/ipa/ipa_hostid.c
@@ -171,7 +171,7 @@ hosts_get_send(TALLOC_CTX *memctx,
goto fail;
}
- state->sysdb = ctx->be->sysdb;
+ state->sysdb = ctx->be->domain->sysdb;
state->domain = ctx->be->domain;
state->name = name;
state->alias = alias;
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
index a44874e0..82e29826 100644
--- a/src/providers/ipa/ipa_id.c
+++ b/src/providers/ipa/ipa_id.c
@@ -179,7 +179,7 @@ static struct tevent_req *ipa_id_get_netgroup_send(TALLOC_CTX *memctx,
goto fail;
}
- state->sysdb = ctx->be->sysdb;
+ state->sysdb = ctx->be->domain->sysdb;
state->domain = ctx->be->domain;
state->name = name;
state->timeout = dp_opt_get_int(ctx->opts->basic, SDAP_SEARCH_TIMEOUT);
diff --git a/src/providers/ipa/ipa_selinux.c b/src/providers/ipa/ipa_selinux.c
index 09dc075f..6c04af4a 100644
--- a/src/providers/ipa/ipa_selinux.c
+++ b/src/providers/ipa/ipa_selinux.c
@@ -183,7 +183,7 @@ static void ipa_selinux_handler_done(struct tevent_req *req)
{
struct ipa_selinux_op_ctx *op_ctx = tevent_req_callback_data(req, struct ipa_selinux_op_ctx);
struct be_req *breq = op_ctx->be_req;
- struct sysdb_ctx *sysdb = breq->be_ctx->sysdb;
+ struct sysdb_ctx *sysdb = breq->be_ctx->domain->sysdb;
errno_t ret, sret;
size_t map_count = 0;
struct sysdb_attrs **maps = NULL;
@@ -554,7 +554,7 @@ static void ipa_get_selinux_connect_done(struct tevent_req *subreq)
goto fail;
}
- subreq = ipa_host_info_send(state, bctx->ev, bctx->sysdb,
+ subreq = ipa_host_info_send(state, bctx->ev, bctx->domain->sysdb,
sdap_id_op_handle(state->op),
id_ctx->sdap_id_ctx->opts,
hostname,
@@ -595,7 +595,7 @@ ipa_get_selinux_maps_offline(struct tevent_req *req)
struct ipa_get_selinux_state);
/* read the config entry */
- ret = sysdb_search_selinux_config(state, state->be_req->be_ctx->sysdb,
+ ret = sysdb_search_selinux_config(state, state->be_req->be_ctx->domain->sysdb,
state->be_req->be_ctx->domain,
NULL, &defaults);
if (ret != EOK) {
@@ -629,7 +629,7 @@ ipa_get_selinux_maps_offline(struct tevent_req *req)
}
/* read all the SELinux rules */
- ret = sysdb_get_selinux_usermaps(state, state->be_req->be_ctx->sysdb,
+ ret = sysdb_get_selinux_usermaps(state, state->be_req->be_ctx->domain->sysdb,
state->be_req->be_ctx->domain,
attrs, &nmaps, &maps);
if (ret != EOK) {
@@ -645,7 +645,7 @@ ipa_get_selinux_maps_offline(struct tevent_req *req)
state->nmaps = nmaps;
/* read all the HBAC rules */
- ret = hbac_get_cached_rules(state, state->be_req->be_ctx->sysdb,
+ ret = hbac_get_cached_rules(state, state->be_req->be_ctx->domain->sysdb,
state->be_req->be_ctx->domain,
&state->hbac_rule_count, &state->hbac_rules);
if (ret != EOK) {
@@ -722,7 +722,7 @@ static void ipa_get_selinux_config_done(struct tevent_req *subreq)
goto done;
}
- subreq = ipa_selinux_get_maps_send(state, bctx->ev, bctx->sysdb,
+ subreq = ipa_selinux_get_maps_send(state, bctx->ev, bctx->domain->sysdb,
sdap_id_op_handle(state->op),
id_ctx->opts,
state->selinux_ctx->id_ctx->ipa_options,
@@ -793,7 +793,7 @@ static void ipa_get_selinux_maps_done(struct tevent_req *subreq)
access_name = state->be_req->be_ctx->bet_info[BET_ACCESS].mod_name;
selinux_name = state->be_req->be_ctx->bet_info[BET_SELINUX].mod_name;
if (strcasecmp(access_name, selinux_name) == 0) {
- ret = hbac_get_cached_rules(state, bctx->sysdb, bctx->domain,
+ ret = hbac_get_cached_rules(state, bctx->domain->sysdb, bctx->domain,
&state->hbac_rule_count, &state->hbac_rules);
/* Terminates the request */
goto done;
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
index 3a91c580..7c3ad494 100644
--- a/src/providers/ipa/ipa_subdomains.c
+++ b/src/providers/ipa/ipa_subdomains.c
@@ -697,7 +697,7 @@ static void ipa_subdomains_handler_done(struct tevent_req *req)
sysdb = be_req->sysdb;
domain = be_req->domain;
} else {
- sysdb = ctx->sd_ctx->be_ctx->sysdb;
+ sysdb = ctx->sd_ctx->be_ctx->domain->sysdb;
domain = ctx->sd_ctx->be_ctx->domain;
}
@@ -790,7 +790,7 @@ static void ipa_subdomains_handler_ranges_done(struct tevent_req *req)
sysdb = be_req->sysdb;
domain = be_req->domain;
} else {
- sysdb = ctx->sd_ctx->be_ctx->sysdb;
+ sysdb = ctx->sd_ctx->be_ctx->domain->sysdb;
domain = ctx->sd_ctx->be_ctx->domain;
}
@@ -893,7 +893,7 @@ static void ipa_subdomains_handler_master_done(struct tevent_req *req)
goto done;
}
- ret = sysdb_master_domain_add_info(ctx->sd_ctx->be_ctx->sysdb,
+ ret = sysdb_master_domain_add_info(ctx->sd_ctx->be_ctx->domain->sysdb,
ctx->sd_ctx->be_ctx->domain,
domain_info);
goto done;
diff --git a/src/providers/krb5/krb5_access.c b/src/providers/krb5/krb5_access.c
index 41e62d36..c4ee672f 100644
--- a/src/providers/krb5/krb5_access.c
+++ b/src/providers/krb5/krb5_access.c
@@ -88,7 +88,7 @@ struct tevent_req *krb5_access_send(TALLOC_CTX *mem_ctx,
attrs[2] = SYSDB_GIDNUM;
attrs[3] = NULL;
- ret = sysdb_get_user_attr(state, be_ctx->sysdb, be_ctx->domain,
+ ret = sysdb_get_user_attr(state, be_ctx->domain->sysdb, be_ctx->domain,
state->pd->user, attrs, &res);
if (ret) {
DEBUG(5, ("sysdb search for upn of user [%s] failed.\n", pd->user));
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index 2271df0d..0d9fe793 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -771,7 +771,7 @@ static void krb5_auth_resolve_done(struct tevent_req *subreq)
if (dp_opt_get_bool(kr->krb5_ctx->opts,
KRB5_STORE_PASSWORD_IF_OFFLINE)) {
krb5_auth_cache_creds(state->kr->krb5_ctx,
- state->be_ctx->sysdb,
+ state->be_ctx->domain->sysdb,
state->be_ctx->domain,
state->be_ctx->cdb,
kr->pd, kr->uid,
@@ -1081,7 +1081,7 @@ static void krb5_auth_done(struct tevent_req *subreq)
if (dp_opt_get_bool(kr->krb5_ctx->opts,
KRB5_STORE_PASSWORD_IF_OFFLINE)) {
krb5_auth_cache_creds(state->kr->krb5_ctx,
- state->be_ctx->sysdb,
+ state->be_ctx->domain->sysdb,
state->be_ctx->domain,
state->be_ctx->cdb,
state->pd, state->kr->uid,
diff --git a/src/providers/krb5/krb5_renew_tgt.c b/src/providers/krb5/krb5_renew_tgt.c
index 85315425..e8957484 100644
--- a/src/providers/krb5/krb5_renew_tgt.c
+++ b/src/providers/krb5/krb5_renew_tgt.c
@@ -393,14 +393,14 @@ static errno_t check_ccache_files(struct renew_tgt_ctx *renew_tgt_ctx)
return ENOMEM;
}
- base_dn = sysdb_base_dn(renew_tgt_ctx->be_ctx->sysdb, tmp_ctx);
+ base_dn = sysdb_base_dn(renew_tgt_ctx->be_ctx->domain->sysdb, tmp_ctx);
if (base_dn == NULL) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_base_dn failed.\n"));
ret = ENOMEM;
goto done;
}
- ret = sysdb_search_entry(tmp_ctx, renew_tgt_ctx->be_ctx->sysdb, base_dn,
+ ret = sysdb_search_entry(tmp_ctx, renew_tgt_ctx->be_ctx->domain->sysdb, base_dn,
LDB_SCOPE_SUBTREE, ccache_filter, ccache_attrs,
&msgs_count, &msgs);
if (ret != EOK) {
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c
index aa07fbb8..48a282c4 100644
--- a/src/providers/ldap/ldap_auth.c
+++ b/src/providers/ldap/ldap_auth.c
@@ -620,7 +620,7 @@ static void auth_connect_done(struct tevent_req *subreq)
state->srv, PORT_WORKING);
}
- ret = get_user_dn(state, state->ctx->be->sysdb, state->ctx->be->domain,
+ ret = get_user_dn(state, state->ctx->be->domain->sysdb, state->ctx->be->domain,
state->ctx->opts, state->username, &state->dn,
&state->pw_expire_type, &state->pw_expire_data);
if (ret) {
@@ -1156,7 +1156,7 @@ static void sdap_pam_auth_done(struct tevent_req *req)
ret = sss_authtok_get_password(&state->pd->authtok, &password, NULL);
if (ret == EOK) {
- ret = sysdb_cache_password(state->breq->be_ctx->sysdb,
+ ret = sysdb_cache_password(state->breq->be_ctx->domain->sysdb,
state->breq->be_ctx->domain,
state->pd->user, password);
}
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 0dcd5a4d..a0587acb 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -767,7 +767,7 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx)
* clients requesting get*ent information won't get an
* immediate reply with no entries
*/
- ret = sysdb_has_enumerated(ctx->be->sysdb, ctx->be->domain,
+ ret = sysdb_has_enumerated(ctx->be->domain->sysdb, ctx->be->domain,
&has_enumerated);
if (ret != EOK) {
return ret;
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index e66114b3..5b5edec4 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -86,7 +86,7 @@ struct tevent_req *users_get_send(TALLOC_CTX *memctx,
goto fail;
}
- state->sysdb = ctx->be->sysdb;
+ state->sysdb = ctx->be->domain->sysdb;
state->domain = state->ctx->be->domain;
state->name = name;
state->filter_type = filter_type;
@@ -357,7 +357,7 @@ struct tevent_req *groups_get_send(TALLOC_CTX *memctx,
goto fail;
}
- state->sysdb = ctx->be->sysdb;
+ state->sysdb = ctx->be->domain->sysdb;
state->domain = state->ctx->be->domain;
state->name = name;
state->filter_type = filter_type;
@@ -735,7 +735,7 @@ static void groups_by_user_done(struct tevent_req *subreq)
}
if (ret == ENOENT) {
- ret = sysdb_delete_user(state->ctx->be->sysdb,
+ ret = sysdb_delete_user(state->ctx->be->domain->sysdb,
state->ctx->be->domain, state->name, 0);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c
index b220069a..534e2ee0 100644
--- a/src/providers/ldap/ldap_id_cleanup.c
+++ b/src/providers/ldap/ldap_id_cleanup.c
@@ -191,7 +191,7 @@ struct tevent_req *ldap_id_cleanup_send(TALLOC_CTX *memctx,
ctx->last_purge = tevent_timeval_current();
- ret = sysdb_transaction_start(state->ctx->be->sysdb);
+ ret = sysdb_transaction_start(state->ctx->be->domain->sysdb);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to start transaction\n"));
goto fail;
@@ -204,13 +204,13 @@ struct tevent_req *ldap_id_cleanup_send(TALLOC_CTX *memctx,
}
ret = cleanup_groups(state,
- state->ctx->be->sysdb,
+ state->ctx->be->domain->sysdb,
state->ctx->be->domain);
if (ret) {
goto fail;
}
- ret = sysdb_transaction_commit(state->ctx->be->sysdb);
+ ret = sysdb_transaction_commit(state->ctx->be->domain->sysdb);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to commit transaction\n"));
goto fail;
@@ -225,7 +225,7 @@ fail:
DEBUG(1, ("Failed to cleanup caches (%d [%s]), retrying later!\n",
(int)ret, strerror(ret)));
if (in_transaction) {
- ret = sysdb_transaction_cancel(state->ctx->be->sysdb);
+ ret = sysdb_transaction_cancel(state->ctx->be->domain->sysdb);
if (ret != EOK) {
DEBUG(1, ("Could not cancel transaction\n"));
tevent_req_error(req, ret);
@@ -247,7 +247,7 @@ static int cleanup_users_logged_in(hash_table_t *table,
static int cleanup_users(TALLOC_CTX *memctx, struct sdap_id_ctx *ctx)
{
TALLOC_CTX *tmpctx;
- struct sysdb_ctx *sysdb = ctx->be->sysdb;
+ struct sysdb_ctx *sysdb = ctx->be->domain->sysdb;
const char *attrs[] = { SYSDB_NAME, SYSDB_UIDNUM, NULL };
time_t now = time(NULL);
char *subfilter = NULL;
diff --git a/src/providers/ldap/ldap_id_enum.c b/src/providers/ldap/ldap_id_enum.c
index ecd1a6e7..6c5a378e 100644
--- a/src/providers/ldap/ldap_id_enum.c
+++ b/src/providers/ldap/ldap_id_enum.c
@@ -145,7 +145,7 @@ static void ldap_id_enumerate_reschedule(struct tevent_req *req)
* process on the next SSSD service restart (to avoid
* slowing down system boot-up
*/
- ret = sysdb_set_enumerated(ctx->be->sysdb, ctx->be->domain, true);
+ ret = sysdb_set_enumerated(ctx->be->domain->sysdb, ctx->be->domain, true);
if (ret != EOK) {
DEBUG(1, ("Could not mark domain as having enumerated.\n"));
/* This error is non-fatal, so continue */
@@ -565,7 +565,7 @@ static struct tevent_req *enum_users_send(TALLOC_CTX *memctx,
subreq = sdap_get_users_send(state, state->ev,
state->ctx->be->domain,
- state->ctx->be->sysdb,
+ state->ctx->be->domain->sysdb,
state->ctx->opts,
state->ctx->opts->user_search_bases,
sdap_id_op_handle(state->op),
@@ -724,7 +724,7 @@ static struct tevent_req *enum_groups_send(TALLOC_CTX *memctx,
subreq = sdap_get_groups_send(state, state->ev,
state->ctx->be->domain,
- state->ctx->be->sysdb,
+ state->ctx->be->domain->sysdb,
state->ctx->opts,
state->ctx->opts->group_search_bases,
sdap_id_op_handle(state->op),
diff --git a/src/providers/ldap/ldap_id_netgroup.c b/src/providers/ldap/ldap_id_netgroup.c
index 4e2ae4c8..5080cfb6 100644
--- a/src/providers/ldap/ldap_id_netgroup.c
+++ b/src/providers/ldap/ldap_id_netgroup.c
@@ -77,7 +77,7 @@ struct tevent_req *ldap_netgroup_get_send(TALLOC_CTX *memctx,
goto fail;
}
- state->sysdb = ctx->be->sysdb;
+ state->sysdb = ctx->be->domain->sysdb;
state->domain = state->ctx->be->domain;
state->name = name;
state->timeout = dp_opt_get_int(ctx->opts->basic, SDAP_SEARCH_TIMEOUT);
diff --git a/src/providers/ldap/ldap_id_services.c b/src/providers/ldap/ldap_id_services.c
index 1a2a7b6b..5699bf0d 100644
--- a/src/providers/ldap/ldap_id_services.c
+++ b/src/providers/ldap/ldap_id_services.c
@@ -76,7 +76,7 @@ services_get_send(TALLOC_CTX *mem_ctx,
state->ev = ev;
state->id_ctx = id_ctx;
state->dp_error = DP_ERR_FATAL;
- state->sysdb = id_ctx->be->sysdb;
+ state->sysdb = id_ctx->be->domain->sysdb;
state->domain = state->id_ctx->be->domain;
state->name = name;
state->protocol = protocol;
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index 8c0b0167..4dfb920d 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -2535,7 +2535,7 @@ struct tevent_req *sdap_get_initgr_send(TALLOC_CTX *memctx,
state->ev = ev;
state->opts = id_ctx->opts;
- state->sysdb = id_ctx->be->sysdb;
+ state->sysdb = id_ctx->be->domain->sysdb;
state->dom = id_ctx->be->domain;
state->sh = sh;
state->id_ctx = id_ctx;
diff --git a/src/providers/ldap/sdap_async_services.c b/src/providers/ldap/sdap_async_services.c
index fd002b42..15a725b8 100644
--- a/src/providers/ldap/sdap_async_services.c
+++ b/src/providers/ldap/sdap_async_services.c
@@ -543,7 +543,7 @@ enum_services_send(TALLOC_CTX *memctx,
state->ev = ev;
state->id_ctx = id_ctx;
state->domain = id_ctx->be->domain;
- state->sysdb = id_ctx->be->sysdb;
+ state->sysdb = id_ctx->be->domain->sysdb;
state->op = op;
if (id_ctx->srv_opts && id_ctx->srv_opts->max_service_value && !purge) {
diff --git a/src/providers/ldap/sdap_async_sudo.c b/src/providers/ldap/sdap_async_sudo.c
index 2e61fc63..67b12b04 100644
--- a/src/providers/ldap/sdap_async_sudo.c
+++ b/src/providers/ldap/sdap_async_sudo.c
@@ -129,7 +129,7 @@ struct tevent_req *sdap_sudo_refresh_send(TALLOC_CTX *mem_ctx,
state->opts = opts;
state->sdap_op = NULL;
state->sdap_conn_cache = conn_cache;
- state->sysdb = be_ctx->sysdb;
+ state->sysdb = be_ctx->domain->sysdb;
state->domain = be_ctx->domain;
state->ldap_filter = talloc_strdup(state, ldap_filter);
state->sysdb_filter = talloc_strdup(state, sysdb_filter);
diff --git a/src/providers/ldap/sdap_autofs.c b/src/providers/ldap/sdap_autofs.c
index 97b9f3ed..fae933ca 100644
--- a/src/providers/ldap/sdap_autofs.c
+++ b/src/providers/ldap/sdap_autofs.c
@@ -98,7 +98,7 @@ void sdap_autofs_handler(struct be_req *be_req)
autofs_req->mapname ? autofs_req->mapname : "<ALL>\n"));
if (autofs_req->invalidate) {
- ret = sysdb_invalidate_autofs_maps(id_ctx->be->sysdb,
+ ret = sysdb_invalidate_autofs_maps(id_ctx->be->domain->sysdb,
id_ctx->be->domain);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE, ("Could not invalidate autofs maps, "
@@ -211,7 +211,7 @@ sdap_autofs_get_map_connect_done(struct tevent_req *subreq)
subreq = sdap_autofs_setautomntent_send(state, state->ev,
state->ctx->be->domain,
- state->ctx->be->sysdb,
+ state->ctx->be->domain->sysdb,
sdap_id_op_handle(state->op),
state->op,
state->ctx->opts,
@@ -257,7 +257,7 @@ sdap_autofs_get_map_done(struct tevent_req *subreq)
}
if (ret == ENOENT) {
- ret = sysdb_delete_autofsmap(state->ctx->be->sysdb,
+ ret = sysdb_delete_autofsmap(state->ctx->be->domain->sysdb,
state->ctx->be->domain, state->map_name);
if (ret != EOK && ret != ENOENT) {
DEBUG(SSSDBG_OP_FAILURE,
diff --git a/src/providers/ldap/sdap_idmap.c b/src/providers/ldap/sdap_idmap.c
index b3109b8a..0db3265f 100644
--- a/src/providers/ldap/sdap_idmap.c
+++ b/src/providers/ldap/sdap_idmap.c
@@ -51,7 +51,7 @@ sdap_idmap_init(TALLOC_CTX *mem_ctx,
const char *sid_str;
id_t slice_num;
struct sdap_idmap_ctx *idmap_ctx = NULL;
- struct sysdb_ctx *sysdb = id_ctx->be->sysdb;
+ struct sysdb_ctx *sysdb = id_ctx->be->domain->sysdb;
tmp_ctx = talloc_new(NULL);
if (!tmp_ctx) return ENOMEM;
@@ -313,7 +313,7 @@ sdap_idmap_add_domain(struct sdap_idmap_ctx *idmap_ctx,
}
/* Add this domain to the SYSDB cache so it will survive reboot */
- ret = sysdb_idmap_store_mapping(idmap_ctx->id_ctx->be->sysdb,
+ ret = sysdb_idmap_store_mapping(idmap_ctx->id_ctx->be->domain->sysdb,
idmap_ctx->id_ctx->be->domain,
dom_name, dom_sid,
new_slice->slice_num);
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 990eed1a..9c818366 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -251,7 +251,7 @@ static int sdap_sudo_setup_periodical_refresh(struct sdap_sudo_ctx *sudo_ctx)
}
}
- ret = sysdb_sudo_get_last_full_refresh(id_ctx->be->sysdb,
+ ret = sysdb_sudo_get_last_full_refresh(id_ctx->be->domain->sysdb,
id_ctx->be->domain,
&last_full);
if (ret != EOK) {
@@ -555,7 +555,7 @@ static struct tevent_req *sdap_sudo_full_refresh_send(TALLOC_CTX *mem_ctx,
state->sudo_ctx = sudo_ctx;
state->id_ctx = id_ctx;
- state->sysdb = id_ctx->be->sysdb;
+ state->sysdb = id_ctx->be->domain->sysdb;
state->domain = id_ctx->be->domain;
/* Download all rules from LDAP */
@@ -867,7 +867,7 @@ static struct tevent_req *sdap_sudo_smart_refresh_send(TALLOC_CTX *mem_ctx,
}
state->id_ctx = id_ctx;
- state->sysdb = id_ctx->be->sysdb;
+ state->sysdb = id_ctx->be->domain->sysdb;
/* Download all rules from LDAP that are newer than usn */
usn = srv_opts->max_sudo_value;
diff --git a/src/providers/proxy/proxy_auth.c b/src/providers/proxy/proxy_auth.c
index d4167c1f..02a95fe6 100644
--- a/src/providers/proxy/proxy_auth.c
+++ b/src/providers/proxy/proxy_auth.c
@@ -757,7 +757,7 @@ static void proxy_child_done(struct tevent_req *req)
goto done;
}
- ret = sysdb_cache_password(client_ctx->be_req->be_ctx->sysdb,
+ ret = sysdb_cache_password(client_ctx->be_req->be_ctx->domain->sysdb,
client_ctx->be_req->be_ctx->domain,
pd->user, password);
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
index a97dd63e..33869e5a 100644
--- a/src/providers/proxy/proxy_id.c
+++ b/src/providers/proxy/proxy_id.c
@@ -1351,7 +1351,7 @@ void proxy_get_account_info(struct be_req *breq)
ar = talloc_get_type(breq->req_data, struct be_acct_req);
ctx = talloc_get_type(breq->be_ctx->bet_info[BET_ID].pvt_bet_data,
struct proxy_id_ctx);
- sysdb = breq->be_ctx->sysdb;
+ sysdb = breq->be_ctx->domain->sysdb;
domain = breq->be_ctx->domain;
if (be_is_offline(breq->be_ctx)) {
diff --git a/src/providers/simple/simple_access.c b/src/providers/simple/simple_access.c
index f7f9192e..a6683a69 100644
--- a/src/providers/simple/simple_access.c
+++ b/src/providers/simple/simple_access.c
@@ -107,7 +107,7 @@ errno_t simple_access_check(struct simple_ctx *ctx, const char *username,
goto done;
}
- ret = sysdb_search_user_by_name(tmp_ctx, ctx->sysdb, ctx->domain,
+ ret = sysdb_search_user_by_name(tmp_ctx, ctx->domain->sysdb, ctx->domain,
username, user_attrs, &msg);
if (ret != EOK) {
DEBUG(1, ("Could not look up username [%s]: [%d][%s]\n",
@@ -130,7 +130,7 @@ errno_t simple_access_check(struct simple_ctx *ctx, const char *username,
for (j = 0; j < el->num_values; j++) {
ret = sysdb_group_dn_name(
- ctx->sysdb, tmp_ctx,
+ ctx->domain->sysdb, tmp_ctx,
(char *)el->values[j].data,
&groups[j]);
if (ret != EOK) {
@@ -155,7 +155,7 @@ errno_t simple_access_check(struct simple_ctx *ctx, const char *username,
}
talloc_zfree(msg);
- ret = sysdb_search_group_by_gid(tmp_ctx, ctx->sysdb, ctx->domain,
+ ret = sysdb_search_group_by_gid(tmp_ctx, ctx->domain->sysdb, ctx->domain,
gid, group_attrs, &msg);
if (ret != EOK) {
DEBUG(1, ("Could not look up primary group [%lu]: [%d][%s]\n",
@@ -288,7 +288,6 @@ int sssm_simple_access_init(struct be_ctx *bectx, struct bet_ops **ops,
return ENOMEM;
}
- ctx->sysdb = bectx->sysdb;
ctx->domain = bectx->domain;
/* Users */
diff --git a/src/providers/simple/simple_access.h b/src/providers/simple/simple_access.h
index abcf61ac..c2854146 100644
--- a/src/providers/simple/simple_access.h
+++ b/src/providers/simple/simple_access.h
@@ -27,7 +27,6 @@
#include "util/util.h"
struct simple_ctx {
- struct sysdb_ctx *sysdb;
struct sss_domain_info *domain;
char **allow_users;