Merge pull request #10953 from rmuir/lockdown

remove shutdownHooks permission
This commit is contained in:
Robert Muir 2015-05-04 07:38:43 -07:00
commit 75cadaff39
2 changed files with 9 additions and 12 deletions

View File

@ -216,15 +216,6 @@ public class Bootstrap {
// fail if using broken version
JVMCheck.check();
bootstrap.setup(true, settings, environment);
stage = "Startup";
bootstrap.start();
if (!foreground) {
closeSysError();
}
keepAliveLatch = new CountDownLatch(1);
// keep this thread alive (non daemon thread) until we shutdown
Runtime.getRuntime().addShutdownHook(new Thread() {
@ -234,6 +225,15 @@ public class Bootstrap {
}
});
bootstrap.setup(true, settings, environment);
stage = "Startup";
bootstrap.start();
if (!foreground) {
closeSysError();
}
keepAliveThread = new Thread(new Runnable() {
@Override
public void run() {

View File

@ -66,9 +66,6 @@ grant {
// needed by BootStrap, etc
permission java.lang.RuntimePermission "exitVM.*";
// needed by RandomizedTest.globalTempDir()
permission java.lang.RuntimePermission "shutdownHooks";
// needed by PluginManager
permission java.lang.RuntimePermission "setFactory";