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