From dbb7c5fc9626729cfd499fd917ef41105b3a2fe9 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 24 Jan 2008 17:41:54 +0000
Subject: [PATCH] Fix for issue Issue 2867 Answering ' ' (a space) for directory manager to the setup menu leads to corrupted config
---
opendj-sdk/opends/src/messages/messages/tools.properties | 4 +++-
opendj-sdk/opends/src/server/org/opends/server/tools/InstallDS.java | 12 +++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/opendj-sdk/opends/src/messages/messages/tools.properties b/opendj-sdk/opends/src/messages/messages/tools.properties
index 91aaf33..aa170fd 100644
--- a/opendj-sdk/opends/src/messages/messages/tools.properties
+++ b/opendj-sdk/opends/src/messages/messages/tools.properties
@@ -2005,7 +2005,7 @@
INFO_CREATERC_JAVA_ARGS_DESCRIPTION_1377=A set of arguments that should be \
passed to the JVM when running the server
SEVERE_ERR_CREATERC_JAVA_HOME_DOESNT_EXIST_1378=The directory %s specified \
- as the JAVA_HOME path does not exist or is not a directory
+ as the OPENDS_JAVA_HOME path does not exist or is not a directory
INFO_INSTALLDS_STATUS_COMMAND_LINE_1379=To see basic server configuration \
status and configuration you can launch %s
INFO_INSTALLDS_PROMPT_ENABLE_SSL_1380=Do you want to enable SSL?
@@ -2222,3 +2222,5 @@
must be run in offline or online mode, returning the appropriate error code
SEVERE_ERR_BACKUPDB_REPEATED_BACKEND_ID_1497=The backend ID '%s' has been \
specified several times
+MILD_ERR_INSTALLDS_EMPTY_DN_RESPONSE_1498=ERROR: The empty LDAP DN is not \
+ a valid value
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/InstallDS.java b/opendj-sdk/opends/src/server/org/opends/server/tools/InstallDS.java
index 2a58a4e..74b7ef0 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/InstallDS.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/InstallDS.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2008 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
@@ -581,6 +581,10 @@
try
{
DN.decode(dmDN);
+ if (dmDN.trim().isEmpty())
+ {
+ errorMessages.add(ERR_INSTALLDS_EMPTY_DN_RESPONSE.get());
+ }
}
catch (Exception e)
{
@@ -912,6 +916,7 @@
else
{
dns.addAll(arg.getValues());
+ usedProvided = true;
}
LinkedList<String> toRemove = new LinkedList<String>();
for (String dn : dns)
@@ -919,6 +924,11 @@
try
{
DN.decode(dn);
+ if (dn.trim().isEmpty())
+ {
+ toRemove.add(dn);
+ println(ERR_INSTALLDS_EMPTY_DN_RESPONSE.get());
+ }
}
catch (Exception e)
{
--
Gitblit v1.10.0