src/java.base/share/classes/java/lang/RuntimePermission.java
changeset 58288 48e480e56aad
parent 57956 e0b8b019d2f5
child 58679 9c3209ff7550
equal deleted inserted replaced
58287:a7f16447085e 58288:48e480e56aad
   178  * any thread in the system.</td>
   178  * any thread in the system.</td>
   179  * </tr>
   179  * </tr>
   180  *
   180  *
   181  * <tr>
   181  * <tr>
   182  *   <th scope="row">stopThread</th>
   182  *   <th scope="row">stopThread</th>
   183  *   <td>Stopping of threads via calls to the Thread <code>stop</code>
   183  *   <td>Stopping of threads via calls to the Thread {@code stop}
   184  * method</td>
   184  * method</td>
   185  *   <td>This allows code to stop any thread in the system provided that it is
   185  *   <td>This allows code to stop any thread in the system provided that it is
   186  * already granted permission to access that thread.
   186  * already granted permission to access that thread.
   187  * This poses as a threat, because that code may corrupt the system by
   187  * This poses as a threat, because that code may corrupt the system by
   188  * killing existing threads.</td>
   188  * killing existing threads.</td>
   189  * </tr>
   189  * </tr>
   190  *
   190  *
   191  * <tr>
   191  * <tr>
   192  *   <th scope="row">modifyThreadGroup</th>
   192  *   <th scope="row">modifyThreadGroup</th>
   193  *   <td>modification of thread groups, e.g., via calls to ThreadGroup
   193  *   <td>modification of thread groups, e.g., via calls to ThreadGroup
   194  * <code>destroy</code>, <code>getParent</code>, <code>resume</code>,
   194  * {@code destroy}, {@code getParent}, {@code resume},
   195  * <code>setDaemon</code>, <code>setMaxPriority</code>, <code>stop</code>,
   195  * {@code setDaemon}, {@code setMaxPriority}, {@code stop},
   196  * and <code>suspend</code> methods</td>
   196  * and {@code suspend} methods</td>
   197  *   <td>This allows an attacker to create thread groups and
   197  *   <td>This allows an attacker to create thread groups and
   198  * set their run priority.</td>
   198  * set their run priority.</td>
   199  * </tr>
   199  * </tr>
   200  *
   200  *
   201  * <tr>
   201  * <tr>
   244  * </tr>
   244  * </tr>
   245  *
   245  *
   246  * <tr>
   246  * <tr>
   247  *   <th scope="row">accessClassInPackage.{package name}</th>
   247  *   <th scope="row">accessClassInPackage.{package name}</th>
   248  *   <td>Access to the specified package via a class loader's
   248  *   <td>Access to the specified package via a class loader's
   249  * <code>loadClass</code> method when that class loader calls
   249  * {@code loadClass} method when that class loader calls
   250  * the SecurityManager <code>checkPackageAccess</code> method</td>
   250  * the SecurityManager {@code checkPackageAccess} method</td>
   251  *   <td>This gives code access to classes in packages
   251  *   <td>This gives code access to classes in packages
   252  * to which it normally does not have access. Malicious code
   252  * to which it normally does not have access. Malicious code
   253  * may use these classes to help in its attempt to compromise
   253  * may use these classes to help in its attempt to compromise
   254  * security in the system.</td>
   254  * security in the system.</td>
   255  * </tr>
   255  * </tr>
   256  *
   256  *
   257  * <tr>
   257  * <tr>
   258  *   <th scope="row">defineClassInPackage.{package name}</th>
   258  *   <th scope="row">defineClassInPackage.{package name}</th>
   259  *   <td>Definition of classes in the specified package, via a class
   259  *   <td>Definition of classes in the specified package, via a class
   260  * loader's <code>defineClass</code> method when that class loader calls
   260  * loader's {@code defineClass} method when that class loader calls
   261  * the SecurityManager <code>checkPackageDefinition</code> method.</td>
   261  * the SecurityManager {@code checkPackageDefinition} method.</td>
   262  *   <td>This grants code permission to define a class
   262  *   <td>This grants code permission to define a class
   263  * in a particular package. This is dangerous because malicious
   263  * in a particular package. This is dangerous because malicious
   264  * code with this permission may define rogue classes in
   264  * code with this permission may define rogue classes in
   265  * trusted packages like <code>java.security</code> or <code>java.lang</code>,
   265  * trusted packages like {@code java.security} or {@code java.lang},
   266  * for example.</td>
   266  * for example.</td>
   267  * </tr>
   267  * </tr>
   268  *
   268  *
   269  * <tr>
   269  * <tr>
   270  *   <th scope="row">defineClass</th>
   270  *   <th scope="row">defineClass</th>
   410      * may appear at the end of the name, following a ".", or by itself, to
   410      * may appear at the end of the name, following a ".", or by itself, to
   411      * signify a wildcard match.
   411      * signify a wildcard match.
   412      *
   412      *
   413      * @param name the name of the RuntimePermission.
   413      * @param name the name of the RuntimePermission.
   414      *
   414      *
   415      * @throws NullPointerException if <code>name</code> is <code>null</code>.
   415      * @throws NullPointerException if {@code name} is {@code null}.
   416      * @throws IllegalArgumentException if <code>name</code> is empty.
   416      * @throws IllegalArgumentException if {@code name} is empty.
   417      */
   417      */
   418 
   418 
   419     public RuntimePermission(String name)
   419     public RuntimePermission(String name)
   420     {
   420     {
   421         super(name);
   421         super(name);
   427      * actions String is currently unused and should be null.
   427      * actions String is currently unused and should be null.
   428      *
   428      *
   429      * @param name the name of the RuntimePermission.
   429      * @param name the name of the RuntimePermission.
   430      * @param actions should be null.
   430      * @param actions should be null.
   431      *
   431      *
   432      * @throws NullPointerException if <code>name</code> is <code>null</code>.
   432      * @throws NullPointerException if {@code name} is {@code null}.
   433      * @throws IllegalArgumentException if <code>name</code> is empty.
   433      * @throws IllegalArgumentException if {@code name} is empty.
   434      */
   434      */
   435 
   435 
   436     public RuntimePermission(String name, String actions)
   436     public RuntimePermission(String name, String actions)
   437     {
   437     {
   438         super(name, actions);
   438         super(name, actions);