Blame SOURCES/0025-Issue-4837-persistent-search-returns-entries-even-wh.patch

5d81fc
From 31d53e7da585723e66b838dcf34b77ea7c9968c6 Mon Sep 17 00:00:00 2001
a458d3
From: tbordaz <tbordaz@redhat.com>
a458d3
Date: Wed, 21 Jul 2021 09:16:30 +0200
a458d3
Subject: [PATCH] Issue 4837 - persistent search returns entries even when an
a458d3
 error is returned by content-sync-plugin (#4838)
a458d3
a458d3
Bug description:
a458d3
	When a ldap client sends a sync request control, the server response may contain a sync state control.
a458d3
        If the server fails to create the control the search should fail.
a458d3
a458d3
Fix description:
a458d3
	In case the server fails to create the response control
a458d3
        logs the failure of the pre_search
a458d3
a458d3
relates: https://github.com/389ds/389-ds-base/issues/4837
a458d3
a458d3
Reviewed by: Simon Pichugin
a458d3
a458d3
Platforms tested: RH8.4
a458d3
---
a458d3
 ldap/servers/plugins/sync/sync_refresh.c | 2 +-
a458d3
 1 file changed, 1 insertion(+), 1 deletion(-)
a458d3
a458d3
diff --git a/ldap/servers/plugins/sync/sync_refresh.c b/ldap/servers/plugins/sync/sync_refresh.c
a458d3
index 646ff760b..4cbb6a949 100644
a458d3
--- a/ldap/servers/plugins/sync/sync_refresh.c
a458d3
+++ b/ldap/servers/plugins/sync/sync_refresh.c
a458d3
@@ -213,7 +213,7 @@ sync_srch_refresh_pre_entry(Slapi_PBlock *pb)
a458d3
         Slapi_Entry *e;
a458d3
         slapi_pblock_get(pb, SLAPI_SEARCH_RESULT_ENTRY, &e);
a458d3
         LDAPControl **ctrl = (LDAPControl **)slapi_ch_calloc(2, sizeof(LDAPControl *));
a458d3
-        sync_create_state_control(e, &ctrl[0], LDAP_SYNC_ADD, NULL);
a458d3
+        rc = sync_create_state_control(e, &ctrl[0], LDAP_SYNC_ADD, NULL);
a458d3
         slapi_pblock_set(pb, SLAPI_SEARCH_CTRLS, ctrl);
a458d3
     }
a458d3
     return (rc);
a458d3
-- 
a458d3
2.31.1
a458d3