001: package com.quadcap.util;
002:
003: /* Copyright 1997 - 2003 Quadcap Software. All rights reserved.
004: *
005: * This software is distributed under the Quadcap Free Software License.
006: * This software may be used or modified for any purpose, personal or
007: * commercial. Open Source redistributions are permitted. Commercial
008: * redistribution of larger works derived from, or works which bundle
009: * this software requires a "Commercial Redistribution License"; see
010: * http://www.quadcap.com/purchase.
011: *
012: * Redistributions qualify as "Open Source" under one of the following terms:
013: *
014: * Redistributions are made at no charge beyond the reasonable cost of
015: * materials and delivery.
016: *
017: * Redistributions are accompanied by a copy of the Source Code or by an
018: * irrevocable offer to provide a copy of the Source Code for up to three
019: * years at the cost of materials and delivery. Such redistributions
020: * must allow further use, modification, and redistribution of the Source
021: * Code under substantially the same terms as this license.
022: *
023: * Redistributions of source code must retain the copyright notices as they
024: * appear in each source code file, these license terms, and the
025: * disclaimer/limitation of liability set forth as paragraph 6 below.
026: *
027: * Redistributions in binary form must reproduce this Copyright Notice,
028: * these license terms, and the disclaimer/limitation of liability set
029: * forth as paragraph 6 below, in the documentation and/or other materials
030: * provided with the distribution.
031: *
032: * The Software is provided on an "AS IS" basis. No warranty is
033: * provided that the Software is free of defects, or fit for a
034: * particular purpose.
035: *
036: * Limitation of Liability. Quadcap Software shall not be liable
037: * for any damages suffered by the Licensee or any third party resulting
038: * from use of the Software.
039: */
040:
041: import java.lang.SecurityManager;
042: import java.io.FileDescriptor;
043: import java.net.InetAddress;
044:
045: //#ifdef JDK12
046: //-import java.security.Permission;
047: //#endif
048:
049: /**
050: *
051: *
052: * @author Stan Bailes
053: */
054: class NullSecurityManager extends SecurityManager {
055: public void checkCreateClassLoader() {
056: }
057:
058: public void checkAccess(Thread g) {
059: }
060:
061: public void checkAccess(ThreadGroup g) {
062: }
063:
064: public void checkExit(int status) {
065: }
066:
067: public void checkExec(String cmd) {
068: }
069:
070: public void checkLink(String lib) {
071: }
072:
073: public void checkRead(FileDescriptor fd) {
074: }
075:
076: public void checkRead(String file) {
077: }
078:
079: public void checkRead(String file, Object context) {
080: }
081:
082: public void checkWrite(FileDescriptor fd) {
083: }
084:
085: public void checkWrite(String file) {
086: }
087:
088: public void checkDelete(String file) {
089: }
090:
091: public void checkConnect(String host, int port) {
092: }
093:
094: public void checkConnect(String host, int port, Object context) {
095: }
096:
097: public void checkListen(int port) {
098: }
099:
100: public void checkAccept(String host, int port) {
101: }
102:
103: public void checkMulticast(InetAddress maddr) {
104: }
105:
106: public void checkMulticast(InetAddress maddr, byte ttl) {
107: }
108:
109: public void checkPropertiesAccess() {
110: }
111:
112: public void checkPropertyAccess(String key) {
113: }
114:
115: public void checkPropertyAccess(String key, String def) {
116: }
117:
118: public boolean checkTopLevelWindow(Object window) {
119: return true;
120: }
121:
122: public void checkPrintJobAccess() {
123: }
124:
125: public void checkSystemClipboardAccess() {
126: }
127:
128: public void checkAwtEventQueueAccess() {
129: }
130:
131: public void checkPackageAccess(String pkg) {
132: }
133:
134: public void checkPackageDefinition(String pkg) {
135: }
136:
137: public void checkSetFactory() {
138: }
139:
140: public void checkMemberAccess(Class clazz, int which) {
141: }
142:
143: public void checkSecurityAccess(String provider) {
144: }
145:
146: public Class[] pubGetClassContext() {
147: return getClassContext();
148: }
149: //#ifdef JDK12
150: //- public void checkPermission(Permission perm) {}
151: //- public void checkPermission(Permission perm, Object context) {}
152: //#endif
153: }
|