From da859b6c1afd272a3904197068de4950cde8325d Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 04 May 2007 00:55:16 +0000
Subject: [PATCH] Update the default access logger to provide additional more information in some cases:
---
opends/src/server/org/opends/server/core/CompareOperation.java | 59 ++++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 46 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/CompareOperation.java b/opends/src/server/org/opends/server/core/CompareOperation.java
index 7ec40cf..8997a4a 100644
--- a/opends/src/server/org/opends/server/core/CompareOperation.java
+++ b/opends/src/server/org/opends/server/core/CompareOperation.java
@@ -88,9 +88,6 @@
implements PreParseCompareOperation, PreOperationCompareOperation,
PostOperationCompareOperation, PostResponseCompareOperation
{
-
-
-
// The attribute type for this compare operation.
private AttributeType attributeType;
@@ -106,6 +103,9 @@
// The DN of the entry for the compare operation.
private DN entryDN;
+ // The proxied authorization target DN for this operation.
+ private DN proxiedAuthorizationDN;
+
// The entry to be compared.
private Entry entry;
@@ -150,11 +150,12 @@
this.rawAttributeType = rawAttributeType;
this.assertionValue = assertionValue;
- responseControls = new ArrayList<Control>();
- entry = null;
- entryDN = null;
- attributeType = null;
- cancelRequest = null;
+ responseControls = new ArrayList<Control>();
+ entry = null;
+ entryDN = null;
+ attributeType = null;
+ cancelRequest = null;
+ proxiedAuthorizationDN = null;
}
@@ -184,11 +185,12 @@
this.attributeType = attributeType;
this.assertionValue = assertionValue;
- responseControls = new ArrayList<Control>();
- rawEntryDN = new ASN1OctetString(entryDN.toString());
- rawAttributeType = attributeType.getNameOrOID();
- cancelRequest = null;
- entry = null;
+ responseControls = new ArrayList<Control>();
+ rawEntryDN = new ASN1OctetString(entryDN.toString());
+ rawAttributeType = attributeType.getNameOrOID();
+ cancelRequest = null;
+ entry = null;
+ proxiedAuthorizationDN = null;
}
@@ -473,6 +475,21 @@
/**
+ * Retrieves the proxied authorization DN for this operation if proxied
+ * authorization has been requested.
+ *
+ * @return The proxied authorization DN for this operation if proxied
+ * authorization has been requested, or {@code null} if proxied
+ * authorization has not been requested.
+ */
+ public DN getProxiedAuthorizationDN()
+ {
+ return proxiedAuthorizationDN;
+ }
+
+
+
+ /**
* {@inheritDoc}
*/
@Override()
@@ -837,6 +854,14 @@
break compareProcessing;
}
setAuthorizationEntry(authorizationEntry);
+ if (authorizationEntry == null)
+ {
+ proxiedAuthorizationDN = DN.nullDN();
+ }
+ else
+ {
+ proxiedAuthorizationDN = authorizationEntry.getDN();
+ }
}
else if (oid.equals(OID_PROXIED_AUTH_V2))
{
@@ -907,6 +932,14 @@
break compareProcessing;
}
setAuthorizationEntry(authorizationEntry);
+ if (authorizationEntry == null)
+ {
+ proxiedAuthorizationDN = DN.nullDN();
+ }
+ else
+ {
+ proxiedAuthorizationDN = authorizationEntry.getDN();
+ }
}
// NYI -- Add support for additional controls.
--
Gitblit v1.10.0