From df8d2595f230a4a3c3e81d8695c76c7e362c0803 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.

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

diff --git a/opends/src/server/org/opends/server/tools/LDAPCompare.java b/opends/src/server/org/opends/server/tools/LDAPCompare.java
index 77e8b52..a133b14 100644
--- a/opends/src/server/org/opends/server/tools/LDAPCompare.java
+++ b/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