From e38f6f28245cc16aa183e923039dfaef931080c3 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Sun, 26 Jul 2009 22:25:18 +0000
Subject: [PATCH] dsreplication allowed an infinite number of password tries for the administrator. This is inconsistent with what is done elsewhere.
---
opendj-sdk/opends/src/server/org/opends/server/util/cli/ConsoleApplication.java | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/util/cli/ConsoleApplication.java b/opendj-sdk/opends/src/server/org/opends/server/util/cli/ConsoleApplication.java
index 1d149d9..901de32 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/util/cli/ConsoleApplication.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/util/cli/ConsoleApplication.java
@@ -1111,6 +1111,39 @@
}
/**
+ * Prompts the user to give the Global Administrator UID.
+ * @param defaultValue the default value that will be proposed in the prompt
+ * message.
+ * @param logger the Logger to be used to log the error message.
+ * @return the Global Administrator UID as provided by the user.
+ */
+ protected String askForAdministratorUID(String defaultValue,
+ Logger logger)
+ {
+ String s = defaultValue;
+ try
+ {
+ s = readInput(INFO_ADMINISTRATOR_UID_PROMPT.get(), defaultValue);
+ }
+ catch (CLIException ce)
+ {
+ logger.log(Level.WARNING, "Error reading input: "+ce, ce);
+ }
+ return s;
+ }
+
+ /**
+ * Prompts the user to give the Global Administrator password.
+ * @param logger the Logger to be used to log the error message.
+ * @return the Global Administrator password as provided by the user.
+ */
+ protected String askForAdministratorPwd(Logger logger)
+ {
+ String pwd = readPassword(INFO_ADMINISTRATOR_PWD_PROMPT.get(), logger);
+ return pwd;
+ }
+
+ /**
* The default period time used to write points in the output.
*/
protected static final long DEFAULT_PERIOD_TIME = 3000;
--
Gitblit v1.10.0