From ba2858890becc2ec90e48ca74fbefb6c1ad1cb6a Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Wed, 25 Feb 2009 10:07:40 +0000
Subject: [PATCH] Fix for issue #3826 (ldapsearch doesn't prompt bind password when the option -w is not provided) The behavior modification was introduced in rev #4956 in the following method: org.opends.server.tools.LDAPConnection.connectToHost()

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

diff --git a/opends/src/server/org/opends/server/tools/LDAPAuthenticationHandler.java b/opends/src/server/org/opends/server/tools/LDAPAuthenticationHandler.java
index 1dabcd2..3d24229 100644
--- a/opends/src/server/org/opends/server/tools/LDAPAuthenticationHandler.java
+++ b/opends/src/server/org/opends/server/tools/LDAPAuthenticationHandler.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2008 Sun Microsystems, Inc.
+ *      Copyright 2006-2009 Sun Microsystems, Inc.
  */
 package org.opends.server.tools;
 import org.opends.messages.Message;
@@ -283,7 +283,7 @@
          throws ClientException, LDAPException
   {
     // See if we need to prompt the user for the password.
-    if (bindPassword == null)
+    if ( (bindPassword == null) || (bindPassword.length() == 0 ))
     {
       if (bindDN == null)
       {

--
Gitblit v1.10.0