|
|
7c7f29 |
From 4c154182cd680f458b016abf60760328d0979b63 Mon Sep 17 00:00:00 2001
|
|
|
7c7f29 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
7c7f29 |
Date: Wed, 13 Jul 2016 15:51:56 -0400
|
|
|
7c7f29 |
Subject: [PATCH 08/15] Ticket 48924 - Fixup tombstone task needs to set proper
|
|
|
7c7f29 |
flag when updating tombstones
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Bug Description: The fixup tombstone task is not updating tombstones due to
|
|
|
7c7f29 |
TOMBSTONE_INCLUDE not being set when looking up the entry to
|
|
|
7c7f29 |
modify.
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Fix Description: If fixing up tombstones called find_entry2modify_only_ext with
|
|
|
7c7f29 |
the TOMBSTONE_INCLUDED flag.
|
|
|
7c7f29 |
|
|
|
7c7f29 |
https://fedorahosted.org/389/ticket/48924
|
|
|
7c7f29 |
|
|
|
7c7f29 |
Reviewed by: nhosoi(Thanks!)
|
|
|
7c7f29 |
|
|
|
7c7f29 |
(cherry picked from commit 8cfb650170bbb4f6ce328b827dc294437ee38c4b)
|
|
|
7c7f29 |
---
|
|
|
7c7f29 |
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 18 ++++++++++++++----
|
|
|
7c7f29 |
1 file changed, 14 insertions(+), 4 deletions(-)
|
|
|
7c7f29 |
|
|
|
7c7f29 |
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
|
|
|
7c7f29 |
index 37225cd..9b3062c 100644
|
|
|
7c7f29 |
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
|
|
|
7c7f29 |
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
|
|
|
7c7f29 |
@@ -465,9 +465,14 @@ ldbm_back_modify( Slapi_PBlock *pb )
|
|
|
7c7f29 |
*/
|
|
|
7c7f29 |
if ( MANAGE_ENTRY_BEFORE_DBLOCK(li)) {
|
|
|
7c7f29 |
/* find and lock the entry we are about to modify */
|
|
|
7c7f29 |
- if ( (e = find_entry2modify( pb, be, addr, &txn )) == NULL ) {
|
|
|
7c7f29 |
+ if (fixup_tombstone) {
|
|
|
7c7f29 |
+ e = find_entry2modify_only_ext( pb, be, addr, TOMBSTONE_INCLUDED, &txn );
|
|
|
7c7f29 |
+ } else {
|
|
|
7c7f29 |
+ e = find_entry2modify( pb, be, addr, &txn );
|
|
|
7c7f29 |
+ }
|
|
|
7c7f29 |
+ if (e == NULL) {
|
|
|
7c7f29 |
ldap_result_code= -1;
|
|
|
7c7f29 |
- goto error_return; /* error result sent by find_entry2modify() */
|
|
|
7c7f29 |
+ goto error_return; /* error result sent by find_entry2modify() */
|
|
|
7c7f29 |
}
|
|
|
7c7f29 |
}
|
|
|
7c7f29 |
|
|
|
7c7f29 |
@@ -545,9 +550,14 @@ ldbm_back_modify( Slapi_PBlock *pb )
|
|
|
7c7f29 |
if (0 == retry_count) { /* just once */
|
|
|
7c7f29 |
if ( !MANAGE_ENTRY_BEFORE_DBLOCK(li)) {
|
|
|
7c7f29 |
/* find and lock the entry we are about to modify */
|
|
|
7c7f29 |
- if ( (e = find_entry2modify( pb, be, addr, &txn )) == NULL ) {
|
|
|
7c7f29 |
+ if (fixup_tombstone) {
|
|
|
7c7f29 |
+ e = find_entry2modify_only_ext( pb, be, addr, TOMBSTONE_INCLUDED, &txn );
|
|
|
7c7f29 |
+ } else {
|
|
|
7c7f29 |
+ e = find_entry2modify( pb, be, addr, &txn );
|
|
|
7c7f29 |
+ }
|
|
|
7c7f29 |
+ if (e == NULL) {
|
|
|
7c7f29 |
ldap_result_code= -1;
|
|
|
7c7f29 |
- goto error_return; /* error result sent by find_entry2modify() */
|
|
|
7c7f29 |
+ goto error_return; /* error result sent by find_entry2modify() */
|
|
|
7c7f29 |
}
|
|
|
7c7f29 |
}
|
|
|
7c7f29 |
|
|
|
7c7f29 |
--
|
|
|
7c7f29 |
2.4.11
|
|
|
7c7f29 |
|