From 412ab492ded991c833e8592751a9d92f3c8cbe0e Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 7 Mar 2011 10:04:13 +0100 Subject: Add missing name to struct getent_ctx for missing netgroup https://fedorahosted.org/sssd/ticket/817 --- src/responder/nss/nsssrv_netgroup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/responder/nss/nsssrv_netgroup.c b/src/responder/nss/nsssrv_netgroup.c index c5ca36f5..07cd2bdc 100644 --- a/src/responder/nss/nsssrv_netgroup.c +++ b/src/responder/nss/nsssrv_netgroup.c @@ -494,6 +494,12 @@ static errno_t lookup_netgr_step(struct setent_step_ctx *step_ctx) netgr->ready = true; netgr->entries = NULL; netgr->lookup_table = step_ctx->nctx->netgroups; + netgr->name = talloc_strdup(netgr, step_ctx->name); + if (netgr->name == NULL) { + DEBUG(1, ("talloc_strdup failed.\n")); + talloc_free(netgr); + return ENOMEM; + } ret = set_netgroup_entry(step_ctx->nctx, step_ctx->name, netgr); if (ret != EOK) { -- cgit