From d7b90921c1a404f0d9fb8384a8fd55fd15b86916 Mon Sep 17 00:00:00 2001
From: Pavel Reichl <preichl@redhat.com>
Date: Wed, 17 Dec 2014 14:10:45 +0000
Subject: [PATCH 3/7] NSS: nss_cmd_getbysid_search return ENOENT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
---
src/responder/nss/nsssrv_cmd.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index ea58920bc3611c84958e8d0aca0e122d90c68e5c..80ac221e288665741d8b1e2bd020ecca568106c1 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -4502,16 +4502,16 @@ static errno_t nss_cmd_getbysid_search(struct nss_dom_ctx *dctx)
return ENOENT;
}
- if (dctx->res->count == 0 && !dctx->check_provider) {
+ if (dctx->res->count == 0) {
DEBUG(SSSDBG_OP_FAILURE, "No results for getbysid call.\n");
-
- /* set negative cache only if not result of cache check */
- ret = sss_ncache_set_sid(nctx->ncache, false, cmdctx->secid);
- if (ret != EOK) {
- DEBUG(SSSDBG_MINOR_FAILURE,
- "Cannot set negative cache for %s\n", cmdctx->secid);
+ if (!dctx->check_provider) {
+ /* set negative cache only if not result of cache check */
+ ret = sss_ncache_set_sid(nctx->ncache, false, cmdctx->secid);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "Cannot set negative cache for %s\n", cmdctx->secid);
+ }
}
-
return ENOENT;
}
--
1.9.3