hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077360 - in /hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode: ContentSummaryServlet.java JspHelper.java ListPathsServlet.java
Date Fri, 04 Mar 2011 04:07:04 GMT
Author: omalley
Date: Fri Mar  4 04:07:03 2011
New Revision: 1077360

URL: http://svn.apache.org/viewvc?rev=1077360&view=rev
Log:
commit 72b380e7218ab2da9b76b24d55ab459a357df7f8
Author: Jitendra Nath Pandey <jitendra@sufferhome-lm.(none)>
Date:   Tue Mar 23 13:00:49 2010 -0700

    HDFS-1039 from https://issues.apache.org/jira/secure/attachment/12439603/HDFS-1039-y20.2.1.patch
    
    +++ b/YAHOO-CHANGES.txt
    +    HDFS-1039. New patch on top of previous patch. Gets namenode address
    +    from conf. (jitendra)
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java
    hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
    hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ListPathsServlet.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java?rev=1077360&r1=1077359&r2=1077360&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java
Fri Mar  4 04:07:03 2011
@@ -41,7 +41,7 @@ public class ContentSummaryServlet exten
   public void doGet(final HttpServletRequest request,
       final HttpServletResponse response) throws ServletException, IOException {
     final Configuration conf = 
-      (Configuration) request.getAttribute("name.conf");
+      (Configuration) getServletContext().getAttribute("name.conf");
     final UserGroupInformation ugi = getUGI(request, conf);
     try {
       ugi.doAs(new PrivilegedExceptionAction<Object>() {

Modified: hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java?rev=1077360&r1=1077359&r2=1077360&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java
Fri Mar  4 04:07:03 2011
@@ -436,8 +436,12 @@ public class JspHelper {
         Token<DelegationTokenIdentifier> token = 
           new Token<DelegationTokenIdentifier>();
         token.decodeFromUrlString(tokenString);
-        token.setService(new Text(nameNodeAddr.getAddress().getHostAddress() + ":"
-            + nameNodeAddr.getPort()));
+        InetSocketAddress serviceAddr = NameNode.getAddress(conf);
+        LOG.info("Setting service in token: "
+            + new Text(serviceAddr.getAddress().getHostAddress() + ":"
+                + serviceAddr.getPort()));
+        token.setService(new Text(serviceAddr.getAddress().getHostAddress()
+            + ":" + serviceAddr.getPort()));
         if (user == null) {
           //this really doesn't break any security since we use the 
           //delegation token for authentication in

Modified: hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ListPathsServlet.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ListPathsServlet.java?rev=1077360&r1=1077359&r2=1077360&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ListPathsServlet.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ListPathsServlet.java
Fri Mar  4 04:07:03 2011
@@ -136,7 +136,7 @@ public class ListPathsServlet extends Df
       final Pattern filter = Pattern.compile(root.get("filter"));
       final Pattern exclude = Pattern.compile(root.get("exclude"));
       final Configuration conf = 
-        (Configuration) request.getAttribute("name.conf");
+        (Configuration) getServletContext().getAttribute("name.conf");
       
       ClientProtocol nnproxy = getUGI(request, conf).doAs
         (new PrivilegedExceptionAction<ClientProtocol>() {



Mime
View raw message