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

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