dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone
Blob Blame History Raw
From d8d007c12bac73df4931722c4f7b57fa778bf105 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Fri, 24 Oct 2014 11:28:54 +0200
Subject: [PATCH 47/48] nss: group enumeration fix
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The view/override patches introduced and issue with group enumeration
where all groups are returned with the same name. This patch should fix
it.

Fixes: https://fedorahosted.org/sssd/ticket/2475

Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
(cherry picked from commit 4b2b722319f11c81c06f488f3962a6b6280f4b9f)
---
 src/responder/nss/nsssrv_cmd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 4ec99c153b25db26d482eec8da6ca52487967abc..9fca644be164e682f787bda61ea39afa8b703874 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -2669,6 +2669,9 @@ static int fill_grent(struct sss_packet *packet,
         rsize = 0;
 
         /* find group name/gid */
+
+        /* start with an empty name for each iteration */
+        orig_name = NULL;
         if (DOM_HAS_VIEWS(dom)) {
             orig_name = ldb_msg_find_attr_as_string(msg,
                                                     OVERRIDE_PREFIX SYSDB_NAME,
-- 
1.9.3