Package helma.main

# Class HelmaSecurityManager

java.lang.Object
java.lang.SecurityManager
helma.main.HelmaSecurityManager

public class HelmaSecurityManager extends SecurityManager
Liberal security manager for Helma system that makes sure application code is not allowed to exit the VM and set a security manager. This class can be subclassed to implement actual security policies. It contains a utility method `getApplication` that can be used to determine the name of the application trying to execute the action in question, if any.

## Constructor Summary

Constructors
Constructor
Description
`HelmaSecurityManager()`

## Method Summary

Modifier and Type
Method
Description
`void`
`checkAccept(String host, int port)`
`void`
`checkAccess(Thread thread)`
`void`
`checkAccess(ThreadGroup group)`
`void`
`checkAwtEventQueueAccess()`
`void`
`checkConnect(String host, int port)`
`void`
`checkConnect(String host, int port, Object context)`
`void`
`checkCreateClassLoader()`
`void`
`checkDelete(String file)`
`void`
`checkExec(String cmd)`
`void`
`checkExit(int status)`
`void`
`checkLink(String lib)`
`void`
`checkListen(int port)`
`void`
`checkMemberAccess(Class clazz, int which)`
`void`
`checkMulticast(InetAddress addr)`
`void`
`checkPackageAccess(String pkg)`
`void`
`checkPackageDefinition(String pkg)`
`void`
`checkPermission(Permission p)`
`void`
`checkPermission(Permission p, Object context)`
`void`
`checkPrintJobAccess()`
`void`
`checkPropertiesAccess()`
`void`
`checkPropertyAccess(String key)`
`void`
`checkRead(FileDescriptor fdesc)`
`void`
`checkRead(String file)`
`void`
`checkRead(String file, Object context)`
`void`
`checkSecurityAccess(String target)`
`void`
`checkSetFactory()`
`void`
`checkSystemClipboardAccess()`
`boolean`
`checkTopLevelWindow(Object window)`
`void`
`checkWrite(FileDescriptor fdesc)`
`void`
`checkWrite(String file)`
`protected String`
`getApplication()`
Utility method that returns the name of the application trying to execute the code in question.

### Methods inherited from class java.lang.SecurityManager

`checkMulticast, getClassContext, getSecurityContext, getThreadGroup`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HelmaSecurityManager

public HelmaSecurityManager()

## Method Details

### checkPermission

public void checkPermission(Permission p)

Overrides:
  `checkPermission` in class `SecurityManager`
Parameters:
  `p` - ...

### checkPermission

public void checkPermission(Permission p, Object context)

Overrides:
  `checkPermission` in class `SecurityManager`
Parameters:
  `p` - ...
  `context` - ...

### checkCreateClassLoader

public void checkCreateClassLoader()

Overrides:
  `checkCreateClassLoader` in class `SecurityManager`

### checkAccess

public void checkAccess(Thread thread)

Overrides:
  `checkAccess` in class `SecurityManager`
Parameters:
  `thread` - ...

### checkAccess

public void checkAccess(ThreadGroup group)

Overrides:
  `checkAccess` in class `SecurityManager`
Parameters:
  `group` - ...

### checkExit

public void checkExit(int status)

Overrides:
  `checkExit` in class `SecurityManager`
Parameters:
  `status` - ...

### checkExec

public void checkExec(String cmd)

Overrides:
  `checkExec` in class `SecurityManager`
Parameters:
  `cmd` - ...

### checkLink

public void checkLink(String lib)

Overrides:
  `checkLink` in class `SecurityManager`
Parameters:
  `lib` - ...

### checkRead

public void checkRead(FileDescriptor fdesc)

Overrides:
  `checkRead` in class `SecurityManager`
Parameters:
  `fdesc` - ...

### checkRead

public void checkRead(String file)

Overrides:
  `checkRead` in class `SecurityManager`
Parameters:
  `file` - ...

### checkRead

public void checkRead(String file, Object context)

Overrides:
  `checkRead` in class `SecurityManager`
Parameters:
  `file` - ...
  `context` - ...

### checkWrite

public void checkWrite(FileDescriptor fdesc)

Overrides:
  `checkWrite` in class `SecurityManager`
Parameters:
  `fdesc` - ...

### checkWrite

public void checkWrite(String file)

Overrides:
  `checkWrite` in class `SecurityManager`
Parameters:
  `file` - ...

### checkDelete

public void checkDelete(String file)

Overrides:
  `checkDelete` in class `SecurityManager`
Parameters:
  `file` - ...

### checkConnect

public void checkConnect(String host, int port)

Overrides:
  `checkConnect` in class `SecurityManager`
Parameters:
  `host` - ...
  `port` - ...

### checkConnect

public void checkConnect(String host, int port, Object context)

Overrides:
  `checkConnect` in class `SecurityManager`
Parameters:
  `host` - ...
  `port` - ...
  `context` - ...

### checkListen

public void checkListen(int port)

Overrides:
  `checkListen` in class `SecurityManager`
Parameters:
  `port` - ...

### checkAccept

public void checkAccept(String host, int port)

Overrides:
  `checkAccept` in class `SecurityManager`
Parameters:
  `host` - ...
  `port` - ...

### checkMulticast

public void checkMulticast(InetAddress addr)

Overrides:
  `checkMulticast` in class `SecurityManager`
Parameters:
  `addr` - ...

### checkPropertiesAccess

public void checkPropertiesAccess()

Overrides:
  `checkPropertiesAccess` in class `SecurityManager`

### checkPropertyAccess

public void checkPropertyAccess(String key)

Overrides:
  `checkPropertyAccess` in class `SecurityManager`
Parameters:
  `key` - ...

### checkTopLevelWindow

public boolean checkTopLevelWindow(Object window)

Parameters:
  `window` - ...
Returns:
  ...

### checkPrintJobAccess

public void checkPrintJobAccess()

Overrides:
  `checkPrintJobAccess` in class `SecurityManager`

### checkSystemClipboardAccess

public void checkSystemClipboardAccess()

### checkAwtEventQueueAccess

public void checkAwtEventQueueAccess()

### checkPackageAccess

public void checkPackageAccess(String pkg)

Overrides:
  `checkPackageAccess` in class `SecurityManager`
Parameters:
  `pkg` - ...

### checkPackageDefinition

public void checkPackageDefinition(String pkg)

Overrides:
  `checkPackageDefinition` in class `SecurityManager`
Parameters:
  `pkg` - ...

### checkSetFactory

public void checkSetFactory()

Overrides:
  `checkSetFactory` in class `SecurityManager`

### checkMemberAccess

public void checkMemberAccess(Class clazz, int which)

Parameters:
  `clazz` - ...
  `which` - ...

### checkSecurityAccess

public void checkSecurityAccess(String target)

Overrides:
  `checkSecurityAccess` in class `SecurityManager`
Parameters:
  `target` - ...

### getApplication

protected String getApplication()
Utility method that returns the name of the application trying to execute the code in question. Returns null if the current code does not belong to any application.