Blame SOURCES/0020-sdap-Fix-ldap_rfc_2307_fallback_to_local_users.patch

b2d430
From dad90587794fdc2112f2099d5f6cdd9e138781be Mon Sep 17 00:00:00 2001
b2d430
From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com>
b2d430
Date: Wed, 13 Jul 2016 20:02:47 +0200
b2d430
Subject: [PATCH 20/27] sdap: Fix ldap_rfc_2307_fallback_to_local_users
b2d430
MIME-Version: 1.0
b2d430
Content-Type: text/plain; charset=UTF-8
b2d430
Content-Transfer-Encoding: 8bit
b2d430
b2d430
We wrongly tried to store empty
b2d430
user attributes instead of the
b2d430
local user attributes with
b2d430
ldap_rfc_2307_fallback_to_local_users
b2d430
set to true. This gave us bad
b2d430
initgroups results and caused
b2d430
segfaults.
b2d430
b2d430
Resolves:
b2d430
https://fedorahosted.org/sssd/ticket/3045
b2d430
b2d430
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
b2d430
(cherry picked from commit aa8ec3758d885d6ae4088174369d30f8493ec898)
b2d430
---
b2d430
 src/providers/ldap/sdap_async_initgroups.c | 3 +++
b2d430
 1 file changed, 3 insertions(+)
b2d430
b2d430
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
b2d430
index d14563cb045a0ce34b72051744894362fc32d003..17593f0a268813662d6c7fbf658b1eb4599ce3c3 100644
b2d430
--- a/src/providers/ldap/sdap_async_initgroups.c
b2d430
+++ b/src/providers/ldap/sdap_async_initgroups.c
b2d430
@@ -2893,6 +2893,9 @@ static void sdap_get_initgr_user(struct tevent_req *subreq)
b2d430
             (dp_opt_get_bool(state->opts->basic,
b2d430
                              SDAP_RFC2307_FALLBACK_TO_LOCAL_USERS) == true)) {
b2d430
             ret = sdap_fallback_local_user(state, state->shortname, -1, &usr_attrs);
b2d430
+            if (ret == EOK) {
b2d430
+                state->orig_user = usr_attrs[0];
b2d430
+            }
b2d430
         } else {
b2d430
             ret = ENOENT;
b2d430
         }
b2d430
-- 
b2d430
2.4.11
b2d430