You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2011/03/04 05:49:42 UTC
svn commit: r1077734 -
/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobLocalizer.java
Author: omalley
Date: Fri Mar 4 04:49:42 2011
New Revision: 1077734
URL: http://svn.apache.org/viewvc?rev=1077734&view=rev
Log:
commit 2df02dcdccfa22bbc700330249a53b6b46de65c4
Author: Devaraj Das <dd...@yahoo-inc.com>
Date: Thu Oct 7 00:11:58 2010 -0700
Added a comment around a doAs
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobLocalizer.java
Modified: hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobLocalizer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobLocalizer.java?rev=1077734&r1=1077733&r2=1077734&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobLocalizer.java (original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/mapred/org/apache/hadoop/mapred/JobLocalizer.java Fri Mar 4 04:49:42 2011
@@ -382,6 +382,10 @@ public class JobLocalizer {
//setup the distributed cache
final long[] sizes = downloadPrivateCache(jConf);
if (sizes != null) {
+ //the following doAs is required because the DefaultTaskController
+ //calls the localizeJobFiles method in the context of the TaskTracker
+ //process. The JVM authorization check would fail without this
+ //doAs. In the LinuxTC case, this doesn't harm.
UserGroupInformation ugi =
UserGroupInformation.createRemoteUser(jobid.toString());
ugi.doAs(new PrivilegedExceptionAction<Object>() {