## Apéndice C: Métodos del Controlador de Seguridad

Esta tabla lista los permisos chequeados mediante las implementaciones de los métodos de java.lang.SecurityManager. Cada método de chequeo llama al método SecurityManager.checkPermission con el permiso indicado, excepto para los permisos checkConnect y checkRead que toman un argumento de contexto. Los métodos checkConnect y checkRead esperan que el contexto sea un AccessControlContext y llaman al método checkPermission del permiso con el permiso especificado.

>     public void checkAccept(String host, int port);
>     java.net.SocketPermission "{host}:{port}", "accept";

>     public void checkAccess(Thread g);
>     java.lang.RuntimePermission "modifyThread");

>     public void checkAccess(ThreadGroup g);
>     java.lang.RuntimePermission "modifyThreadGroup");

>     public void checkAwtEventQueueAccess();
>     java.awt.AWTPermission "accessEventQueue";

>     public void checkConnect(String host, int port);
>     if (port == -1)
>       java.net.SocketPermission "{host}","resolve";
>     else
>       java.net.SocketPermission "{host}:{port}","connect";

>     public void checkConnect(String host, int port,
>                              Object context);
>     if (port == -1)
>       java.net.SocketPermission "{host}","resolve";
>     else
>       java.net.SocketPermission "{host}:{port}","connect";

>     public void checkCreateClassLoader();
>     java.lang.RuntimePermission "createClassLoader";

>     public void checkDelete(String file);
>     java.io.FilePermission "{file}", "delete";

>     public void checkExec(String cmd);
>     if (cmd is an absolute path)
>       java.io.FilePermission "{cmd}", "execute";
>     else
>       java.io.FilePermission "-", "execute";

>     public void checkExit(int status);
>     java.lang.RuntimePermission "exitVM");

>     public void checkLink(String lib);
>     java.lang.RuntimePermission "loadLibrary.{lib}";

>     public void checkListen(int port);
>     if (port == 0)
>       java.net.SocketPermission "localhost:1024-","listen";
>     else
>       java.net.SocketPermission "localhost:{port}","listen";

>     public void checkMemberAccess(Class clazz, int which);
>     if (which != Member.PUBLIC) {
>      if (currentClassLoader() != clazz.getClassLoader()) {
>       checkPermission(
>        new java.lang.RuntimePermission(
>                         "accessDeclaredMembers"));
>      }
>     }

>     public void checkMulticast(InetAddress maddr);
>     java.net.SocketPermission(
>                   maddr.getHostAddress(),"accept,connect");

>     public void checkMulticast(InetAddress maddr, byte ttl);
>     java.net.SocketPermission(
>                   maddr.getHostAddress(),"accept,connect");

>     public void checkPackageAccess(String pkg);
>     java.lang.RuntimePermission
>                       "accessClassInPackage.{pkg}";

>     public void checkPackageDefinition(String pkg);
>     java.lang.RuntimePermission
>                       "defineClassInPackage.{pkg}";

>     public void checkPrintJobAccess();
>     java.lang.RuntimePermission "queuePrintJob";

>     public void checkPropertiesAccess();
>     java.util.PropertyPermission "*", "read,write";

>     public void checkPropertyAccess(String key);
>     java.util.PropertyPermission "{key}", "read,write";

>     public void checkRead(FileDescriptor fd);
>     java.lang.RuntimePermission "readFileDescriptor";

>     public void checkRead(String file);
>     java.io.FilePermission "{file}", "read";

>     public void checkRead(String file, Object context);
>     java.io.FilePermission "{file}", "read";

>     public void checkSecurityAccess(String action);
>     java.security.SecurityPermission "{action}";

>     public void checkSetFactory();
>     java.lang.RuntimePermission "setFactory";

>     public void checkSystemClipboardAccess();
>     java.awt.AWTPermission "accessClipboard";

>     public boolean checkTopLevelWindow(Object window);
>     java.awt.AWTPermission "showWindowWithoutWarningBanner";

>     public void checkWrite(FileDescriptor fd);
>     java.lang.RuntimePermission "writeFileDescriptor";

>     public void checkWrite(String file);
>     java.io.FilePermission "{file}", "write";

>     public SecurityManager();
>     java.lang.RuntimePermission "createSecurityManager";

Ozito