001: /*
002: * This file is part of the QuickServer library
003: * Copyright (C) 2003-2005 QuickServer.org
004: *
005: * Use, modification, copying and distribution of this software is subject to
006: * the terms and conditions of the GNU Lesser General Public License.
007: * You should have received a copy of the GNU LGP License along with this
008: * library; if not, you can download a copy from <http://www.quickserver.org/>.
009: *
010: * For questions, suggestions, bug-reports, enhancement-requests etc.
011: * visit http://www.quickserver.org
012: *
013: */
014:
015: package org.quickserver.security;
016:
017: import java.io.*;
018: import java.net.*;
019: import java.security.*;
020:
021: /**
022: * This is a simple SecurityManager template.
023: * @since 1.3.3
024: */
025: public class AccessManager extends SecurityManager {
026:
027: public AccessManager() {
028: }
029:
030: public void checkPermission(Permission perm) {
031: }
032:
033: public void checkPermission(Permission perm, Object context) {
034: }
035:
036: public void checkPrintJobAccess() {
037: }
038:
039: public void checkSecurityAccess(String target) {
040: }
041:
042: public void checkCreateClassLoader() {
043: }
044:
045: public void checkMemberAccess(Class clazz, int which) {
046: }
047:
048: public void checkPackageAccess(String pkg) {
049: }
050:
051: public void checkPackageDefinition(String pkg) {
052: }
053:
054: public void checkDelete(String file) {
055: }
056:
057: public void checkExec(String cmd) {
058: }
059:
060: public void checkExit(int status) {
061: }
062:
063: public void checkListen(int port) {
064: }
065:
066: public void checkAccept(String host, int port) {
067: //throw new SecurityException("Accept denied from "+host+":"+port);
068: }
069:
070: public void checkConnect(String host, int port) {
071: }
072:
073: public void checkConnect(String host, int port, Object context) {
074: }
075:
076: public void checkMulticast(InetAddress maddr) {
077: }
078:
079: public void checkSetFactory() {
080: }
081:
082: public void checkSystemClipboardAccess() {
083: }
084:
085: public void checkAccess(Thread t) {
086: }
087:
088: public void checkAccess(ThreadGroup g) {
089: }
090:
091: public void checkRead(String str) {
092: }
093:
094: public void checkRead(FileDescriptor fd) {
095: }
096:
097: public void checkRead(String file, Object context) {
098: }
099:
100: public void checkWrite(FileDescriptor f) {
101: }
102:
103: public void checkWrite(String s) {
104: }
105:
106: public void checkLink(String lib) {
107: }
108:
109: public void checkPropertiesAccess() {
110: }
111:
112: public void checkPropertyAccess(String key) {
113: }
114:
115: public void checkAwtEventQueueAccess() {
116: };
117:
118: public boolean checkTopLevelWindow(Object window) {
119: return true;
120: }
121:
122: }
|