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