summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorPetr Cech <pcech@redhat.com>2016-05-05 05:26:00 -0400
committerLukas Slebodnik <lslebodn@redhat.com>2016-05-11 13:43:24 +0200
commite3bb7b3fda4697fa9c6f80107cd01dd04a20c85f (patch)
tree13a8d6c3b2498e33235c7350ca39eb501ab9a241 /src/responder
parent8110a8e2369e49c288ede1473657be9451a244e5 (diff)
downloadsssd-e3bb7b3fda4697fa9c6f80107cd01dd04a20c85f.tar.gz
sssd-e3bb7b3fda4697fa9c6f80107cd01dd04a20c85f.tar.xz
sssd-e3bb7b3fda4697fa9c6f80107cd01dd04a20c85f.zip
RESPONDER: Removing ncache from sudo_ctx
This patch switches ncache from sudo_ctx to resp_ctx. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/sudo/sudosrv.c13
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c3
-rw-r--r--src/responder/sudo/sudosrv_private.h2
3 files changed, 3 insertions, 15 deletions
diff --git a/src/responder/sudo/sudosrv.c b/src/responder/sudo/sudosrv.c
index cf131853d..73c91b1f8 100644
--- a/src/responder/sudo/sudosrv.c
+++ b/src/responder/sudo/sudosrv.c
@@ -90,7 +90,6 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
struct be_conn *iter;
int ret;
int max_retries;
- uint32_t neg_timeout;
sudo_cmds = get_sudo_cmds();
ret = sss_process_init(mem_ctx, ev, cdb,
@@ -115,20 +114,10 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
goto fail;
}
- ret = responder_get_neg_timeout_from_confdb(cdb, &neg_timeout);
- if (ret != EOK) goto fail;
-
- ret = sss_ncache_init(rctx, neg_timeout, &sudo_ctx->ncache);
- if (ret != EOK) {
- DEBUG(SSSDBG_FATAL_FAILURE,
- "fatal error initializing ncache\n");
- goto fail;
- }
-
sudo_ctx->rctx = rctx;
sudo_ctx->rctx->pvt_ctx = sudo_ctx;
- sss_ncache_prepopulate(sudo_ctx->ncache, sudo_ctx->rctx->cdb, rctx);
+ sss_ncache_prepopulate(sudo_ctx->rctx->ncache, sudo_ctx->rctx->cdb, rctx);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE,
"failed to set ncache for sudo's filter_users\n");
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index b981a3252..9095d77ba 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -457,7 +457,8 @@ struct tevent_req *sudosrv_get_rules_send(TALLOC_CTX *mem_ctx,
DEBUG(SSSDBG_TRACE_FUNC, "Running initgroups for [%s]\n", username);
subreq = cache_req_initgr_by_name_send(state, ev, sudo_ctx->rctx,
- sudo_ctx->ncache, 0, NULL, username);
+ sudo_ctx->rctx->ncache, 0, NULL,
+ username);
if (subreq == NULL) {
ret = ENOMEM;
goto immediately;
diff --git a/src/responder/sudo/sudosrv_private.h b/src/responder/sudo/sudosrv_private.h
index a44d724ed..94f3c4458 100644
--- a/src/responder/sudo/sudosrv_private.h
+++ b/src/responder/sudo/sudosrv_private.h
@@ -43,8 +43,6 @@ enum sss_sudo_type {
struct sudo_ctx {
struct resp_ctx *rctx;
- struct sss_nc_ctx *ncache;
-
/*
* options
*/