From 9d16ab0d0d1795c3ccc2a5fed46faf18602f087c Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Sat, 26 Feb 2011 17:33:27 +0000
Subject: [PATCH] Fix for defect OPENDJ-83 :ECL: changeInitiatorsName and potentially changeTime are wrong for delete operations. There is no ModifiersName in Delete changes. Use AuthorizationDN directly.

---
 opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index 27d3451..62ffbf6 100644
--- a/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -5089,17 +5089,12 @@
       }
       ((DeleteMsg)msg).setEclIncludes(newattrs);
 
-      // For delete only, add the modifiersName since they are required in the
-      // ECL entry but are not part of other parts of the message
-      AttributeType atype = DirectoryServer.getAttributeType("modifiersname");
-      List<Attribute> attrs = entry.getAttribute(atype);
-      if (attrs != null)
+      // For delete only, add the Authorized DN since it's required in the
+      // ECL entry but is not part of rest of the message.
+      DN deleterDN = delOp.getAuthorizationDN();
+      if (deleterDN != null)
       {
-        for (Attribute a : attrs)
-        {
-          ((DeleteMsg)msg).setInitiatorsName(a.iterator().next().toString());
-          break;
-        }
+        ((DeleteMsg)msg).setInitiatorsName(deleterDN.toString());
       }
 
     }

--
Gitblit v1.10.0