hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1362769 - in /hadoop/common/branches/branch-1: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
Date Wed, 18 Jul 2012 05:20:39 GMT
Author: eli
Date: Wed Jul 18 05:20:39 2012
New Revision: 1362769

URL: http://svn.apache.org/viewvc?rev=1362769&view=rev
Log:
Revert HDFS-3639. JspHelper#getUGI should always verify the token if security is enabled.

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1362769&r1=1362768&r2=1362769&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Wed Jul 18 05:20:39 2012
@@ -83,9 +83,6 @@ Release 1.2.0 - unreleased
 
     HADOOP-8587. HarFileSystem access of harMetaCache isn't threadsafe. (eli)
 
-    HDFS-3639. JspHelper#getUGI should always verify the token if
-    security is enabled. (eli)
-
     HADOOP-7836. TestSaslRPC#testDigestAuthMethodHostBasedToken fails
     with hostname localhost.localdomain. (daryn via eli)
  

Modified: hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java?rev=1362769&r1=1362768&r2=1362769&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
(original)
+++ hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
Wed Jul 18 05:20:39 2012
@@ -486,9 +486,14 @@ public class JspHelper {
         DataInputStream in = new DataInputStream(buf);
         DelegationTokenIdentifier id = new DelegationTokenIdentifier();
         id.readFields(in);
-        NameNode nn = (NameNode) context.getAttribute("name.node");
-        nn.getNamesystem().getDelegationTokenSecretManager()
-          .verifyToken(id, token.getPassword());
+        if (context != null) {
+          NameNode nn = (NameNode) context.getAttribute("name.node");
+          if (nn != null) {
+            //Verify the token.
+            nn.getNamesystem().getDelegationTokenSecretManager()
+                .verifyToken(id, token.getPassword());
+          }
+        }
         ugi = id.getUser();
         if (ugi.getRealUser() == null) {
           //non-proxy case



Mime
View raw message