Fix JVM isolation in tests.
Currently security manager would allow for one JVM to muck with the files (read, write, AND delete) of another JVM. This is unnecessary.
This commit is contained in:
parent
22b23f6e44
commit
9d6b1382e7
|
@ -32,9 +32,11 @@ grant {
|
||||||
permission java.io.FilePermission "${m2.repository}${/}-", "read";
|
permission java.io.FilePermission "${m2.repository}${/}-", "read";
|
||||||
// system jar resources
|
// system jar resources
|
||||||
permission java.io.FilePermission "${java.home}${/}-", "read";
|
permission java.io.FilePermission "${java.home}${/}-", "read";
|
||||||
|
// per-jvm directory
|
||||||
permission java.io.FilePermission "${junit4.childvm.cwd}${/}temp", "read,write";
|
permission java.io.FilePermission "${junit4.childvm.cwd}${/}temp", "read,write";
|
||||||
permission java.io.FilePermission "${junit4.childvm.cwd}${/}temp${/}-", "read,write,delete";
|
permission java.io.FilePermission "${junit4.childvm.cwd}${/}temp${/}-", "read,write,delete";
|
||||||
permission java.io.FilePermission "${junit4.tempDir}${/}*", "read,write,delete";
|
//permission java.io.FilePermission "${junit4.tempDir}${/}*", "read,write,delete";
|
||||||
|
|
||||||
permission java.nio.file.LinkPermission "symbolic";
|
permission java.nio.file.LinkPermission "symbolic";
|
||||||
permission groovy.security.GroovyCodeSourcePermission "/groovy/script";
|
permission groovy.security.GroovyCodeSourcePermission "/groovy/script";
|
||||||
|
|
||||||
|
|
3
pom.xml
3
pom.xml
|
@ -627,8 +627,7 @@
|
||||||
<tests.security.manager>${tests.security.manager}</tests.security.manager>
|
<tests.security.manager>${tests.security.manager}</tests.security.manager>
|
||||||
<tests.compatibility>${tests.compatibility}</tests.compatibility>
|
<tests.compatibility>${tests.compatibility}</tests.compatibility>
|
||||||
<java.awt.headless>true</java.awt.headless>
|
<java.awt.headless>true</java.awt.headless>
|
||||||
<!-- everything below is for security manager / test.policy -->
|
<!-- security manager / test.policy -->
|
||||||
<junit4.tempDir>${project.build.directory}</junit4.tempDir>
|
|
||||||
<java.security.policy>${basedir}/dev-tools/tests.policy</java.security.policy>
|
<java.security.policy>${basedir}/dev-tools/tests.policy</java.security.policy>
|
||||||
</systemProperties>
|
</systemProperties>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
Loading…
Reference in New Issue