Blame SOURCES/0025-IPA-Use-dereference-for-host-groups-even-if-the-conf.patch

5cd47f
From 2c97edb4bd965499fe4cc39710de1a565c1b40d3 Mon Sep 17 00:00:00 2001
5cd47f
From: Jakub Hrozek <jhrozek@redhat.com>
5cd47f
Date: Tue, 12 Mar 2019 12:48:48 +0100
5cd47f
Subject: [PATCH 25/25] IPA: Use dereference for host groups even if the
5cd47f
 configuration disables dereference
5cd47f
MIME-Version: 1.0
5cd47f
Content-Type: text/plain; charset=UTF-8
5cd47f
Content-Transfer-Encoding: 8bit
5cd47f
5cd47f
Related:
5cd47f
https://pagure.io/SSSD/sssd/issue/3979
5cd47f
5cd47f
In some cases, it makes sense for performance reasons to disable
5cd47f
dereference when processing user groups. But since processing of HBAC host
5cd47f
groups is not much of a performance sensitive operation, we can get away
5cd47f
with ignoring the client side setting and always using the dereference
5cd47f
branch if the server supports the dereference call.
5cd47f
5cd47f
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
5cd47f
(cherry picked from commit 9d63616000c0c886a6da87708a460218a9e24474)
5cd47f
---
5cd47f
 src/man/sssd-ldap.5.xml       | 11 +++++++++--
5cd47f
 src/providers/ipa/ipa_hosts.c |  2 +-
5cd47f
 2 files changed, 10 insertions(+), 3 deletions(-)
5cd47f
5cd47f
diff --git a/src/man/sssd-ldap.5.xml b/src/man/sssd-ldap.5.xml
5cd47f
index 5b858be62..25acc19e6 100644
5cd47f
--- a/src/man/sssd-ldap.5.xml
5cd47f
+++ b/src/man/sssd-ldap.5.xml
5cd47f
@@ -1601,8 +1601,15 @@
5cd47f
                             they are looked up individually.
5cd47f
                         </para>
5cd47f
                         <para>
5cd47f
-                            You can turn off dereference lookups completely by
5cd47f
-                            setting the value to 0.
5cd47f
+                            You can turn off dereference lookups completely
5cd47f
+                            by setting the value to 0. Please note that
5cd47f
+                            there are some codepaths in SSSD, like the IPA
5cd47f
+                            HBAC provider, that are only implemented using
5cd47f
+                            the dereference call, so even with dereference
5cd47f
+                            explicitly disabled, those parts will still
5cd47f
+                            use dereference if the server supports it
5cd47f
+                            and advertises the dereference control in the
5cd47f
+                            rootDSE object.
5cd47f
                         </para>
5cd47f
                         <para>
5cd47f
                             A dereference lookup is a means of fetching all
5cd47f
diff --git a/src/providers/ipa/ipa_hosts.c b/src/providers/ipa/ipa_hosts.c
5cd47f
index 288bfb865..e209bca67 100644
5cd47f
--- a/src/providers/ipa/ipa_hosts.c
5cd47f
+++ b/src/providers/ipa/ipa_hosts.c
5cd47f
@@ -157,7 +157,7 @@ ipa_host_info_done(struct tevent_req *subreq)
5cd47f
                 return;
5cd47f
             }
5cd47f
 
5cd47f
-            if (!sdap_has_deref_support(state->sh, state->opts)) {
5cd47f
+            if (!sdap_has_deref_support_ex(state->sh, state->opts, true)) {
5cd47f
                 DEBUG(SSSDBG_CRIT_FAILURE, "Server does not support deref\n");
5cd47f
                 tevent_req_error(req, EIO);
5cd47f
                 return;
5cd47f
-- 
5cd47f
2.19.1
5cd47f