- Timestamp:
- Apr 27, 2004, 8:39:34 PM (22 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
libjava/java/lang/RuntimePermission.java (modified) (5 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libjava/java/lang/RuntimePermission.java
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r1390 r1391 1 /* RuntimePermission.java 2 Copyright (C) 1998, 2000 Free Software Foundation, Inc.1 /* RuntimePermission.java 2 Copyright (C) 1998, 2000 Free Software Foundation, Inc. 3 3 4 4 This file is part of GNU Classpath. … … 8 8 the Free Software Foundation; either version 2, or (at your option) 9 9 any later version. 10 10 11 11 GNU Classpath is distributed in the hope that it will be useful, but 12 12 WITHOUT ANY WARRANTY; without even the implied warranty of … … 39 39 package java.lang; 40 40 41 import java.security. *;41 import java.security.; 42 42 43 43 /** … … 46 46 * 47 47 * Permission names have the follow the hierarchial property naming 48 * convention. In addition, an asterisk may appear at the end of a 48 * convention. In addition, an asterisk may appear at the end of a 49 49 * name if following a period or by itself. 50 50 * … … 54 54 * <td>"**", "*x", "*.a"</td></tr> 55 55 * </table> 56 * <br> 57 * 56 * <br> 57 * 58 58 * The following table provides a list of all the possible RuntimePermission 59 * permission names with a description of what that permission allows. 60 * <br> 59 * permission names with a description of what that permission allows.<br> 61 60 * <table border=1> 62 * <tr><th>Permission Name</th><th>Permission Allows</th>< /tr>61 * <tr><th>Permission Name</th><th>Permission Allows</th></tr> 63 62 * <tr> 64 63 * <td><code>createClassLoader</code></td> 65 * <td>creation of a class loader</td></tr> 64 * <td>creation of a class loader</td> 65 * <td>a class loader can load rogue classes which bypass all security 66 * permissions</td></tr> 66 67 * <tr> 67 68 * <td><code>getClassLoader</code></td> 68 * <td>retrieval of the class loader for the calling class</td></tr> 69 * <td>retrieval of the class loader for the calling class</td> 70 * <td>rogue code could load classes not otherwise available</td></tr> 69 71 * <tr> 70 72 * <td><code>setContextClassLoader</code></td> 71 * <td>allows the setting of the context class loader used by a 72 * thread including system threads</td></tr> 73 * <td>allows the setting of the context class loader used by a thread</td> 74 * <td>rogue code could change the context class loader needed by system 75 * threads</td></tr> 73 76 * <tr> 74 77 * <td><code>setSecurityManager</code></td> 75 * <td>allows the application to replace the security manager with 76 * another, possibly less restrictive one.</td></tr> 78 * <td>allows the application to replace the security manager</td> 79 * <td>the new manager may be less restrictive, so that rogue code can 80 * bypass existing security checks</td></tr> 77 81 * <tr> 78 82 * <td><code>createSecurityManager</code></td> 79 * <td>allows the application to create a new security manager</td></tr> 83 * <td>allows the application to create a new security manager</td> 84 * <td>rogue code can use the new security manager to discover information 85 * about the execution stack</td></tr> 80 86 * <tr> 81 87 * <td><code>exitVM</code></td> 82 * <td>allows the application to halt the virtual machine</td></tr> 88 * <td>allows the application to halt the virtual machine</td> 89 * <td>rogue code can mount a denial-of-service attack by killing the 90 * virtual machine</td></tr> 91 * <tr> 92 * <td><code>shutdownHooks</code></td> 93 * <td>allows registration and modification of shutdown hooks</td> 94 * <td>rogue code can add a hook that interferes with clean 95 * virtual machine shutdown</td></tr> 83 96 * <tr> 84 97 * <td><code>setFactory</code></td> 85 * <td>allows the application to set the socket factory for socket, 86 * server socket, stream handler, or RMI socket factory.</td></tr> 98 * <td>allows the application to set the socket factory for socket, 99 * server socket, stream handler, or RMI socket factory.</td> 100 * <td>rogue code can create a rogue network object which mangles or 101 * intercepts data</td></tr> 87 102 * <tr> 88 103 * <td><code>setIO</code></td> 89 * <td>allows the application to set System.out, System.in, and 90 * System.err</td></tr> 104 * <td>allows the application to set System.out, System.in, and 105 * System.err</td> 106 * <td>rogue code could sniff user input and intercept or mangle 107 * output</td></tr> 91 108 * <tr> 92 109 * <td><code>modifyThread</code></td> 93 110 * <td>allows the application to modify any thread in the virtual machine 94 111 * using any of the methods <code>stop</code>, <code>resume</code>, 95 * <code>suspend</code>, <code>setPriority</code>, and 96 * <code>setName</code> of classs <code>Thread</code></td></tr> 112 * <code>suspend</code>, <code>setPriority</code>, and 113 * <code>setName</code> of classs <code>Thread</code></td> 114 * <td>rogue code could adversely modify system or user threads</td></tr> 97 115 * <tr> 98 116 * <td><code>stopThread</code></td> 99 117 * <td>allows the application to <code>stop</code> any thread it has 100 * access to in the system</td></tr> 118 * access to in the system</td> 119 * <td>rogue code can stop arbitrary threads</td></tr> 101 120 * <tr> 102 121 * <td><code>modifyThreadGroup</td> 103 122 * <td>allows the application to modify thread groups using any of the 104 * methods <code>destroy</code>, <code>resume</code>, 105 * <code>setDaemon</code>, <code>setMaxPriority</code>, 123 * methods <code>destroy</code>, <code>resume</code>, 124 * <code>setDaemon</code>, <code>setMaxPriority</code>, 106 125 * <code>stop</code>, and <code>suspend</code> of the class 107 * <code>ThreadGroup</code></td></tr> 126 * <code>ThreadGroup</code></td> 127 * <td>rogue code can mount a denial-of-service attack by changing run 128 * priorities</td></tr> 108 129 * <tr> 109 130 * <td><code>getProtectionDomain</code></td> 110 * <td></td></tr> 131 * <td>retrieve a class's ProtectionDomain</td> 132 * <td>rogue code can gain information about the security policy, to 133 * prepare a better attack</td></tr> 111 134 * <tr> 112 135 * <td><code>readFileDescriptor</code></td> 113 * <td></td></tr> 114 * <tr> 115 * <td><code>writeFileDescriptor</code</td> 116 * <td></td></tr> 117 * <tr> 118 * <td><code>loadLibrary.{library name}</code></td> 119 * <td></td></tr> 120 * <tr> 121 * <td><code>accessClassInPackage.{package name}</code></td> 122 * <td></td></tr> 123 * <tr> 124 * <td><code>defineClassInPackage.{package name}</code></td> 125 * <td></td></tr> 136 * <td>read a file descriptor</td> 137 * <td>rogue code can read sensitive information</td></tr> 138 * <tr> 139 * <td><code>writeFileDescriptor</code></td> 140 * <td>write a file descriptor</td> 141 * <td>rogue code can write files, including viruses, and can modify the 142 * virtual machine binary; if not just fill up the disk</td></tr> 143 * <tr> 144 * <td><code>loadLibrary.<code><em>library name</em></td> 145 * <td>dynamic linking of the named library</td> 146 * <td>native code can bypass many security checks of pure Java</td></tr> 147 * <tr> 148 * <td><code>accessClassInPackage.</code><em>package name</em></td> 149 * <td>access to a package via a ClassLoader</td> 150 * <td>rogue code can access classes not normally available</td></tr> 151 * <tr> 152 * <td><code>defineClassInPackage.</code><em>package name</em></td> 153 * <td>define a class inside a given package</td> 154 * <td>rogue code can install rogue classes, including in trusted packages 155 * like java.security or java.lang</td></tr> 126 156 * <tr> 127 157 * <td><code>accessDeclaredMembers</code></td> 128 * <td></td></tr> 158 * <td>access declared class members via reflection</td> 159 * <td>rogue code can discover information, invoke methods, or modify fields 160 * that are not otherwise available</td></tr> 129 161 * <tr> 130 162 * <td><code>queuePrintJob</code></td> 131 * <td></td></tr> 163 * <td>initiate a print job</td> 164 * <td>rogue code could make a hard copy of sensitive information, or 165 * simply waste paper</td></tr> 132 166 * </table> 133 * 134 * @since JDK 1.2 135 * 167 * 136 168 * @author Brian Jones 169 170 171 172 173 174 137 175 */ 138 public final class RuntimePermission extends java.security.BasicPermission176 public final class RuntimePermission extends BasicPermission 139 177 { 140 178 /** 141 * 179 * Compatible with JDK 1.2+. 180 */ 181 private static final long serialVersionUID = 7399184964622342223L; 182 183 /** 184 * Create a new permission with the specified name. 185 * 142 186 * @param permissionName the name of the granted permission 143 * 144 * @throws IllegalArgumentException thrown if the name contains an invalid 145 * wildcard character 187 * @throws NullPointerException if name is null 188 * @throws IllegalArgumentException thrown if name is empty or invalid 146 189 */ 147 190 public RuntimePermission(String permissionName) 148 191 { 149 this(permissionName, null);192 ); 150 193 } 151 194 152 195 /** 196 197 153 198 * 154 199 * @param permissionName the name of the granted permission 155 * @param actions this should always be null 156 * 157 * @throws IllegalArgumentException throw if the name contains an invalid 158 * wildcard character 200 * @param actions ignored 201 * @throws NullPointerException if name is null 202 * @throws IllegalArgumentException thrown if name is empty or invalid 159 203 */ 160 204 public RuntimePermission(String permissionName, String actions) 161 {162 super(permissionName, actions);163 }205 { 206 ); 207 } 164 208 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
