[
https://issues.apache.org/jira/browse/HADOOP-12888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15184995#comment-15184995
]
Costin Leau commented on HADOOP-12888:
--------------------------------------
[~steve_l] Hi. The latest patch passes the test. The unit test is unrelated as
far as I can tell:
{code}
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=768m;
support was removed in 8.0
Tests run: 6, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.469 sec <<<
FAILURE! - in org.apache.hadoop.fs.shell.find.TestName
applyGlob(org.apache.hadoop.fs.shell.find.TestName) Time elapsed: 2.121 sec
<<< ERROR!
java.lang.Exception: test timed out after 1000 milliseconds
at java.util.zip.ZipFile.getEntry(Native Method)
at java.util.zip.ZipFile.getEntry(ZipFile.java:310)
at java.util.jar.JarFile.getEntry(JarFile.java:240)
at java.util.jar.JarFile.getJarEntry(JarFile.java:223)
{code}
> HDFS client requires compromising permission when running under JVM security
> manager
> ------------------------------------------------------------------------------------
>
> Key: HADOOP-12888
> URL: https://issues.apache.org/jira/browse/HADOOP-12888
> Project: Hadoop Common
> Issue Type: Bug
> Components: security
> Affects Versions: 2.7.2
> Environment: Linux
> Reporter: Costin Leau
> Assignee: Costin Leau
> Labels: stevel-to-review
> Attachments: HADOOP-12888-001.patch, HADOOP-12888-002.patch,
> HADOOP-12888-003.patch
>
>
> HDFS _client_ requires dangerous permission, in particular _execute_ on _all
> files_ despite only trying to connect to an HDFS cluster.
> A full list (for both Hadoop 1 and 2) is available here along with the place
> in code where they occur.
> While it is understandable for some permissions to be used, requiring
> {{FilePermission <<ALL FILES>> execute}} to simply initialize a class field
> [Shell|https://github.com/apache/hadoop/blob/0fa54d45b1cf8a29f089f64d24f35bd221b4803f/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java#L728]
> which in the end is not used (since it's just a client) simply *compromises*
> the entire security system.
> To make matters worse, the code is executed to initialize a field so in case
> the permissions is not granted, the VM fails with {{InitializationError}}
> which is unrecoverable.
> Ironically enough, on Windows this problem does not appear since the code
> simply bypasses it and initializes the field with a fall back value
> ({{false}}).
> A quick fix would be to simply take into account that the JVM
> {{SecurityManager}} might be active and the permission not granted or that
> the external process fails and use a fall back value.
> A proper and long-term fix would be to minimize the use of permissions for
> hdfs client since it is simply not required. A client should be as light as
> possible and not have the server requirements leaked onto.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)