directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fel...@apache.org>
Subject Re: svn commit: r951513 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Date Fri, 04 Jun 2010 18:15:02 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can please some cross check this? It doesn't has a testcase to verify it.

Thanks
Felix


On 06/04/10 20:07, felixk@apache.org wrote:
> 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 + "'.  "
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwJQqYACgkQ2lZVCB08qHFwcwCgt857kk5bHlU2kpKLL1e+BhFC
R9wAniBVfsmAhLTbgoVGB/vktEC5Mxjq
=XZBU
-----END PGP SIGNATURE-----

Mime
View raw message