1 /*
   2  * security policy used by the test process
   3  */
   4 
   5 grant {
   6   // property specifically accessed by this test
   7   permission java.util.PropertyPermission "user.name", "read";
   8 
   9   // standard test activation permissions
  10   permission java.io.FilePermission "..${/}..${/}test.props", "read";
  11 
  12   // test needs to cleanup rmid's log.
  13   permission java.io.FilePermission ".${/}log", "read,write,delete";
  14   permission java.io.FilePermission ".${/}log${/}-", "read,write,delete";
  15 
  16   // test needs to use java to exec an rmid
  17   permission java.io.FilePermission "${java.home}${/}bin${/}java", "execute";
  18 
  19   // test uses these permissions to propagate security values to rmid
  20   permission java.util.PropertyPermission "java.security.policy", "read";
  21   permission java.util.PropertyPermission "java.security.manager", "read";
  22 
  23   // used by TestLibrary to get the RMI Registry port
  24   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.registry";
  25   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.server";
  26   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport";
  27   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.proxy";
  28   permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.tcp";
  29 
  30   // used by TestLibrary to determine test environment 
  31   permission java.util.PropertyPermission "test.*", "read";
  32   permission java.util.PropertyPermission "user.dir", "read";
  33   permission java.util.PropertyPermission "java.home", "read";
  34 
  35   permission java.util.PropertyPermission "rmi.registry.port", "read";
  36   permission java.util.PropertyPermission "java.rmi.activation.port", "write";
  37 
  38   // required for test to create an ActivationGroup
  39   permission java.lang.RuntimePermission "setFactory";
  40 
  41   // test needs to export rmid and communicate with objects on arbitrary ports
  42   permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
  43 };