Merge pull request #10953 from rmuir/lockdown
remove shutdownHooks permission
This commit is contained in:
commit
75cadaff39
|
@ -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() {
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
Loading…
Reference in New Issue