mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Ludovic Poitou
29.08.2016 94ab608bf26d8ef5fb477e6b7de0be679cfb90a1
Fix for OPENDJ-2976: Allow access log filtering for rootDSE searches.
The rootDSE has the empty string for DN. However representing an empty string in dsconfig is troublesome.
The fix is to treat the string "" as a special case representing the rootDSE.
2 files modified
14 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternDN.java 4 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/authorization/dseecompat/TargetTestCase.java 10 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternDN.java
@@ -279,7 +279,9 @@
    }
    int length = dnString.length();
    if (length == 0)
    if (length == 0
        // Special pattern "" to express rootDSE aka empty DN
        || "\"\"".equals(dnString))
    {
      return new PatternDN();
    }
opendj-server-legacy/src/test/java/org/opends/server/authorization/dseecompat/TargetTestCase.java
@@ -86,11 +86,14 @@
              "uid=bjensen"
         },
         {
              "uid=dmiller, **, ou=branch level two, **, ou=aci branches, " +
                   "dc=example,dc=com",
              "uid=dmiller, **, ou=branch level two, **, ou=aci branches, dc=example,dc=com",
              "uid=dmiller, ou=branch level three, ou=branch level two, " +
                   "ou=branch level one, ou=aci branches, dc=example,dc=com"
         },
         {
              "\"\"",
              ""
         }
    };
  }
@@ -124,8 +127,7 @@
              "sn=jensen+uid=bjensen,ou=people,dc=example,dc=com"
         },
         {
              "uid=dmiller, **, ou=Bad branch level, **, ou=aci branches, " +
                   "dc=example,dc=com",
              "uid=dmiller, **, ou=Bad branch level, **, ou=aci branches, dc=example,dc=com",
              "uid=dmiller, ou=branch level three, ou=branch level two, " +
                   "ou=branch level one, ou=aci branches, dc=example,dc=com"
         },