summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/responder/nss/nsssrv_netgroup.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/responder/nss/nsssrv_netgroup.c b/src/responder/nss/nsssrv_netgroup.c
index c269309f5..fae603b9b 100644
--- a/src/responder/nss/nsssrv_netgroup.c
+++ b/src/responder/nss/nsssrv_netgroup.c
@@ -474,11 +474,7 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
/* Look up the netgroup in the cache */
ret = sysdb_getnetgr(step_ctx->dctx, dom, name, &step_ctx->dctx->res);
- if (step_ctx->dctx->res->count > 1) {
- DEBUG(SSSDBG_FATAL_FAILURE,
- "getnetgr call returned more than one result !?!\n");
- return EMSGSIZE;
- }
+
if (ret == ENOENT) {
/* This netgroup was not found in this domain */
if (!step_ctx->dctx->check_provider) {
@@ -497,6 +493,12 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx)
return EIO;
}
+ if (step_ctx->dctx->res->count > 1) {
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ "getnetgr call returned more than one result !?!\n");
+ return EMSGSIZE;
+ }
+
ret = get_netgroup_entry(step_ctx->nctx, step_ctx->name,
&netgr);
if (ret != EOK) {