public class SecurityManager extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
inCheck
Field inCheck is set true iff a security check is in progress
AND we call another method of SecurityManager (which might
have been overridden).
|
Constructor and Description |
---|
SecurityManager()
Default constructor, public in Java2.
|
Modifier and Type | Method and Description |
---|---|
void |
checkAccept(String host,
int port)
Checks whether the caller has permission to accept incoming connections.
|
void |
checkAccess(Thread t)
Checks whether the caller has permission to modify Thread t.
|
void |
checkAccess(ThreadGroup g)
Checks whether the caller has permission to modify ThreadGroup g.
|
void |
checkAwtEventQueueAccess()
Checks whether the caller has permission to access the AWT event queue.
|
void |
checkConnect(String host,
int port)
Checks whether the caller has permission to connect to the given port.
|
void |
checkConnect(String host,
int port,
Object context)
Checks whether the given context has permission to connect to the given port.
|
void |
checkCreateClassLoader()
Checks whether the caller has permission to create a ClassLoader.
|
void |
checkDelete(String file) |
void |
checkExec(String cmd)
Checks whether the caller is allowed to execute the specified command.
|
void |
checkExit(int status)
Checks whether the caller is allowed to exit the VM.
|
void |
checkLink(String libname)
Checks whether the caller has permission to load library ``libname''.
|
void |
checkListen(int port)
Checks whether the caller has permission to listen to the given port.
|
void |
checkMemberAccess(Class cl,
int mtype)
Checks whether the caller has access to the declared members of ``cl''.
|
void |
checkMulticast(InetAddress addr)
Checks whether the caller has permission to use IP Multicast.
|
void |
checkMulticast(InetAddress addr,
byte ttl)
Checks whether the caller has permission to use IP Multicast.
|
void |
checkPackageAccess(String packageName)
Checks whether the caller has access to the given package.
|
void |
checkPackageDefinition(String packageName)
Checks whether the caller has permission to define classes in the given package.
|
void |
checkPermission(Permission perm)
A wrapper for AccessController.checkPermission(perm), or a no-op if
USE_SECURITY_MANAGER is not set in wonka.vm.SecurityConfiguration.
|
void |
checkPermission(Permission perm,
Object context)
A wrapper for AccessController.checkPermission(perm).
|
void |
checkPrintJobAccess()
Checks whether the caller has permission to initiate a print job.
|
void |
checkPropertiesAccess()
Checks whether the caller has permission to read or modify the system properties as a whole.
|
void |
checkPropertyAccess(String propname)
Checks whether the caller has permission to read the given system property.
|
void |
checkRead(FileDescriptor fd)
Checks whether the caller has permission to read the file descriptor `fd'.
|
void |
checkRead(String file)
Checks whether the caller has permission to read the file ``file''.
|
void |
checkRead(String file,
Object context)
Checks whether the given context has permission to read the file ``file''.
|
void |
checkSecurityAccess(String target)
Checks whether the caller has the SecurityPermission called ``target''.
|
void |
checkSetFactory()
Checks whether the caller has permission to set the socket factories used by the java.net code.
|
void |
checkSystemClipboardAccess()
Checks whether the caller has permission to access the AWT system clipboard.
|
boolean |
checkTopLevelWindow(Object window)
Checks whether the caller is trusted to bring up the specified window.
|
void |
checkWrite(FileDescriptor fd)
Checks whether the caller has permission to write to the file `fd'.
|
void |
checkWrite(String file)
Checks whether the caller has permission to write to the file ``file''.
|
protected int |
classDepth(String name)
Gets the stack depth of the most recent call to a method of the given class.
|
protected int |
classLoaderDepth()
Get the depth on the stack of the topmost class that was not loaded by the system class loader or bootstrap class loader.
|
protected ClassLoader |
currentClassLoader()
Get the class loader of the topmost class on the stack that was not loaded by the system class loader or bootstrap class loader.
|
protected Class |
currentLoadedClass()
Get the topmost class on the stack that was not loaded by the system class loader or bootstrap class loader.
|
protected Class[] |
getClassContext()
The Class[] returned contains one element for every method on the stack, starting with the method which called getClassContext().
|
boolean |
getInCheck()
Get the value of the inCheck field.
|
Object |
getSecurityContext()
Get the security context (i.e., AccessControlContext) currently applicable.
|
ThreadGroup |
getThreadGroup()
Get the thread group in which new threads should be instantiated.
|
protected boolean |
inClass(String name)
See whether the given class is in the stack.
|
protected boolean |
inClassLoader()
See whether any non-system class is in the stack.
|
protected boolean inCheck
public SecurityManager() throws SecurityException
SecurityException
public void checkPermission(Permission perm)
public void checkPermission(Permission perm, Object context)
public Object getSecurityContext()
public ThreadGroup getThreadGroup()
protected Class[] getClassContext()
protected int classDepth(String name)
protected ClassLoader currentClassLoader()
protected Class currentLoadedClass()
protected int classLoaderDepth()
protected boolean inClass(String name)
protected boolean inClassLoader()
public boolean getInCheck()
public void checkCreateClassLoader() throws SecurityException
SecurityException
public void checkAccess(Thread t) throws SecurityException
SecurityException
public void checkAccess(ThreadGroup g) throws SecurityException
SecurityException
public void checkMemberAccess(Class cl, int mtype) throws SecurityException
SecurityException
public void checkExit(int status) throws SecurityException
SecurityException
public void checkExec(String cmd) throws SecurityException
SecurityException
public void checkMulticast(InetAddress addr) throws SecurityException
SecurityException
public void checkMulticast(InetAddress addr, byte ttl) throws SecurityException
SecurityException
public void checkPropertyAccess(String propname) throws SecurityException
SecurityException
public void checkPropertiesAccess() throws SecurityException
SecurityException
public void checkSecurityAccess(String target) throws SecurityException
SecurityException
public void checkLink(String libname) throws SecurityException
SecurityException
public void checkRead(FileDescriptor fd) throws SecurityException
SecurityException
public void checkRead(String file) throws SecurityException
SecurityException
public void checkRead(String file, Object context) throws SecurityException
SecurityException
public void checkWrite(FileDescriptor fd) throws SecurityException
SecurityException
public void checkWrite(String file) throws SecurityException
SecurityException
public void checkDelete(String file) throws SecurityException
SecurityException
public void checkConnect(String host, int port) throws SecurityException
SecurityException
public void checkConnect(String host, int port, Object context) throws SecurityException
SecurityException
public void checkListen(int port) throws SecurityException
SecurityException
public void checkAccept(String host, int port) throws SecurityException
SecurityException
public void checkPrintJobAccess() throws SecurityException
SecurityException
public void checkSystemClipboardAccess() throws SecurityException
SecurityException
public void checkAwtEventQueueAccess() throws SecurityException
SecurityException
public void checkSetFactory() throws SecurityException
SecurityException
public boolean checkTopLevelWindow(Object window) throws SecurityException
SecurityException
public void checkPackageAccess(String packageName) throws SecurityException
SecurityException
public void checkPackageDefinition(String packageName) throws SecurityException
SecurityException