static bool replmd_should_apply_isDeleted(struct replmd_replicated_request *ar,
					  struct ldb_message *msg)
{
	struct ldb_dn *deleted_objects_dn;
	int ret;

	if (!ar->isDeleted) {

		/* not a deleted object, so don't set isDeleted */
		return false;
	}

	ret = dsdb_get_deleted_objects_dn(ldb_module_get_ctx(ar->module),
					  msg, msg->dn,
					  &deleted_objects_dn);

	/*
	 * if the Deleted Object container lookup failed, then just apply
	 * isDeleted (note that it doesn't exist for the Schema partition)
	 */
	if (ret != LDB_SUCCESS) {
		return true;
	}

	/*
	 * the Deleted Objects container has isDeleted set but is not entirely
	 * a deleted object, so DON'T re-apply isDeleted to it
	 */
	if (ldb_dn_compare(msg->dn, deleted_objects_dn) == 0) {
		return false;
	}

	return true;
}
static bool replmd_should_apply_isDeleted(struct replmd_replicated_request *ar,
					  struct ldb_message *msg)
{
	struct ldb_dn *deleted_objects_dn;
	int ret;

	if (!ar->isDeleted) {

		 
		return false;
	}

	ret = dsdb_get_deleted_objects_dn(ldb_module_get_ctx(ar->module),
					  msg, msg->dn,
					  &deleted_objects_dn);

	 
	if (ret != LDB_SUCCESS) {
		return true;
	}

	 
	if (ldb_dn_compare(msg->dn, deleted_objects_dn) == 0) {
		return false;
	}

	return true;
}