Blame SOURCES/0004-LDAP-Initialize-user-count-for-AD-matching-rule.patch

2fc102
From 44d60762a2ffe45b2dadf05634eefb2af2e3ce14 Mon Sep 17 00:00:00 2001
2fc102
From: Jakub Hrozek <jhrozek@redhat.com>
2fc102
Date: Mon, 18 Nov 2013 16:38:34 +0100
2fc102
Subject: [PATCH 4/6] LDAP: Initialize user count for AD matching rule
2fc102
2fc102
https://fedorahosted.org/sssd/ticket/2157
2fc102
2fc102
If AD matching rule was selected, but the group was empty, the SSSD
2fc102
accessed random data. Initializing count to zero prevents that.
2fc102
---
2fc102
 src/providers/ldap/sdap_async_groups.c | 2 +-
2fc102
 1 file changed, 1 insertion(+), 1 deletion(-)
2fc102
2fc102
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
2fc102
index 7a8f3e2a5c83c5b320497a76c363a90620315dcf..9f7e3e55d0234e9aa7b9e59456044587bcad88ef 100644
2fc102
--- a/src/providers/ldap/sdap_async_groups.c
2fc102
+++ b/src/providers/ldap/sdap_async_groups.c
2fc102
@@ -1828,7 +1828,7 @@ static void sdap_ad_match_rule_members_process(struct tevent_req *subreq)
2fc102
     struct sysdb_attrs *group = state->groups[0];
2fc102
     struct ldb_message_element *member_el;
2fc102
     struct ldb_message_element *orig_dn_el;
2fc102
-    size_t count;
2fc102
+    size_t count = 0;
2fc102
     size_t i;
2fc102
     hash_table_t *ghosts;
2fc102
 
2fc102
-- 
2fc102
1.8.4.2
2fc102