hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bor...@apache.org
Subject svn commit: r901924 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/security/token/SecretManager.java src/java/org/apache/hadoop/security/token/Token.java
Date Thu, 21 Jan 2010 23:36:13 GMT
Author: boryas
Date: Thu Jan 21 23:36:13 2010
New Revision: 901924

URL: http://svn.apache.org/viewvc?rev=901924&view=rev
Log:
HADOOP-6495.  Identifier should be serialized after the password is
  created In Token constructor (jnp via boryas)  

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/security/token/SecretManager.java
    hadoop/common/trunk/src/java/org/apache/hadoop/security/token/Token.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=901924&r1=901923&r2=901924&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Thu Jan 21 23:36:13 2010
@@ -108,6 +108,9 @@
     that Avro can read FileSystem data.
     (Aaron Kimball via cutting)
 
+    HADOOP-6495.  Identifier should be serialized after the password is
+     created In Token constructor (jnp via boryas)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/token/SecretManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/token/SecretManager.java?rev=901924&r1=901923&r2=901924&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/token/SecretManager.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/token/SecretManager.java Thu Jan
21 23:36:13 2010
@@ -45,10 +45,11 @@
   
   /**
    * Create the password for the given identifier.
+   * identifier may be modified inside this method.
    * @param identifier the identifier to use
    * @return the new password
    */
-  public abstract byte[] createPassword(T identifier);
+  protected abstract byte[] createPassword(T identifier);
   
   /**
    * Retrieve the password for the given token identifier. Should check the date

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/token/Token.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/token/Token.java?rev=901924&r1=901923&r2=901924&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/token/Token.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/token/Token.java Thu Jan 21 23:36:13
2010
@@ -42,8 +42,8 @@
    * @param mgr the secret manager
    */
   public Token(T id, SecretManager<T> mgr) {
-    identifier = id.getBytes();
     password = mgr.createPassword(id);
+    identifier = id.getBytes();
     kind = id.getKind();
     service = new Text();
   }



Mime
View raw message