directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1041323 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
Date Thu, 02 Dec 2010 10:26:23 GMT
Author: kayyagari
Date: Thu Dec  2 10:26:23 2010
New Revision: 1041323

URL: http://svn.apache.org/viewvc?rev=1041323&view=rev
Log:
o replaced KerberosPrincipal with PrincipalName

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java?rev=1041323&r1=1041322&r2=1041323&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
Thu Dec  2 10:26:23 2010
@@ -23,18 +23,17 @@ package org.apache.directory.server.kerb
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.security.auth.kerberos.KerberosPrincipal;
-
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.protocol.shared.store.DirectoryServiceOperation;
+import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
+import org.apache.directory.shared.ldap.entry.DefaultModification;
+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.ModificationOperation;
-import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -50,7 +49,7 @@ public class ChangePassword implements D
     private static final long serialVersionUID = -7147685183641418353L;
 
     /** The Kerberos principal who's password is to be changed. */
-    protected KerberosPrincipal principal;
+    protected PrincipalName principal;
     /** The new password for the update. */
     protected String newPassword;
 
@@ -61,7 +60,7 @@ public class ChangePassword implements D
      * @param principal The principal to change the password for.
      * @param newPassword The password to change.
      */
-    public ChangePassword( KerberosPrincipal principal, String newPassword )
+    public ChangePassword( PrincipalName principal, String newPassword )
     {
         this.principal = principal;
         this.newPassword = newPassword;
@@ -84,12 +83,12 @@ public class ChangePassword implements D
         mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, newPasswordAttribute
) );
         
         EntryAttribute principalAttribute = new DefaultEntryAttribute( 
-            schemaManager.lookupAttributeTypeRegistry( KerberosAttribute.KRB5_PRINCIPAL_NAME_AT
), principal.getName() );
+            schemaManager.lookupAttributeTypeRegistry( KerberosAttribute.KRB5_PRINCIPAL_NAME_AT
), principal.getNameString() );
         mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, principalAttribute
) );
         
         //FIXME check if keyderivation is necessary
         
-        Entry entry = StoreUtils.findPrincipalEntry( session, searchBaseDn, principal.getName()
);
+        Entry entry = StoreUtils.findPrincipalEntry( session, searchBaseDn, principal.getNameString()
);
         session.modify( entry.getDn(), mods );
 
         return entry.getDn().toString();



Mime
View raw message