test/java/rmi/server/RMIClassLoader/delegateToContextLoader/security.policy

Print this page
rev 9344 : 8036095: RMI tests using testlibrary.RMID and testlibrary.JavaVM do not pass through vmoptions
Reviewed-by: XXX


   2  * security policy used by the test process
   3  */
   4 
   5 grant codeBase "file:${java.home}/lib/ext/*" {
   6     permission java.security.AllPermission;
   7 };
   8 
   9 grant {
  10   // test must create a context loader for the current thread.
  11   permission java.lang.RuntimePermission "createClassLoader";
  12   permission java.lang.RuntimePermission "setContextClassLoader";
  13 
  14   // need to move some classes out of the test's classpath; specific to this test
  15   permission java.io.FilePermission "${test.classes}", "read,write,delete";
  16   permission java.io.FilePermission "${test.classes}${/}-", "read,write,delete";
  17 
  18   permission java.io.FilePermission ".${/}codebase", "read,write,delete";
  19   permission java.io.FilePermission ".${/}codebase${/}-", "read,write,delete";
  20 
  21   // used by TestLibrary to determine test environment 
  22   permission java.util.PropertyPermission "test.classes", "read";
  23   permission java.util.PropertyPermission "test.src", "read";
  24   permission java.util.PropertyPermission "user.dir", "read";
  25   permission java.util.PropertyPermission "java.home", "read";
  26 };


   2  * security policy used by the test process
   3  */
   4 
   5 grant codeBase "file:${java.home}/lib/ext/*" {
   6     permission java.security.AllPermission;
   7 };
   8 
   9 grant {
  10   // test must create a context loader for the current thread.
  11   permission java.lang.RuntimePermission "createClassLoader";
  12   permission java.lang.RuntimePermission "setContextClassLoader";
  13 
  14   // need to move some classes out of the test's classpath; specific to this test
  15   permission java.io.FilePermission "${test.classes}", "read,write,delete";
  16   permission java.io.FilePermission "${test.classes}${/}-", "read,write,delete";
  17 
  18   permission java.io.FilePermission ".${/}codebase", "read,write,delete";
  19   permission java.io.FilePermission ".${/}codebase${/}-", "read,write,delete";
  20 
  21   // used by TestLibrary to determine test environment 
  22   permission java.util.PropertyPermission "test.*", "read";

  23   permission java.util.PropertyPermission "user.dir", "read";
  24   permission java.util.PropertyPermission "java.home", "read";
  25 };