hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject hadoop git commit: HADOOP-12888 Shell to disable bash and setsid support when running under JVM security manager (Costin Leau via stevel)
Date Wed, 16 Mar 2016 14:32:14 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ab0326683 -> 1463400aa


HADOOP-12888 Shell to disable bash and setsid support when running under JVM security manager
(Costin Leau via stevel)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/1463400a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/1463400a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/1463400a

Branch: refs/heads/branch-2
Commit: 1463400aade2d4f0550ac5415d92103e27500422
Parents: ab03266
Author: Steve Loughran <stevel@apache.org>
Authored: Wed Mar 16 14:31:19 2016 +0000
Committer: Steve Loughran <stevel@apache.org>
Committed: Wed Mar 16 14:31:50 2016 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/util/Shell.java       | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1463400a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
index be0ce30..cf1ca2c 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
@@ -717,6 +717,10 @@ public abstract class Shell {
     } catch (IOException ioe) {
       LOG.warn("Bash is not supported by the OS", ioe);
       supported = false;
+    } catch (SecurityException se) {
+      LOG.info("Bash execution is not allowed by the JVM " +
+          "security manager.Considering it not supported.");
+      supported = false;
     }
 
     return supported;
@@ -744,7 +748,11 @@ public abstract class Shell {
     } catch (IOException ioe) {
       LOG.debug("setsid is not available on this machine. So not using it.");
       setsidSupported = false;
-    }  catch (Error err) {
+    } catch (SecurityException se) {
+      LOG.debug("setsid is not allowed to run by the JVM "+
+          "security manager. So not using it.");
+      setsidSupported = false;
+    } catch (Error err) {
       if (err.getMessage() != null
           && err.getMessage().contains("posix_spawn is not " +
           "a supported process launch mechanism")


Mime
View raw message