From 99fe23a6ad64503108e1097ef7eedb77c589a441 Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Wed, 01 Apr 2009 22:51:33 +0000
Subject: [PATCH] Move the password prompting out of the LDAPAuthenticationHandler class so a connection to the server isn't tied up while waiting for the user to enter a password. Issue 3828.

---
 opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java b/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
index 77e8b52..a133b14 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/LDAPCompare.java
@@ -758,7 +758,9 @@
     String bindDNValue = bindDN.getValue();
     String fileNameValue = filename.getValue();
     String bindPasswordValue = bindPassword.getValue();
-    if(bindPasswordValue != null && bindPasswordValue.equals("-"))
+    if(bindPasswordValue != null && bindPasswordValue.equals("-")  ||
+       (!bindPasswordFile.isPresent()  &&
+       (bindDNValue != null && bindPasswordValue == null)))
     {
       // read the password from the stdin.
       try

--
Gitblit v1.10.0