diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-09 16:23:25 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-21 22:17:33 +0100 |
commit | df0596ec12bc5091608371e2977f3111241e8caf (patch) | |
tree | e659ecee1bb913e4648a4313ffab1d0c1794da19 /src/providers/ldap | |
parent | 7a468783159880f81f7cd9270ee94bf0954d6a56 (diff) | |
download | sssd-df0596ec12bc5091608371e2977f3111241e8caf.tar.gz sssd-df0596ec12bc5091608371e2977f3111241e8caf.tar.bz2 sssd-df0596ec12bc5091608371e2977f3111241e8caf.zip |
Remove sysdb as a be context structure member
The sysdb context is already available through the 'domain' structure.
Diffstat (limited to 'src/providers/ldap')
-rw-r--r-- | src/providers/ldap/ldap_auth.c | 4 | ||||
-rw-r--r-- | src/providers/ldap/ldap_common.c | 2 | ||||
-rw-r--r-- | src/providers/ldap/ldap_id.c | 6 | ||||
-rw-r--r-- | src/providers/ldap/ldap_id_cleanup.c | 10 | ||||
-rw-r--r-- | src/providers/ldap/ldap_id_enum.c | 6 | ||||
-rw-r--r-- | src/providers/ldap/ldap_id_netgroup.c | 2 | ||||
-rw-r--r-- | src/providers/ldap/ldap_id_services.c | 2 | ||||
-rw-r--r-- | src/providers/ldap/sdap_async_initgroups.c | 2 | ||||
-rw-r--r-- | src/providers/ldap/sdap_async_services.c | 2 | ||||
-rw-r--r-- | src/providers/ldap/sdap_async_sudo.c | 2 | ||||
-rw-r--r-- | src/providers/ldap/sdap_autofs.c | 6 | ||||
-rw-r--r-- | src/providers/ldap/sdap_idmap.c | 4 | ||||
-rw-r--r-- | src/providers/ldap/sdap_sudo.c | 6 |
13 files changed, 27 insertions, 27 deletions
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; |