From e59528243f3f148db4684925ddefa8b42f75c820 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Wed, 25 Feb 2009 16:23:12 +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 |    2 +-
 opends/src/server/org/opends/server/tools/LDAPConnection.java            |    2 +-
 2 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 3d24229..a9c64c8 100644
--- a/opends/src/server/org/opends/server/tools/LDAPAuthenticationHandler.java
+++ b/opends/src/server/org/opends/server/tools/LDAPAuthenticationHandler.java
@@ -283,7 +283,7 @@
          throws ClientException, LDAPException
   {
     // See if we need to prompt the user for the password.
-    if ( (bindPassword == null) || (bindPassword.length() == 0 ))
+    if (bindPassword == null)
     {
       if (bindDN == null)
       {
diff --git a/opends/src/server/org/opends/server/tools/LDAPConnection.java b/opends/src/server/org/opends/server/tools/LDAPConnection.java
index e8d39fe..4386ddf 100644
--- a/opends/src/server/org/opends/server/tools/LDAPConnection.java
+++ b/opends/src/server/org/opends/server/tools/LDAPConnection.java
@@ -304,7 +304,7 @@
       ByteString bindPW;
       if (bindPassword == null)
       {
-        bindPW =  ByteString.empty();
+        bindPW =  null;
       }
       else
       {

--
Gitblit v1.10.0