hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1360487 - in /hadoop/common/branches/branch-1: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
Date Thu, 12 Jul 2012 00:15:14 GMT
Author: eli
Date: Thu Jul 12 00:15:14 2012
New Revision: 1360487

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

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=1360487&r1=1360486&r2=1360487&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Thu Jul 12 00:15:14 2012
@@ -79,6 +79,9 @@ Release 1.2.0 - unreleased
     HADOOP-8355. SPNEGO filter throws/logs exception when authentication fails (tucu)
 
     HADOOP-8587. HarFileSystem access of harMetaCache isn't threadsafe. (eli)
+
+    HDFS-3639. JspHelper#getUGI should always verify the token if
+    security is enabled. (eli)
  
 Release 1.1.0 - unreleased
 

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=1360487&r1=1360486&r2=1360487&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
Thu Jul 12 00:15:14 2012
@@ -486,14 +486,9 @@ public class JspHelper {
         DataInputStream in = new DataInputStream(buf);
         DelegationTokenIdentifier id = new DelegationTokenIdentifier();
         id.readFields(in);
-        if (context != null) {
-          NameNode nn = (NameNode) context.getAttribute("name.node");
-          if (nn != null) {
-            //Verify the token.
-            nn.getNamesystem().getDelegationTokenSecretManager()
-                .verifyToken(id, token.getPassword());
-          }
-        }
+        NameNode nn = (NameNode) context.getAttribute("name.node");
+        nn.getNamesystem().getDelegationTokenSecretManager()
+          .verifyToken(id, token.getPassword());
         ugi = id.getUser();
         if (ugi.getRealUser() == null) {
           //non-proxy case



Mime
View raw message