Hi list,

this simple patch fixes talloc hierarchy in initializing negative caches in responders.

This patch is applicable after [1].

[1] https://www.mail-archive.com/sssd-devel@lists.fedorahosted.org/msg26515.html

Regards

--
Petr^4 Čech
>From 974f7ab89770683e22e9ba186ae662c20876d354 Mon Sep 17 00:00:00 2001
From: Petr Cech <pc...@redhat.com>
Date: Tue, 26 Apr 2016 03:16:27 -0400
Subject: [PATCH] RESPONDERS: Fix talloc context for negative cache

This patch fixes hierarchy of talloc contexts used for initializing
negative cache in responders.

Resolves:
https://fedorahosted.org/sssd/ticket/2928
---
 src/responder/ifp/ifpsrv.c   | 2 +-
 src/responder/nss/nsssrv.c   | 2 +-
 src/responder/sudo/sudosrv.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/responder/ifp/ifpsrv.c b/src/responder/ifp/ifpsrv.c
index 55a182143b82c7eedfa4f4619adc6ab1de73bf4d..8ae8f928336e60cacae246a2b8270051eabd3d27 100644
--- a/src/responder/ifp/ifpsrv.c
+++ b/src/responder/ifp/ifpsrv.c
@@ -287,7 +287,7 @@ int ifp_process_init(TALLOC_CTX *mem_ctx,
     ret = responder_get_neg_timeout_from_confdb(cdb, &neg_timeout);
     if (ret != EOK) goto fail;
 
-    ret = sss_ncache_init(rctx, neg_timeout, &ifp_ctx->ncache);
+    ret = sss_ncache_init(ifp_ctx, neg_timeout, &ifp_ctx->ncache);
     if (ret != EOK) {
         DEBUG(SSSDBG_CRIT_FAILURE, "fatal error initializing negcache\n");
         goto fail;
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
index 363ee7bffac5a3fa61a9d81ae5821ed6ffaa50d7..d5e35f9349289caa87474ca8c7ee5a87934cd7f6 100644
--- a/src/responder/nss/nsssrv.c
+++ b/src/responder/nss/nsssrv.c
@@ -439,7 +439,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
     ret = responder_get_neg_timeout_from_confdb(cdb, &neg_timeout);
     if (ret != EOK) goto fail;
 
-    ret = sss_ncache_init(rctx, neg_timeout, &nctx->ncache);
+    ret = sss_ncache_init(nctx, neg_timeout, &nctx->ncache);
     if (ret != EOK) {
         DEBUG(SSSDBG_FATAL_FAILURE,
               "fatal error initializing negative cache\n");
diff --git a/src/responder/sudo/sudosrv.c b/src/responder/sudo/sudosrv.c
index cf131853d16314356e18063972812f56ccbb4386..0740303123bc41bb468b9cc0ef1080689f756f75 100644
--- a/src/responder/sudo/sudosrv.c
+++ b/src/responder/sudo/sudosrv.c
@@ -118,7 +118,7 @@ int sudo_process_init(TALLOC_CTX *mem_ctx,
     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);
+    ret = sss_ncache_init(sudo_ctx, neg_timeout, &sudo_ctx->ncache);
     if (ret != EOK) {
         DEBUG(SSSDBG_FATAL_FAILURE,
               "fatal error initializing ncache\n");
-- 
2.5.5

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org

Reply via email to