Blame SOURCES/0015-Issue-4219-fix-crash-around-logging-internal-unindex.patch

d78ea0
From 004aa9ef4f4ce967089d0a999617f19f4a3a7706 Mon Sep 17 00:00:00 2001
d78ea0
From: Mark Reynolds <mreynolds@redhat.com>
d78ea0
Date: Tue, 8 Dec 2020 09:19:36 -0500
d78ea0
Subject: [PATCH 1/2] Issue 4219 - fix crash around logging internal unindexed
d78ea0
 searches
d78ea0
d78ea0
Description:  In 1.3.x there is no function get_internal_conn_op()
d78ea0
              which was beign called and crashing the server.  Just
d78ea0
              use the regular conn and op numbers.
d78ea0
d78ea0
Fixes: https://github.com/389ds/389-ds-base/issues/4219
d78ea0
d78ea0
Reviewed by:  tmihinto(Thanks!)
d78ea0
---
d78ea0
 ldap/servers/slapd/back-ldbm/ldbm_search.c | 9 ++-------
d78ea0
 1 file changed, 2 insertions(+), 7 deletions(-)
d78ea0
d78ea0
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
d78ea0
index 212b6cb61..81eef3ac9 100644
d78ea0
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
d78ea0
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
d78ea0
@@ -831,10 +831,6 @@ ldbm_back_search(Slapi_PBlock *pb)
d78ea0
         char *plugin_dn;
d78ea0
         char *base_dn;
d78ea0
         int32_t internal_op = operation_is_flag_set(operation, OP_FLAG_INTERNAL);
d78ea0
-        uint64_t connid;
d78ea0
-        int32_t op_id;
d78ea0
-        int32_t op_internal_id;
d78ea0
-        int32_t op_nested_count;
d78ea0
 
d78ea0
         /*
d78ea0
          * Return error if nsslapd-require-index is set and
d78ea0
@@ -873,10 +869,9 @@ ldbm_back_search(Slapi_PBlock *pb)
d78ea0
                 slapi_pblock_get(pb, SLAPI_PLUGIN, &plugin);
d78ea0
             }
d78ea0
             plugin_dn = plugin_get_dn(plugin);
d78ea0
-            get_internal_conn_op(&connid, &op_id, &op_internal_id, &op_nested_count);
d78ea0
             slapi_log_err(SLAPI_LOG_NOTICE, "ldbm_back_search",
d78ea0
-                    "Internal unindexed search: source (%s) search base=\"%s\" scope=%d filter=\"%s\" conn=%" PRIu64 " op=%d (internal op=%d count=%d)\n",
d78ea0
-                    plugin_dn, base_dn, scope, filter_str, connid, op_id, op_internal_id, op_nested_count);
d78ea0
+                    "Internal unindexed search: source (%s) search base=\"%s\" scope=%d filter=\"%s\" conn=%" PRIu64 " op=%d\n",
d78ea0
+                    plugin_dn, base_dn, scope, filter_str, pb_op->o_connid, pb_op->o_opid);
d78ea0
             slapi_ch_free_string(&plugin_dn);
d78ea0
         } else {
d78ea0
             slapi_log_err(SLAPI_LOG_NOTICE, "ldbm_back_search",
d78ea0
-- 
d78ea0
2.26.2
d78ea0