From a99670d33c4721f8fe9bc3903a75ca2b04a77dbf Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Wed, 06 Feb 2008 12:40:31 +0000
Subject: [PATCH] Add check for null attribute list. Issue 1459.

---
 opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java b/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
index e5d75ca..c8f6f93 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
@@ -343,21 +343,23 @@
                  * Check if we have rights to delete all values of
                  * an attribute type in the resource entry.
                  */
-                if(resourceEntry.hasAttribute(modAttrType)) {
-                  container.setCurrentAttributeType(modAttrType);
-                  List<Attribute> attrList =
+              if(resourceEntry.hasAttribute(modAttrType)) {
+                container.setCurrentAttributeType(modAttrType);
+                List<Attribute> attrList =
                    resourceEntry.getAttribute(modAttrType,modAttr.getOptions());
+                if(attrList != null) {
                   for (Attribute a : attrList) {
                     for (AttributeValue v : a.getValues()) {
                       container.setCurrentAttributeValue(v);
                       container.setRights(ACI_WRITE_DELETE);
                       if(!skipAccessCheck &&
-                           !accessAllowed(container))
+                              !accessAllowed(container))
                         return false;
                     }
                   }
                 }
-             }
+              }
+            }
 
             if(modAttr.hasValue()) {
                for(AttributeValue v : modAttr.getValues()) {

--
Gitblit v1.10.0