|
|
4aa5b2 |
From 9ba44d457cbe182a9b166bff57da0f51ff2cc75c Mon Sep 17 00:00:00 2001
|
|
|
4aa5b2 |
From: Ludwig Krispenz <lkrispen@redhat.com>
|
|
|
4aa5b2 |
Date: Fri, 21 Oct 2016 13:20:42 +0200
|
|
|
4aa5b2 |
Subject: [PATCH 56/57] Ticket 48133 v2 Non tombstone entry which dn starting
|
|
|
4aa5b2 |
with "nsuniqueid=...," cannot be delete
|
|
|
4aa5b2 |
|
|
|
4aa5b2 |
Bug Description: trying to delete a non tombstone entry fails when the generated tombstone is
|
|
|
4aa5b2 |
added to the cache
|
|
|
4aa5b2 |
|
|
|
4aa5b2 |
Fix Description: create a tombstone dn without exceptions
|
|
|
4aa5b2 |
this is an addition to the original fix for this ticket
|
|
|
4aa5b2 |
|
|
|
4aa5b2 |
https://fedorahosted.org/389/ticket/48133
|
|
|
4aa5b2 |
|
|
|
4aa5b2 |
Reviewed by: Noriko, Mark - thanks
|
|
|
4aa5b2 |
|
|
|
4aa5b2 |
(cherry picked from commit f5f24729388c309210c8741e0da39428b024e4a5)
|
|
|
4aa5b2 |
---
|
|
|
4aa5b2 |
ldap/servers/slapd/back-ldbm/ldbm_delete.c | 10 ++--------
|
|
|
4aa5b2 |
1 file changed, 2 insertions(+), 8 deletions(-)
|
|
|
4aa5b2 |
|
|
|
4aa5b2 |
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
|
|
|
4aa5b2 |
index f801e01..e3abb05 100644
|
|
|
4aa5b2 |
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
|
|
|
4aa5b2 |
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
|
|
|
4aa5b2 |
@@ -585,14 +585,8 @@ ldbm_back_delete( Slapi_PBlock *pb )
|
|
|
4aa5b2 |
retval = -1;
|
|
|
4aa5b2 |
goto error_return;
|
|
|
4aa5b2 |
}
|
|
|
4aa5b2 |
- if ((0 == PL_strncmp(edn + sizeof(SLAPI_ATTR_UNIQUEID), childuniqueid, strlen(childuniqueid))) &&
|
|
|
4aa5b2 |
- (*(edn + SLAPI_ATTR_UNIQUEID_LENGTH + slapi_uniqueIDSize() + 1/*=*/) == ',')) {
|
|
|
4aa5b2 |
- /* The DN already starts with "nsuniqueid=...," */
|
|
|
4aa5b2 |
- tombstone_dn = slapi_ch_strdup(edn);
|
|
|
4aa5b2 |
- } else {
|
|
|
4aa5b2 |
- tombstone_dn = compute_entry_tombstone_dn(edn, childuniqueid);
|
|
|
4aa5b2 |
- }
|
|
|
4aa5b2 |
-
|
|
|
4aa5b2 |
+ /* always create the special tombstone dn, even if it already starts with nsuniqueid */
|
|
|
4aa5b2 |
+ tombstone_dn = compute_entry_tombstone_dn(edn, childuniqueid);
|
|
|
4aa5b2 |
slapi_sdn_set_ndn_byval(&nscpEntrySDN, slapi_sdn_get_ndn(slapi_entry_get_sdn(e->ep_entry)));
|
|
|
4aa5b2 |
|
|
|
4aa5b2 |
/* Copy the entry unique_id for URP conflict checking */
|
|
|
4aa5b2 |
--
|
|
|
4aa5b2 |
2.4.11
|
|
|
4aa5b2 |
|