/*
 * This is an example policy file for the lookup service's activation group.
 * You should be able to use this as-is if you use reggie.jar as an
 * executable jar file, or if the classpath you use when running
 * com.sun.jini.reggie.CreateLookup is just a single jar file or a single
 * directory with a trailing slash.  Otherwise you need to replace the
 * codebase string below.  If you want the lookup database stored somewhere
 * other than in /tmp/reggie_log/, then change that as well.
 */

grant codebase "file:${lib.dir}/*"
{
    permission java.io.FilePermission "<<ALL FILES>>", "read,write,execute,delete";
    permission java.lang.RuntimePermission "createClassLoader";
    permission java.lang.RuntimePermission "getClassLoader";
    permission java.lang.RuntimePermission "setContextClassLoader";
    permission java.lang.RuntimePermission "modifyThreadGroup";
    permission java.lang.RuntimePermission "modifyThread";
    permission java.lang.RuntimePermission "shutdownHooks";
    permission java.lang.RuntimePermission "preferences";
    permission java.lang.RuntimePermission "exitVM";
    permission java.lang.RuntimePermission "queuePrintJob";
    permission java.net.SocketPermission "224.0.1.84", "connect,accept";
    permission java.net.SocketPermission "224.0.1.85", "connect,accept";
    permission java.util.PropertyPermission "*", "read";
    permission net.jini.discovery.DiscoveryPermission "*";
    permission java.net.SocketPermission "www.columbia.edu", "connect,accept";
    permission java.net.SocketPermission "mindcircus.cc.columbia.edu:1024-", "connect,accept";
    permission java.net.SocketPermission "jonapot.cc.columbia.edu:1024-", "connect,accept";
    permission java.net.SocketPermission "shinobu-test.cc.columbia.edu:1024-", "connect,accept";
//    permission java.net.SocketPermission "*.atg.columbia.edu:1024-", "connect,accept";
    permission java.lang.RuntimePermission "accessDeclaredMembers";
    permission java.net.SocketPermission "pcd.cc.columbia.edu", "connect";
    permission javax.security.auth.AuthPermission "createLoginContext.Prix";
};

//the following 3 codebases must be identical
grant codebase "file:${lib.dir}/jsb-boot.jar" {
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.net.SocketPermission "localhost:80", "listen";
    permission java.net.SocketPermission "*.columbia.edu:1024-", "accept";
    permission java.net.SocketPermission "validator.w3.org:1024-", "accept";
};
grant codebase "file:${lib.dir}/loader.jar" {
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.net.SocketPermission "localhost:80", "listen";
    permission java.net.SocketPermission "*.columbia.edu:1024-", "accept";
    permission java.net.SocketPermission "validator.w3.org:1024-", "accept";
};
grant codebase "file:${lib.dir}/prix.jar" {
    permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
    permission java.net.SocketPermission "localhost:80", "listen";
    permission java.net.SocketPermission "*.columbia.edu:1024-", "accept";
    permission java.net.SocketPermission "validator.w3.org:1024-", "accept";
};

grant {
    permission java.net.SocketPermission "${localhost}:1024-", "connect,accept";
    permission java.net.SocketPermission "afterburner.cc.columbia.edu:1024-", "connect,accept";
    permission java.net.SocketPermission "jonapot.cc.columbia.edu:1024-", "connect,accept";
    permission java.net.SocketPermission "mindcircus.cc.columbia.edu:1024-", "connect,accept";
};

