/*
 * security policy used by the test process
 */

grant {
  // used by TestLibrary to determine extra commandline properties
  permission java.io.FilePermission "..${/}..${/}test.props", "read";

  // property specifically accessed by this test.
  permission java.util.PropertyPermission "user.name", "read";

  // test needs to use java to exec an EchoImpl object
  permission java.io.FilePermission "${java.home}${/}bin${/}java", "execute";

  // used by TestLibrary to determine test environment 
  permission java.util.PropertyPermission "test.*", "read";
  permission java.util.PropertyPermission "user.dir", "read";
  permission java.util.PropertyPermission "java.home", "read";

  permission java.util.PropertyPermission "rmi.registry.port", "read";	

  permission java.util.PropertyPermission "java.security.policy", "read";
  permission java.util.PropertyPermission "java.security.manager", "read";

  // used by TestLibrary to get the RMI Registry port
  permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.registry";
  permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.server";
  permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport";
  permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.proxy";
  permission java.lang.RuntimePermission "accessClassInPackage.sun.rmi.transport.tcp";

  // test needs to export rmid and communicate with objects on arbitrary ports
  permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
};
