summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-03-07 10:04:13 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-03-07 07:59:17 -0500
commit412ab492ded991c833e8592751a9d92f3c8cbe0e (patch)
treeaae1e9bcb2e1f32977968182b71eddad92d0dd76 /src
parentef2c477a605e2130be019d1a4bba6bdd02c54a9d (diff)
downloadsssd-412ab492ded991c833e8592751a9d92f3c8cbe0e.tar.gz
sssd-412ab492ded991c833e8592751a9d92f3c8cbe0e.tar.bz2
sssd-412ab492ded991c833e8592751a9d92f3c8cbe0e.zip
Add missing name to struct getent_ctx for missing netgroup
https://fedorahosted.org/sssd/ticket/817
Diffstat (limited to 'src')
-rw-r--r--src/responder/nss/nsssrv_netgroup.c6
1 files changed, 6 insertions, 0 deletions
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) {