|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pandora.CheckSandbox
Check permissions in a sandboxed environment.
alexis.grandemange@pagebox.net
Copyright (c) 2002-2003 Alexis Grandemange
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License lesser.txt should be included in the distribution.
Nested Class Summary | |
(package private) class |
CheckSandbox.CheckLog
Simple implementation of a logging object for command line use. |
Field Summary | |
(package private) static java.lang.String |
chkLib
Name of the native library to load |
(package private) PageBoxLib.LogIF |
log
Logging object |
Constructor Summary | |
CheckSandbox(javax.servlet.ServletContext ctx,
PageBoxLib.LogIF log)
Constructor for CheckSandbox use in an application server. |
|
CheckSandbox(java.lang.String[] args)
Constructor for CheckSandbox use on the command line. |
Method Summary | |
private void |
checkClassLoader(java.lang.String chkClassDir)
Check the permission to create a class loader and use it to instantiate classes. |
private void |
checkCmd(java.lang.String chkCmd)
Check the permission to run a command. |
private void |
checkLoad()
Check the permission to load a native library and invoke its methods. |
private void |
checkRead(java.lang.String chkReadFile)
Check the permission to read a file. |
private void |
checkWrite(java.lang.String chkWriteFile)
Check the permission to write and delete a file. |
static void |
main(java.lang.String[] args)
To use CheckSandbox on the command line. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
PageBoxLib.LogIF log
static java.lang.String chkLib
Constructor Detail |
public CheckSandbox(javax.servlet.ServletContext ctx, PageBoxLib.LogIF log)
ctx
- Servlet contextlog
- logging objectpublic CheckSandbox(java.lang.String[] args)
args
- command line argumentsMethod Detail |
private void checkRead(java.lang.String chkReadFile)
chkReadFile
- path of the file to readprivate void checkWrite(java.lang.String chkWriteFile)
chkWriteFile
- path of the file to write and deleteprivate void checkCmd(java.lang.String chkCmd)
chkCmd
- path of the command to execprivate void checkLoad()
private void checkClassLoader(java.lang.String chkClassDir)
chkClassDir
- path of the classes loaded by the class loaderpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |