You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2013/02/13 09:41:50 UTC
svn commit: r1445503 -
/directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
Author: elecharny
Date: Wed Feb 13 08:41:49 2013
New Revision: 1445503
URL: http://svn.apache.org/r1445503
Log:
o Removed a useless entry modification
o Added some comments
Modified:
directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
Modified: directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java?rev=1445503&r1=1445502&r2=1445503&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java (original)
+++ directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java Wed Feb 13 08:41:49 2013
@@ -140,6 +140,7 @@ public class KeyDerivationInterceptor ex
{
LOG.debug( "Adding the entry '{}' for Dn '{}'.", entry, normName.getName() );
+ // Get the entry's password. We will use the first one.
BinaryValue userPassword = ( BinaryValue ) entry.get( USER_PASSWORD_AT ).get();
String strUserPassword = userPassword.getString();
@@ -159,7 +160,7 @@ public class KeyDerivationInterceptor ex
Map<EncryptionType, EncryptionKey> keys = generateKeys( principalName, strUserPassword );
- entry.put( KRB5_PRINCIPAL_NAME_AT, principalName );
+ // Set the KVNO to 0 as it's a new entry
entry.put( KRB5_KEY_VERSION_NUMBER_AT, "0" );
Attribute keyAttribute = getKeyAttribute( keys );
@@ -341,6 +342,8 @@ public class KeyDerivationInterceptor ex
Attribute keyVersionNumberAttr = ( ( ClonedServerEntry ) userEntry ).getOriginalEntry().get(
KRB5_KEY_VERSION_NUMBER_AT );
+ // Set the KVNO to 0 if it's a password creation,
+ // otherwise increment it.
if ( keyVersionNumberAttr == null )
{
subContext.setNewKeyVersionNumber( 0 );