Browse Source

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
Ludwig Krispenz 9 years ago
parent
commit
d1cb6995d0
1 changed files with 2 additions and 8 deletions
  1. 2 8
      ldap/servers/slapd/back-ldbm/ldbm_delete.c

+ 2 - 8
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 */