|
|
086f82 |
From 814108dc02a4de5d0333e9c2713f809fc3d2da47 Mon Sep 17 00:00:00 2001
|
|
|
086f82 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
086f82 |
Date: Wed, 18 Apr 2018 10:20:06 +0200
|
|
|
086f82 |
Subject: [PATCH] nss-idmap: do not set a limit
|
|
|
086f82 |
|
|
|
086f82 |
If the limit is set the needed size to return all groups cannot be
|
|
|
086f82 |
returned.
|
|
|
086f82 |
|
|
|
086f82 |
Related to https://pagure.io/SSSD/sssd/issue/3715
|
|
|
086f82 |
|
|
|
086f82 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
086f82 |
(cherry picked from commit 46a4c265629d9b725c41f22849741ce7342bdd85)
|
|
|
086f82 |
|
|
|
086f82 |
DOWNSTREAM:
|
|
|
086f82 |
Resolves: rhbz#1570527 - memory management issue in the sssd_nss_ex interface can cause the ns-slapd process on IPA server to crash [rhel-7.5.z]
|
|
|
086f82 |
---
|
|
|
086f82 |
src/sss_client/idmap/sss_nss_ex.c | 4 +++-
|
|
|
086f82 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
086f82 |
|
|
|
086f82 |
diff --git a/src/sss_client/idmap/sss_nss_ex.c b/src/sss_client/idmap/sss_nss_ex.c
|
|
|
086f82 |
index af6a95180656b598bcb94c209dfa821cb0275f02..f56bffcc24a7e2503e23a892541a9242ed4b5069 100644
|
|
|
086f82 |
--- a/src/sss_client/idmap/sss_nss_ex.c
|
|
|
086f82 |
+++ b/src/sss_client/idmap/sss_nss_ex.c
|
|
|
086f82 |
@@ -96,7 +96,9 @@ errno_t sss_nss_mc_get(struct nss_input *inp)
|
|
|
086f82 |
inp->result.initgrrep.start,
|
|
|
086f82 |
inp->result.initgrrep.ngroups,
|
|
|
086f82 |
&(inp->result.initgrrep.groups),
|
|
|
086f82 |
- *(inp->result.initgrrep.ngroups));
|
|
|
086f82 |
+ /* no limit so that needed size can
|
|
|
086f82 |
+ * be returned properly */
|
|
|
086f82 |
+ -1);
|
|
|
086f82 |
break;
|
|
|
086f82 |
default:
|
|
|
086f82 |
return EINVAL;
|
|
|
086f82 |
--
|
|
|
086f82 |
2.14.3
|
|
|
086f82 |
|