public abstract class mSecurityManager extends SecurityManager
inCheck
Constructor and Description |
---|
mSecurityManager() |
Modifier and Type | Method and Description |
---|---|
void |
checkAccess(Thread t)
Check if the current thread is allowed to modify another Thread.
|
void |
checkAccess(ThreadGroup tg)
Check if the current thread is allowed to modify a ThreadGroup.
|
ThreadGroup |
checkAssignThreadGroup(ThreadGroup group) |
void |
checkCreateClassLoader()
Check if the current thread is allowed to create a ClassLoader.
|
void |
checkCreateSecurityManager(SecurityManager obj) |
void |
checkDelete(String filename)
Check if the current thread is allowed to delete the given file.
|
abstract void |
checkLocalFileAccess() |
void |
checkPassAuthority(ClassLoader from,
ClassLoader to) |
void |
checkRead(String filename,
Object context)
Check if the current thread is allowed to read the given file. using the
given security context.
|
protected Class |
findFirstInstanceof(Class aClass) |
PropertyList |
getAuthorizers(ClassLoader loader,
boolean forWriting) |
checkAccept, checkConnect, checkConnect, checkExec, checkExit, checkLink, checkListen, checkMemberAccess, checkPackageAccess, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
public abstract void checkLocalFileAccess()
public PropertyList getAuthorizers(ClassLoader loader, boolean forWriting)
public void checkCreateClassLoader()
SecurityManager
RuntimePermission("createClassLoader")
. If you override
this, you should call super.checkCreateClassLoader()
rather
than throwing an exception.checkCreateClassLoader
in class SecurityManager
ClassLoader.ClassLoader()
public final void checkPassAuthority(ClassLoader from, ClassLoader to)
public void checkCreateSecurityManager(SecurityManager obj)
public ThreadGroup checkAssignThreadGroup(ThreadGroup group)
public final void checkAccess(Thread t)
SecurityManager
RuntimePermission("modifyThread") on system threads (ie.
threads in ThreadGroup with a null parent), and returns silently on
other threads.
If you override this, you must do two things. First, call
super.checkAccess(t)
, to make sure you are not relaxing
requirements. Second, if the calling thread has
RuntimePermission("modifyThread")
, return silently, so that
core classes (the Classpath library!) can modify any thread.
checkAccess
in class SecurityManager
t
- the other Thread to checkThread.stop()
,
Thread.suspend()
,
Thread.resume()
,
Thread.setPriority(int)
,
Thread.setName(String)
,
Thread.setDaemon(boolean)
public final void checkAccess(ThreadGroup tg)
SecurityManager
RuntimePermission("modifyThread") on the system group (ie.
the one with a null parent), and returns silently on other groups.
If you override this, you must do two things. First, call
super.checkAccess(t)
, to make sure you are not relaxing
requirements. Second, if the calling thread has
RuntimePermission("modifyThreadGroup")
, return silently,
so that core classes (the Classpath library!) can modify any thread.
checkAccess
in class SecurityManager
tg
- the ThreadGroup to checkThread.Thread()
,
ThreadGroup.ThreadGroup()
,
ThreadGroup.stop()
,
ThreadGroup.suspend()
,
ThreadGroup.resume()
,
ThreadGroup.interrupt()
,
ThreadGroup.setDaemon(boolean)
,
ThreadGroup.setMaxPriority(int)
public void checkRead(String filename, Object context)
SecurityManager
getSecurityContext()
. The default implementation checks
AccessControlContext.checkPermission(new FilePermission(filename,
"read"))
. If you override this, call super.checkRead
rather than throwing an exception.checkRead
in class SecurityManager
filename
- the full name of the file to accesscontext
- the context to determine access forSecurityManager.getSecurityContext()
,
AccessControlContext#checkPermission(Permission)
public void checkDelete(String filename)
SecurityManager
FilePermission(filename, "delete")
. If you override this,
call super.checkDelete
rather than throwing an exception.checkDelete
in class SecurityManager
filename
- the full name of the file to deleteFile#delete()