001         package com.croftsoft.core.security.manager;
002    
003         import java.io.FileDescriptor;
004         import java.net.InetAddress;
005    
006         /*********************************************************************
007         * Disables all security checks.
008         *
009         * <PRE>
010         *
011         * if ( System.getSecurityManager ( ) == null )
012         * {
013         *   System.setSecurityManager ( new NullSecurityManager ( ) );
014         * }
015         *
016         * </PRE>
017         *
018         * @author
019         *   <a href="https://www.croftsoft.com/">David Wallace Croft</a>
020         * @version
021         *   1999-02-07
022         *********************************************************************/
023    
024         public class  NullSecurityManager extends SecurityManager
025         //////////////////////////////////////////////////////////////////////
026         // The source code is also useful as a template for writing new custom
027         // SecurityManagers.
028         //////////////////////////////////////////////////////////////////////
029         {
030    
031         public void  checkAccept ( String  host, int  port )
032         //////////////////////////////////////////////////////////////////////
033         {
034         }
035    
036         public void  checkAccess ( Thread  t )
037         //////////////////////////////////////////////////////////////////////
038         {
039         }
040    
041         public void  checkAccess ( ThreadGroup  g )
042         //////////////////////////////////////////////////////////////////////
043         {
044         }
045    
046         public void  checkAwtEventQueueAccess ( )
047         //////////////////////////////////////////////////////////////////////
048         {
049         }
050    
051         public void  checkConnect ( String  host, int  port )
052         //////////////////////////////////////////////////////////////////////
053         {
054         }
055    
056         public void  checkConnect ( String  host, int  port, Object  context )
057         //////////////////////////////////////////////////////////////////////
058         {
059         }
060    
061         public void  checkCreateClassLoader ( )
062         //////////////////////////////////////////////////////////////////////
063         {
064         }
065    
066         public void  checkDelete ( String  file )
067         //////////////////////////////////////////////////////////////////////
068         {
069         }
070    
071         public void  checkExec ( String  cmd )
072         //////////////////////////////////////////////////////////////////////
073         {
074         }
075    
076         public void  checkExit ( int  status )
077         //////////////////////////////////////////////////////////////////////
078         {
079         }
080    
081         public void  checkLink ( String  libname )
082         //////////////////////////////////////////////////////////////////////
083         {
084         }
085    
086         public void  checkListen ( int  port )
087         //////////////////////////////////////////////////////////////////////
088         {
089         }
090    
091         public void  checkMemberAccess ( Class  clazz, int  which )
092         //////////////////////////////////////////////////////////////////////
093         {
094         }
095    
096         public void  checkMulticast ( InetAddress  maddr )
097         //////////////////////////////////////////////////////////////////////
098         {
099         }
100    
101         public void  checkMulticast ( InetAddress  maddr, byte  ttl )
102         //////////////////////////////////////////////////////////////////////
103         {
104         }
105    
106         public void  checkPackageAccess ( String  pkg )
107         //////////////////////////////////////////////////////////////////////
108         {
109         }
110    
111         public void  checkPackageDefinition ( String  pkg )
112         //////////////////////////////////////////////////////////////////////
113         {
114         }
115    
116         public void  checkPrintJobAccess ( )
117         //////////////////////////////////////////////////////////////////////
118         {
119         }
120    
121         public void  checkPropertiesAccess ( )
122         //////////////////////////////////////////////////////////////////////
123         {
124         }
125    
126         public void  checkPropertyAccess ( String  key )
127         //////////////////////////////////////////////////////////////////////
128         {
129         }
130    
131         public void  checkRead ( FileDescriptor  fd )
132         //////////////////////////////////////////////////////////////////////
133         {
134         }
135    
136         public void  checkRead ( String  file )
137         //////////////////////////////////////////////////////////////////////
138         {
139         }
140    
141         public void  checkRead ( String  file, Object  context )
142         //////////////////////////////////////////////////////////////////////
143         {
144         }
145    
146         public void  checkSecurityAccess ( String  action )
147         //////////////////////////////////////////////////////////////////////
148         {
149         }
150    
151         public void  checkSetFactory ( )
152         //////////////////////////////////////////////////////////////////////
153         {
154         }
155    
156         public void  checkSystemClipboardAccess ( )
157         //////////////////////////////////////////////////////////////////////
158         {
159         }
160    
161         public boolean  checkTopLevelWindow ( Object  window )
162         //////////////////////////////////////////////////////////////////////
163         {
164           return true;
165         }
166    
167         public void  checkWrite ( FileDescriptor  fd )
168         //////////////////////////////////////////////////////////////////////
169         {
170         }
171    
172         public void  checkWrite ( String  file )
173         //////////////////////////////////////////////////////////////////////
174         {
175         }
176    
177         //////////////////////////////////////////////////////////////////////
178         //////////////////////////////////////////////////////////////////////
179         }