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

Ludovic Poitou
10.20.2016 6f0a3c2828ac7f11844ac54edeac3f6041c5d8dc
Fix for OPENDJ-3380. Reject adding a backend with an empty baseDN.
2 files modified
8 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/core/BackendConfigManager.java 5 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/messages/org/opends/messages/config.properties 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/BackendConfigManager.java
@@ -579,6 +579,11 @@
    BaseDnRegistry reg = DirectoryServer.copyBaseDnRegistry();
    for (DN baseDN : baseDNs)
    {
      if (baseDN.isRootDN())
      {
        unacceptableReason.add(ERR_CONFIG_BACKEND_BASE_IS_EMPTY.get(backendDN));
        return false;
      }
      try
      {
        reg.registerBaseDN(baseDN, backend, false);
opendj-server-legacy/src/messages/org/opends/messages/config.properties
@@ -862,4 +862,5 @@
WARN_CONFIG_SCHEMA_FILE_HAS_SCHEMA_WARNING_761=The config schema file '%s' generated warning when \
 trying to update schema with its content: %s
WARN_CONFIG_SCHEMA_FILE_HAS_SCHEMA_WARNING_WITH_OVERWRITE_762=The config schema file '%s' generated \
 warning when trying to update schema with its content, despite allowing to overwrite definitions: %s
 warning when trying to update schema with its content, despite allowing to overwrite definitions: %s
ERR_CONFIG_BACKEND_BASE_IS_EMPTY_763=Unable to configure the backend '%s' because one of its base DNs is the empty DN