directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r951513 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Date Fri, 04 Jun 2010 18:07:07 GMT
Author: felixk
Date: Fri Jun  4 18:07:07 2010
New Revision: 951513

URL: http://svn.apache.org/viewvc?rev=951513&view=rev
Log:
I don't believe that this ever has work that way

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=951513&r1=951512&r2=951513&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Fri Jun  4 18:07:07 2010
@@ -82,6 +82,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.exception.LdapOperationException;
@@ -1343,17 +1344,9 @@ public class DefaultDirectoryService imp
         adminDn.normalize( schemaManager.getNormalizerMapping() );
         
         Entry adminEntry = partitionNexus.lookup( new LookupOperationContext( adminSession,
adminDn ) );
-        Object userPassword = adminEntry.get( SchemaConstants.USER_PASSWORD_AT ).get();
+        Value<?> userPassword = adminEntry.get( SchemaConstants.USER_PASSWORD_AT ).get();
+        needToChangeAdminPassword = Arrays.equals( PartitionNexus.ADMIN_PASSWORD_BYTES, userPassword.getBytes()
);
         
-        if ( userPassword instanceof byte[] )
-        {
-            needToChangeAdminPassword = Arrays.equals( PartitionNexus.ADMIN_PASSWORD_BYTES,
( byte[] ) userPassword );
-        }
-        else if ( userPassword.toString().equals( PartitionNexus.ADMIN_PASSWORD_STRING )
)
-        {
-            needToChangeAdminPassword = PartitionNexus.ADMIN_PASSWORD_STRING.equals( userPassword.toString()
);
-        }
-
         if ( needToChangeAdminPassword )
         {
             LOG.warn( "You didn't change the admin password of directory service " + "instance
'" + instanceId + "'.  "



Mime
View raw message