com.cloudera.sqoop.util
Class SubprocessSecurityManager

java.lang.Object
  extended by java.lang.SecurityManager
      extended by com.cloudera.sqoop.util.SubprocessSecurityManager

public class SubprocessSecurityManager
extends java.lang.SecurityManager

A SecurityManager used to run subprocesses and disallow certain actions. This specifically disallows System.exit(). This SecurityManager will also check with any existing SecurityManager as to the validity of any permissions. The SubprocessSecurityManager should be installed with the install() method, which will retain a handle to any previously-installed SecurityManager instance. When this SecurityManager is no longer necessary, the uninstall() method should be used which reinstates the previous SecurityManager as the active SecurityManager.


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Fields inherited from class java.lang.SecurityManager
inCheck
 
Constructor Summary
SubprocessSecurityManager()
           
 
Method Summary
 void checkExit(int status)
           
 void checkPermission(java.security.Permission perm)
           
 void install()
          Install this SecurityManager and retain a reference to any previously-installed SecurityManager.
 void uninstall()
          Restore an existing SecurityManager, uninstalling this one.
 
Methods inherited from class java.lang.SecurityManager
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

SubprocessSecurityManager

public SubprocessSecurityManager()
Method Detail

install

public void install()
Install this SecurityManager and retain a reference to any previously-installed SecurityManager.


uninstall

public void uninstall()
Restore an existing SecurityManager, uninstalling this one.


checkExit

public void checkExit(int status)
Overrides:
checkExit in class java.lang.SecurityManager

checkPermission

public void checkPermission(java.security.Permission perm)
Overrides:
checkPermission in class java.lang.SecurityManager


Copyright © 2010 Cloudera, Inc.