MAPREDUCE-3904. Job history produced with mapreduce.cluster.acls.enabled false can not be viewed with mapreduce.cluster.acls.enabled true (Jonathon Eagles via tgraves)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1293456 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c0572656ce
commit
582b97c3e7
@ -149,6 +149,10 @@ Release 0.23.2 - UNRELEASED
|
||||
|
||||
MAPREDUCE-3738. MM can hang during shutdown if AppLogAggregatorImpl thread
|
||||
dies unexpectedly (Jason Lowe via sseth)
|
||||
|
||||
MAPREDUCE-3904 Job history produced with mapreduce.cluster.acls.enabled
|
||||
false can not be viewed with mapreduce.cluster.acls.enabled true
|
||||
(Jonathon Eagles via tgraves)
|
||||
|
||||
Release 0.23.1 - 2012-02-17
|
||||
|
||||
|
@ -438,6 +438,9 @@ JobContext getJobContext() {
|
||||
public boolean checkAccess(UserGroupInformation callerUGI,
|
||||
JobACL jobOperation) {
|
||||
AccessControlList jobACL = jobACLs.get(jobOperation);
|
||||
if (jobACL == null) {
|
||||
return true;
|
||||
}
|
||||
return aclsManager.checkAccess(callerUGI, jobOperation, username, jobACL);
|
||||
}
|
||||
|
||||
|
@ -191,5 +191,16 @@ public void testCheckAccess() {
|
||||
null, null, null, true, null, 0, null);
|
||||
Assert.assertTrue(job4.checkAccess(ugi1, JobACL.VIEW_JOB));
|
||||
Assert.assertTrue(job4.checkAccess(ugi2, JobACL.VIEW_JOB));
|
||||
|
||||
// Setup configuration access without security enabled
|
||||
Configuration conf5 = new Configuration();
|
||||
conf5.setBoolean(MRConfig.MR_ACLS_ENABLED, true);
|
||||
conf5.set(MRJobConfig.JOB_ACL_VIEW_JOB, "");
|
||||
|
||||
// Verify access
|
||||
JobImpl job5 = new JobImpl(jobId, null, conf5, null, null, null, null, null,
|
||||
null, null, null, true, null, 0, null);
|
||||
Assert.assertTrue(job5.checkAccess(ugi1, null));
|
||||
Assert.assertTrue(job5.checkAccess(ugi2, null));
|
||||
}
|
||||
}
|
||||
|
@ -330,6 +330,9 @@ public Map<TaskId, Task> getTasks(TaskType taskType) {
|
||||
boolean checkAccess(UserGroupInformation callerUGI, JobACL jobOperation) {
|
||||
Map<JobACL, AccessControlList> jobACLs = jobInfo.getJobACLs();
|
||||
AccessControlList jobACL = jobACLs.get(jobOperation);
|
||||
if (jobACL == null) {
|
||||
return true;
|
||||
}
|
||||
return aclsMgr.checkAccess(callerUGI, jobOperation,
|
||||
jobInfo.getUsername(), jobACL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user