andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 4 months ago
Clone
Blob Blame History Raw
From 341b4661fb26fb34e9323732d1b8ab48eafd0411 Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Thu, 6 Mar 2014 13:26:06 -0800
Subject: [PATCH 173/225] Ticket #47731 - A tombstone entry is deleted by
 ldapdelete

Description: A tombstone deletion by ldapdelete op from client is
supposed to fail.  The failure from SLAPI_PLUGIN_BETXNPOSTOPERATION
was ignored in 389-ds-base-1.2.11 plugin_call_func and it was not
passed to the backend to abort.  This patch added the check in the
same way as in 389-ds-base-1.3.1 and newer.

https://fedorahosted.org/389/ticket/47731

Reviewed by rmeggins@redhat.com (Thank you, Rich!)
(cherry picked from commit cca1fb5802009bea9ebbf27d4a2a6f878875c20c)
---
 ldap/servers/slapd/plugin.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index 0a4f4e0..d21701b 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -1454,8 +1454,7 @@ plugin_call_func (struct slapdplugin *list, int operation, Slapi_PBlock *pb, int
 			{
 				if (SLAPI_PLUGIN_PREOPERATION == list->plg_type ||
 					SLAPI_PLUGIN_INTERNAL_PREOPERATION == list->plg_type ||
-					SLAPI_PLUGIN_BETXNPREOPERATION == list->plg_type ||
-                    SLAPI_PLUGIN_START_FN == operation )
+					SLAPI_PLUGIN_START_FN == operation )
 				{
 					/*
 					 * We bail out of plugin processing for preop plugins
@@ -1466,7 +1465,9 @@ plugin_call_func (struct slapdplugin *list, int operation, Slapi_PBlock *pb, int
 					return_value = rc;
 					break;
 				} else if (SLAPI_PLUGIN_BEPREOPERATION == list->plg_type ||
-					SLAPI_PLUGIN_BEPOSTOPERATION == list->plg_type)
+					SLAPI_PLUGIN_BEPOSTOPERATION == list->plg_type ||
+					SLAPI_PLUGIN_BETXNPREOPERATION == list->plg_type ||
+					SLAPI_PLUGIN_BETXNPOSTOPERATION == list->plg_type)
 				{
 					/* respect fatal error (-1); should not OR it */
 					if (-1 == rc) {
-- 
1.8.1.4