From 0f707b5f99f4cc17b61026e7a0e7787e776fae87 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Wed, 6 Dec 2017 15:45:13 +0100
Subject: [PATCH 85/86] IPA: Include SYSDB_OBJECTCATEGORY, not OBJECTCLASS in
cache search results
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The function get_object_from_cache() returns an ldb_message that is
passed to apply_subdomain_homedir() which expects SYSDB_OBJECTCATEGORY
to be present in the message, otherwise it errors out.
However, get_object_from_cache() was reading only SYSDB_OBJECTCLASS.
This patch changes get_object_from_cache() to ready
SYSDB_OBJECTCATEGORY.
Resolves:
https://pagure.io/SSSD/sssd/issue/3599
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
(cherry picked from commit dc49e07a0dbbbf3d69d09a7c6f236d82c86c7def)
---
src/providers/ipa/ipa_subdomains_id.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index 2ba9813a44b4d914d9c2ef7a1a7504546f52954c..d40671086854f9c1a3f8bc7fc711009298dc31c8 100644
--- a/src/providers/ipa/ipa_subdomains_id.c
+++ b/src/providers/ipa/ipa_subdomains_id.c
@@ -965,7 +965,7 @@ errno_t get_object_from_cache(TALLOC_CTX *mem_ctx,
const char *attrs[] = { SYSDB_NAME,
SYSDB_UIDNUM,
SYSDB_SID_STR,
- SYSDB_OBJECTCLASS,
+ SYSDB_OBJECTCATEGORY,
SYSDB_UUID,
SYSDB_GHOST,
SYSDB_HOMEDIR,
--
2.14.3