andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From 341b4661fb26fb34e9323732d1b8ab48eafd0411 Mon Sep 17 00:00:00 2001
dc8c34
From: Noriko Hosoi <nhosoi@redhat.com>
dc8c34
Date: Thu, 6 Mar 2014 13:26:06 -0800
dc8c34
Subject: [PATCH 173/225] Ticket #47731 - A tombstone entry is deleted by
dc8c34
 ldapdelete
dc8c34
dc8c34
Description: A tombstone deletion by ldapdelete op from client is
dc8c34
supposed to fail.  The failure from SLAPI_PLUGIN_BETXNPOSTOPERATION
dc8c34
was ignored in 389-ds-base-1.2.11 plugin_call_func and it was not
dc8c34
passed to the backend to abort.  This patch added the check in the
dc8c34
same way as in 389-ds-base-1.3.1 and newer.
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/47731
dc8c34
dc8c34
Reviewed by rmeggins@redhat.com (Thank you, Rich!)
dc8c34
(cherry picked from commit cca1fb5802009bea9ebbf27d4a2a6f878875c20c)
dc8c34
---
dc8c34
 ldap/servers/slapd/plugin.c | 7 ++++---
dc8c34
 1 file changed, 4 insertions(+), 3 deletions(-)
dc8c34
dc8c34
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
dc8c34
index 0a4f4e0..d21701b 100644
dc8c34
--- a/ldap/servers/slapd/plugin.c
dc8c34
+++ b/ldap/servers/slapd/plugin.c
dc8c34
@@ -1454,8 +1454,7 @@ plugin_call_func (struct slapdplugin *list, int operation, Slapi_PBlock *pb, int
dc8c34
 			{
dc8c34
 				if (SLAPI_PLUGIN_PREOPERATION == list->plg_type ||
dc8c34
 					SLAPI_PLUGIN_INTERNAL_PREOPERATION == list->plg_type ||
dc8c34
-					SLAPI_PLUGIN_BETXNPREOPERATION == list->plg_type ||
dc8c34
-                    SLAPI_PLUGIN_START_FN == operation )
dc8c34
+					SLAPI_PLUGIN_START_FN == operation )
dc8c34
 				{
dc8c34
 					/*
dc8c34
 					 * We bail out of plugin processing for preop plugins
dc8c34
@@ -1466,7 +1465,9 @@ plugin_call_func (struct slapdplugin *list, int operation, Slapi_PBlock *pb, int
dc8c34
 					return_value = rc;
dc8c34
 					break;
dc8c34
 				} else if (SLAPI_PLUGIN_BEPREOPERATION == list->plg_type ||
dc8c34
-					SLAPI_PLUGIN_BEPOSTOPERATION == list->plg_type)
dc8c34
+					SLAPI_PLUGIN_BEPOSTOPERATION == list->plg_type ||
dc8c34
+					SLAPI_PLUGIN_BETXNPREOPERATION == list->plg_type ||
dc8c34
+					SLAPI_PLUGIN_BETXNPOSTOPERATION == list->plg_type)
dc8c34
 				{
dc8c34
 					/* respect fatal error (-1); should not OR it */
dc8c34
 					if (-1 == rc) {
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34