Ver código fonte

Trac Ticket #494 - slapd entered to infinite loop during new index addition

https://fedorahosted.org/389/ticket/494

Bug Description: An entry which rdn is nsuniqueid=...,nsuniqueid=...
was accidentally generated.  It broke the entryrdn tree and put
the reindex and export into the the infinite loop.

Fix Description: Added an missing check if the retrieved entry is
already an tombstone or not.  This tombstone is the one converted
by the entryusn plugin.  Please note that replication has an urp
code which handles such conflicts.
(cherry-picked from commit b963576d2758d29e8d21297e8f763d0373895b9f)
Noriko Hosoi 13 anos atrás
pai
commit
31d15788d4
1 arquivos alterados com 7 adições e 0 exclusões
  1. 7 0
      ldap/servers/slapd/back-ldbm/ldbm_delete.c

+ 7 - 0
ldap/servers/slapd/back-ldbm/ldbm_delete.c

@@ -290,6 +290,13 @@ ldbm_back_delete( Slapi_PBlock *pb )
 			create_tombstone_entry = (create_tombstone_entry < 0) ? 0 : 1;
 		}
 	}
+	if (create_tombstone_entry && is_tombstone_entry) {
+		slapi_log_error(SLAPI_LOG_FATAL, "ldbm_back_delete",
+			"Attempt to convert a tombstone entry %s to tombstone\n", dn);
+		retval = -1;
+		ldap_result_code = LDAP_UNWILLING_TO_PERFORM;
+		goto error_return;
+	}
 
 #if DEBUG
 	slapi_log_error(SLAPI_LOG_REPL, "ldbm_back_delete",