Blame SOURCES/0003-Issue-51091-healthcheck-json-report-fails-when-mappi.patch

b55ad6
From 7a62e72b81d75ebb844835619ecc97dbf5e21058 Mon Sep 17 00:00:00 2001
b55ad6
From: Mark Reynolds <mreynolds@redhat.com>
b55ad6
Date: Thu, 14 May 2020 09:38:20 -0400
b55ad6
Subject: [PATCH 03/12] Issue 51091 - healthcheck json report fails when
b55ad6
 mapping tree is deleted
b55ad6
b55ad6
Description:  We were passing the bename in bytes and not as a utf8 string.
b55ad6
              This caused the json dumping to fail.
b55ad6
b55ad6
relates: https://pagure.io/389-ds-base/issue/51091
b55ad6
b55ad6
Reviewed by: firstyear(Thanks!)
b55ad6
---
b55ad6
 src/lib389/lib389/backend.py | 6 +++---
b55ad6
 1 file changed, 3 insertions(+), 3 deletions(-)
b55ad6
b55ad6
diff --git a/src/lib389/lib389/backend.py b/src/lib389/lib389/backend.py
b55ad6
index e472d3de5..4f752f414 100644
b55ad6
--- a/src/lib389/lib389/backend.py
b55ad6
+++ b/src/lib389/lib389/backend.py
b55ad6
@@ -11,7 +11,7 @@ import copy
b55ad6
 import ldap
b55ad6
 from lib389._constants import *
b55ad6
 from lib389.properties import *
b55ad6
-from lib389.utils import normalizeDN, ensure_str, ensure_bytes,  assert_c
b55ad6
+from lib389.utils import normalizeDN, ensure_str, assert_c
b55ad6
 from lib389 import Entry
b55ad6
 
b55ad6
 # Need to fix this ....
b55ad6
@@ -488,10 +488,10 @@ class Backend(DSLdapObject):
b55ad6
 
b55ad6
         # Check for the missing mapping tree.
b55ad6
         suffix = self.get_attr_val_utf8('nsslapd-suffix')
b55ad6
-        bename = self.get_attr_val_bytes('cn')
b55ad6
+        bename = self.get_attr_val_utf8('cn')
b55ad6
         try:
b55ad6
             mt = self._mts.get(suffix)
b55ad6
-            if mt.get_attr_val_bytes('nsslapd-backend') != bename and mt.get_attr_val('nsslapd-state') != ensure_bytes('backend'):
b55ad6
+            if mt.get_attr_val_utf8('nsslapd-backend') != bename and mt.get_attr_val_utf8('nsslapd-state') != 'backend':
b55ad6
                 raise ldap.NO_SUCH_OBJECT("We have a matching suffix, but not a backend or correct database name.")
b55ad6
         except ldap.NO_SUCH_OBJECT:
b55ad6
             result = DSBLE0001
b55ad6
-- 
b55ad6
2.26.2
b55ad6