Author: omalley
Date: Fri Mar 4 03:43:02 2011
New Revision: 1077120
URL: http://svn.apache.org/viewvc?rev=1077120&view=rev
Log:
commit 8dd4b0642676c702e6c9250125d209d71a02c399
Author: Jitendra Nath Pandey <[email protected]>
Date: Fri Jan 22 17:17:08 2010 -0800
HADOOP-6495 from
https://issues.apache.org/jira/secure/attachment/12431145/HADOOP-6495-0_20.2.patch
+++ b/YAHOO-CHANGES.txt
+ HADOOP-6495. Identifier should be serialized after the password is
created
+ In Token constructor. (Jitendra Nath Pandey)
+
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/SecretManager.java
hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/Token.java
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/SecretManager.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/SecretManager.java?rev=1077120&r1=1077119&r2=1077120&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/SecretManager.java
(original)
+++
hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/SecretManager.java
Fri Mar 4 03:43:02 2011
@@ -45,10 +45,11 @@ public abstract class SecretManager<T ex
/**
* 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/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/Token.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/Token.java?rev=1077120&r1=1077119&r2=1077120&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/Token.java
(original)
+++
hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/token/Token.java
Fri Mar 4 03:43:02 2011
@@ -42,8 +42,8 @@ public class Token<T extends TokenIdenti
* @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();
}