From 3883cc7f23ea6476211c255c3d6b333ddd1f2a49 Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Mon, 17 Dec 2007 18:16:15 +0000
Subject: [PATCH] Issue 2767: Using entryDN attribute with userattr inheritance is broken. 

---
 opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/ParentInheritance.java |   24 ++++++------------------
 1 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/ParentInheritance.java b/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/ParentInheritance.java
index d8d61a5..294bc35 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/ParentInheritance.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/ParentInheritance.java
@@ -69,11 +69,6 @@
     private int numLevels;
 
     /*
-     * The attribute type parsed from the rule.
-     */
-    private AttributeType attributeType;
-
-    /*
      * The attribute type string parsed from the rule. Only used in
      * inheritance search.
      */
@@ -117,10 +112,6 @@
                     WARN_ACI_SYNTAX_INVALID_ATTRIBUTE_TYPE_NAME.get(pattern);
                 throw new AciException(message);
                }
-               if((this.attributeType =
-                    DirectoryServer.getAttributeType(pattern)) == null)
-                this.attributeType =
-                        DirectoryServer.getDefaultAttributeType(pattern);
                numLevels=1;
               levels[0]=0;
             }
@@ -161,10 +152,6 @@
                     WARN_ACI_SYNTAX_INVALID_ATTRIBUTE_TYPE_NAME.get(toks[1]);
                 throw new AciException(message);
             }
-            if((this.attributeType =
-                DirectoryServer.getAttributeType(toks[1])) == null)
-                this.attributeType =
-                    DirectoryServer.getDefaultAttributeType(toks[1]);
             attrTypeStr=toks[1];
             StringTokenizer tok=new StringTokenizer(toks[0],"],",false);
             while(tok.hasMoreTokens()) {
@@ -212,10 +199,6 @@
               throw new AciException(message);
             }
           }
-          if((this.attributeType =
-                  DirectoryServer.getAttributeType(attrTypeStr)) == null)
-            this.attributeType =
-                    DirectoryServer.getDefaultAttributeType(attrTypeStr);
           numLevels=1;
           levels[0]=0;
         }
@@ -244,7 +227,12 @@
      * @return The attribute type.
      */
     public AttributeType getAttributeType() {
-        return attributeType;
+      AttributeType attrType;
+      if((attrType =
+           DirectoryServer.getAttributeType(attrTypeStr.toLowerCase())) == null)
+        attrType=
+             DirectoryServer.getDefaultAttributeType(attrTypeStr.toLowerCase());
+      return attrType;
     }
 
     /**

--
Gitblit v1.10.0