1 From 9ccd49a3bcabd8eb32a559af2cacf2b0fdcfad96 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com>
3 Date: Thu, 10 Nov 2016 15:04:57 +0100
4 Subject: [PATCH 27/39] ipa: Nested netgroups do not work
6 We lowercase the keys to the hash table used to store netgroups
7 but do not lowercase it when reading the table. This results
8 in nested netgroups not being found when they should and
11 The lowercasing does not seem to be necessary anymore (not
12 sure if it ever was) so we can skip it.
15 https://fedorahosted.org/sssd/ticket/3159
17 Reviewed-by: Petr Cech <pcech@redhat.com>
18 (cherry picked from commit ff565da1011aa4312847e28e7af66e57fccf8b90)
19 (cherry picked from commit 7de33877c7e39f9a5cae6baf815dc18ae5a18597)
21 src/providers/ipa/ipa_netgroups.c | 15 +++------------
22 1 file changed, 3 insertions(+), 12 deletions(-)
24 diff --git a/src/providers/ipa/ipa_netgroups.c b/src/providers/ipa/ipa_netgroups.c
25 index a19e5e03d..17b11af5d 100644
26 --- a/src/providers/ipa/ipa_netgroups.c
27 +++ b/src/providers/ipa/ipa_netgroups.c
28 @@ -563,7 +563,6 @@ static void ipa_netgr_members_process(struct tevent_req *subreq)
32 - char *orig_dn_lower;
36 @@ -638,20 +637,12 @@ static void ipa_netgr_members_process(struct tevent_req *subreq)
40 - orig_dn_lower = talloc_strdup(table, orig_dn);
41 - if (orig_dn_lower == NULL) {
42 + key.str = talloc_strdup(table, orig_dn);
43 + if (key.str == NULL) {
47 - /* Transform the DN to lower case.
48 - * this is important, as the member/memberof attributes
49 - * have the value also in lower-case
51 - key.str = orig_dn_lower;
52 - while (*orig_dn_lower != '\0') {
53 - *orig_dn_lower = tolower(*orig_dn_lower);
57 value.ptr = entities[i];
58 ret = hash_enter(table, &key, &value);
59 if (ret != HASH_SUCCESS) {