From 9ba44d457cbe182a9b166bff57da0f51ff2cc75c Mon Sep 17 00:00:00 2001 From: Ludwig Krispenz Date: Fri, 21 Oct 2016 13:20:42 +0200 Subject: [PATCH 56/57] 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 (cherry picked from commit f5f24729388c309210c8741e0da39428b024e4a5) --- ldap/servers/slapd/back-ldbm/ldbm_delete.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c index f801e01..e3abb05 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c @@ -585,14 +585,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 */ -- 2.4.11