hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077346 - in /hadoop/common/branches/branch-0.20-security-patches/src: test/org/apache/hadoop/mapred/TestWebUIAuthorization.java webapps/job/jobconf_history.jsp
Date Fri, 04 Mar 2011 04:05:47 GMT
Author: omalley
Date: Fri Mar  4 04:05:47 2011
New Revision: 1077346

URL: http://svn.apache.org/viewvc?rev=1077346&view=rev
Log:
commit 6dde36341fa7aa184138e921df2e0c441082cc31
Author: Vinod Kumar <vinodkv@yahoo-inc.com>
Date:   Sat Mar 20 00:01:23 2010 +0530

    MAPREDUCE-1612 from https://issues.apache.org/jira/secure/attachment/12439310/jobconf_history_jsp.fix.20S.patch
    
    +++ b/YAHOO-CHANGES.txt
    +    MAPREDUCE-1612. job conf file is not accessible from job history
    +    web page. (Ravi Gummadi via vinodkv)
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestWebUIAuthorization.java
    hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/jobconf_history.jsp

Modified: hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestWebUIAuthorization.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestWebUIAuthorization.java?rev=1077346&r1=1077345&r2=1077346&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestWebUIAuthorization.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/test/org/apache/hadoop/mapred/TestWebUIAuthorization.java
Fri Mar  4 04:05:47 2011
@@ -262,6 +262,10 @@ public class TestWebUIAuthorization exte
         String.valueOf(true));
     props.setProperty("dfs.permissions", "false");
 
+    // Let us have history files on HDFS
+    props.setProperty("mapred.job.tracker.history.completed.location",
+        "historyDoneFolderOnHDFS");
+
     props.setProperty(JobConf.MR_SUPERGROUP, "superGroup");
 
     MyGroupsProvider.mapping.put(jobSubmitter, Arrays.asList("group1"));

Modified: hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/jobconf_history.jsp
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/jobconf_history.jsp?rev=1077346&r1=1077345&r2=1077346&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/jobconf_history.jsp
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/webapps/job/jobconf_history.jsp
Fri Mar  4 04:05:47 2011
@@ -44,22 +44,11 @@
     jobFile = fs.open(jobFilePath);
     JobConf jobConf = new JobConf(jobFilePath);
     JobTracker jobTracker = (JobTracker) application.getAttribute("job.tracker");
-    String user = request.getRemoteUser();
-    if (user != null) {
-      try {
-        jobTracker.getJobACLsManager().checkAccess(JobID.forName(jobId),
-            UserGroupInformation.createRemoteUser(user), JobACL.VIEW_JOB,
-            jobConf.getUser(),
-            new AccessControlList(jobConf.get(JobACL.VIEW_JOB.getAclName())));
-        } catch (AccessControlException e) {
-          String errMsg =
-            user
-                + " is not authorized to view details of job "
-                + jobId
-                + "<hr><a href=\"jobhistory.jsp\">Go back to JobHistory</a><br>";
-        JSPUtil.setErrorAndForward(errMsg, request, response);
-        return;
-        }
+
+    JobHistory.JobInfo job = JSPUtil.checkAccessAndGetJobInfo(request,
+        response, jobTracker, fs, logFile);
+    if (job == null) {
+      return;
     }
 
     XMLUtils.transform(



Mime
View raw message