test/java/rmi/registry/classPathCodebase/security.policy

Print this page
rev 9344 : 8036095: RMI tests using testlibrary.RMID and testlibrary.JavaVM do not pass through vmoptions
Reviewed-by: XXX
   1 /*
   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   // need to move some classes out of the test's classpath; specific to this test
  11   permission java.io.FilePermission "${test.classes}", "read,write,delete";
  12   permission java.io.FilePermission "${test.classes}${/}-", "read,write,delete";
  13 
  14   permission java.io.FilePermission ".", "read,write,delete";
  15   permission java.io.FilePermission ".${/}-", "read,write,delete";
  16 
  17   // used by TestLibrary to determine test environment 
  18   permission java.util.PropertyPermission "test.classes", "read";
  19   permission java.util.PropertyPermission "test.src", "read";
  20   permission java.util.PropertyPermission "user.dir", "read";
  21   permission java.util.PropertyPermission "java.home", "read";
  22 
  23   // test needs to use java to exec an rmiregistry
  24   permission java.io.FilePermission "${java.home}${/}bin${/}-", "execute";
  25 
  26   // test needs to communicate with this its registry
  27   permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
  28 };
   1 /*
   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   // need to move some classes out of the test's classpath; specific to this test
  11   permission java.io.FilePermission "${test.classes}", "read,write,delete";
  12   permission java.io.FilePermission "${test.classes}${/}-", "read,write,delete";
  13 
  14   permission java.io.FilePermission ".", "read,write,delete";
  15   permission java.io.FilePermission ".${/}-", "read,write,delete";
  16 
  17   // used by TestLibrary to determine test environment 
  18   permission java.util.PropertyPermission "test.*", "read";

  19   permission java.util.PropertyPermission "user.dir", "read";
  20   permission java.util.PropertyPermission "java.home", "read";
  21 
  22   // test needs to use java to exec an rmiregistry
  23   permission java.io.FilePermission "${java.home}${/}bin${/}-", "execute";
  24 
  25   // test needs to communicate with this its registry
  26   permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
  27 };