PluginSandboxPolicy.java 文件源码

java
阅读 37 收藏 0 点赞 0 评论 0

项目:rapidminer-studio 作者:
/**
 * Adds a couple of common permissions for both unsigned extensions as well as Groovy scripts.
 *
 * @param permissions
 *            the permissions object which will get the permissions added to it
 */
private static void addCommonPermissions(Permissions permissions) {
    permissions.add(new AudioPermission("play"));
    permissions.add(new AWTPermission("listenToAllAWTEvents"));
    permissions.add(new AWTPermission("setWindowAlwaysOnTop"));
    permissions.add(new AWTPermission("watchMousePointer"));
    permissions.add(new LoggingPermission("control", ""));
    permissions.add(new SocketPermission("*", "connect, listen, accept, resolve"));
    permissions.add(new URLPermission("http://-", "*:*"));
    permissions.add(new URLPermission("https://-", "*:*"));

    // because random Java library calls use sun classes which may or may not do an acess check,
    // we have to grant access to all of them
    // this is a very unfortunate permission and I would love to not have it
    // so if at any point in the future this won't be necessary any longer, remove it!!!
    permissions.add(new RuntimePermission("accessClassInPackage.sun.*"));

    permissions.add(new RuntimePermission("accessDeclaredMembers"));
    permissions.add(new RuntimePermission("getenv.*"));
    permissions.add(new RuntimePermission("getFileSystemAttributes"));
    permissions.add(new RuntimePermission("readFileDescriptor"));
    permissions.add(new RuntimePermission("writeFileDescriptor"));
    permissions.add(new RuntimePermission("queuePrintJob"));
    permissions.add(new NetPermission("specifyStreamHandler"));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号