src/java.base/share/classes/java/lang/RuntimePermission.java
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 58288 48e480e56aad
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
57956
e0b8b019d2f5 8229997: Apply java.io.Serial annotations in java.base
darcy
parents: 47216
diff changeset
     2
 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1940
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1940
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1940
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1940
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1940
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.lang;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.security.*;
44359
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
    29
import java.lang.module.ModuleFinder;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
/**
32107
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    32
 * This class is for runtime permissions. A {@code RuntimePermission}
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    33
 * contains a name (also referred to as a "target name") but no actions
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    34
 * list; you either have the named permission or you don't.
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    35
 * <p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * The target name is the name of the runtime permission (see below). The
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * naming convention follows the  hierarchical property naming convention.
32107
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    38
 * Also, an asterisk may appear at the end of the name, following a ".",
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    39
 * or by itself, to signify a wildcard match. For example: "loadLibrary.*"
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    40
 * and "*" signify a wildcard match, while "*loadLibrary" and "a*b" do not.
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    41
 * <p>
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    42
 * The following table lists the standard {@code RuntimePermission}
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    43
 * target names, and for each provides a description of what the permission
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
    44
 * allows and a discussion of the risks of granting code the permission.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 *
45124
144479e89cdb 8179592: Update tables in java.base to be HTML 5-friendly.
jjg
parents: 44360
diff changeset
    46
 * <table class="striped">
144479e89cdb 8179592: Update tables in java.base to be HTML 5-friendly.
jjg
parents: 44360
diff changeset
    47
 * <caption style="display:none">permission target name,
144479e89cdb 8179592: Update tables in java.base to be HTML 5-friendly.
jjg
parents: 44360
diff changeset
    48
 *  what the target allows, and associated risks</caption>
144479e89cdb 8179592: Update tables in java.base to be HTML 5-friendly.
jjg
parents: 44360
diff changeset
    49
 * <thead>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
    51
 * <th scope="col">Permission Target Name</th>
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
    52
 * <th scope="col">What the Permission Allows</th>
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
    53
 * <th scope="col">Risks of Allowing this Permission</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * </tr>
45124
144479e89cdb 8179592: Update tables in java.base to be HTML 5-friendly.
jjg
parents: 44360
diff changeset
    55
 * </thead>
144479e89cdb 8179592: Update tables in java.base to be HTML 5-friendly.
jjg
parents: 44360
diff changeset
    56
 * <tbody>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
    59
 *   <th scope="row">createClassLoader</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 *   <td>Creation of a class loader</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 *   <td>This is an extremely dangerous permission to grant.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * Malicious applications that can instantiate their own class
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * loaders could then load their own rogue classes into the system.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * These newly loaded classes could be placed into any protection
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * domain by the class loader, thereby automatically granting the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * classes the permissions for that domain.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
    70
 *   <th scope="row">getClassLoader</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 *   <td>Retrieval of a class loader (e.g., the class loader for the calling
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * class)</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 *   <td>This would grant an attacker permission to get the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * class loader for a particular class. This is dangerous because
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * having access to a class's class loader allows the attacker to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 * load other classes available to that class loader. The attacker
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * would typically otherwise not have access to those classes.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
    81
 *   <th scope="row">setContextClassLoader</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 *   <td>Setting of the context class loader used by a thread</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 *   <td>The context class loader is used by system code and extensions
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * when they need to lookup resources that might not exist in the system
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * class loader. Granting setContextClassLoader permission would allow
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * code to change which context class loader is used
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 * for a particular thread, including system threads.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
    91
 *   <th scope="row">enableContextClassLoaderOverride</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 *   <td>Subclass implementation of the thread context class loader methods</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 *   <td>The context class loader is used by system code and extensions
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
 * when they need to lookup resources that might not exist in the system
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
 * class loader. Granting enableContextClassLoaderOverride permission would allow
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 * a subclass of Thread to override the methods that are used
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
 * to get or set the context class loader for a particular thread.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   101
 *   <th scope="row">closeClassLoader</th>
1940
e81514210873 4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents: 2
diff changeset
   102
 *   <td>Closing of a ClassLoader</td>
e81514210873 4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents: 2
diff changeset
   103
 *   <td>Granting this permission allows code to close any URLClassLoader
e81514210873 4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents: 2
diff changeset
   104
 * that it has a reference to.</td>
e81514210873 4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents: 2
diff changeset
   105
 * </tr>
e81514210873 4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents: 2
diff changeset
   106
 *
e81514210873 4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents: 2
diff changeset
   107
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   108
 *   <th scope="row">setSecurityManager</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 *   <td>Setting of the security manager (possibly replacing an existing one)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * </td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 *   <td>The security manager is a class that allows
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * applications to implement a security policy. Granting the setSecurityManager
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * permission would allow code to change which security manager is used by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 * installing a different, possibly less restrictive security manager,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 * thereby bypassing checks that would have been enforced by the original
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * security manager.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   120
 *   <th scope="row">createSecurityManager</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
 *   <td>Creation of a new security manager</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 *   <td>This gives code access to protected, sensitive methods that may
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * disclose information about other classes or the execution stack.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   127
 *   <th scope="row">getenv.{variable name}</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 *   <td>Reading of the value of the specified environment variable</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 *   <td>This would allow code to read the value, or determine the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 *       existence, of a particular environment variable.  This is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 *       dangerous if the variable contains confidential data.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   135
 *   <th scope="row">exitVM.{exit status}</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
 *   <td>Halting of the Java Virtual Machine with the specified exit status</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 *   <td>This allows an attacker to mount a denial-of-service attack
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
 * by automatically forcing the virtual machine to halt.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
 * Note: The "exitVM.*" permission is automatically granted to all code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 * loaded from the application class path, thus enabling applications
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 * to terminate themselves. Also, the "exitVM" permission is equivalent to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 * "exitVM.*".</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   146
 *   <th scope="row">shutdownHooks</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
 *   <td>Registration and cancellation of virtual-machine shutdown hooks</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
 *   <td>This allows an attacker to register a malicious shutdown
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
 * hook that interferes with the clean shutdown of the virtual machine.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   153
 *   <th scope="row">setFactory</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
 *   <td>Setting of the socket factory used by ServerSocket or Socket,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
 * or of the stream handler factory used by URL</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
 *   <td>This allows code to set the actual implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
 * for the socket, server socket, stream handler, or RMI socket factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
 * An attacker may set a faulty implementation which mangles the data
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
 * stream.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   163
 *   <th scope="row">setIO</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
 *   <td>Setting of System.out, System.in, and System.err</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
 *   <td>This allows changing the value of the standard system streams.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
 * An attacker may change System.in to monitor and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
 * steal user input, or may set System.err to a "null" OutputStream,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
 * which would hide any error messages sent to System.err. </td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   172
 *   <th scope="row">modifyThread</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
 *   <td>Modification of threads, e.g., via calls to Thread
32033
bf24e33c7919 8132468: docs: replace <tt> tags (obsolete in html5) for java.io, java.lang, java.math
avstepan
parents: 30899
diff changeset
   174
 * {@code interrupt, stop, suspend, resume, setDaemon, setPriority,
bf24e33c7919 8132468: docs: replace <tt> tags (obsolete in html5) for java.io, java.lang, java.math
avstepan
parents: 30899
diff changeset
   175
 * setName} and {@code setUncaughtExceptionHandler}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
 * methods</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
 * <td>This allows an attacker to modify the behaviour of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
 * any thread in the system.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   182
 *   <th scope="row">stopThread</th>
58288
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   183
 *   <td>Stopping of threads via calls to the Thread {@code stop}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
 * method</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
 *   <td>This allows code to stop any thread in the system provided that it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
 * already granted permission to access that thread.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
 * This poses as a threat, because that code may corrupt the system by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
 * killing existing threads.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   192
 *   <th scope="row">modifyThreadGroup</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
 *   <td>modification of thread groups, e.g., via calls to ThreadGroup
58288
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   194
 * {@code destroy}, {@code getParent}, {@code resume},
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   195
 * {@code setDaemon}, {@code setMaxPriority}, {@code stop},
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   196
 * and {@code suspend} methods</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
 *   <td>This allows an attacker to create thread groups and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
 * set their run priority.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   202
 *   <th scope="row">getProtectionDomain</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
 *   <td>Retrieval of the ProtectionDomain for a class</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
 *   <td>This allows code to obtain policy information
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
 * for a particular code source. While obtaining policy information
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
 * does not compromise the security of the system, it does give
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
 * attackers additional information, such as local file names for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
 * example, to better aim an attack.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   212
 *   <th scope="row">getFileSystemAttributes</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
 *   <td>Retrieval of file system attributes</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
 *   <td>This allows code to obtain file system information such as disk usage
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
 *       or disk space available to the caller.  This is potentially dangerous
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
 *       because it discloses information about the system hardware
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
 *       configuration and some information about the caller's privilege to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
 *       write files.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   222
 *   <th scope="row">readFileDescriptor</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
 *   <td>Reading of file descriptors</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
 *   <td>This would allow code to read the particular file associated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
 *       with the file descriptor read. This is dangerous if the file
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
 *       contains confidential data.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   230
 *   <th scope="row">writeFileDescriptor</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
 *   <td>Writing to file descriptors</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
 *   <td>This allows code to write to a particular file associated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
 *       with the descriptor. This is dangerous because it may allow
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
 *       malicious code to plant viruses or at the very least, fill up
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
 *       your entire disk.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   239
 *   <th scope="row">loadLibrary.{library name}</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
 *   <td>Dynamic linking of the specified library</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
 *   <td>It is dangerous to allow an applet permission to load native code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
 * libraries, because the Java security architecture is not designed to and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
 * does not prevent malicious behavior at the level of native code.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   247
 *   <th scope="row">accessClassInPackage.{package name}</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
 *   <td>Access to the specified package via a class loader's
58288
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   249
 * {@code loadClass} method when that class loader calls
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   250
 * the SecurityManager {@code checkPackageAccess} method</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
 *   <td>This gives code access to classes in packages
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
 * to which it normally does not have access. Malicious code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
 * may use these classes to help in its attempt to compromise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
 * security in the system.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   258
 *   <th scope="row">defineClassInPackage.{package name}</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
 *   <td>Definition of classes in the specified package, via a class
58288
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   260
 * loader's {@code defineClass} method when that class loader calls
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   261
 * the SecurityManager {@code checkPackageDefinition} method.</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
 *   <td>This grants code permission to define a class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
 * in a particular package. This is dangerous because malicious
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
 * code with this permission may define rogue classes in
58288
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   265
 * trusted packages like {@code java.security} or {@code java.lang},
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
 * for example.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   270
 *   <th scope="row">defineClass</th>
44359
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   271
 *   <td>Define a class with
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   272
 * {@link java.lang.invoke.MethodHandles.Lookup#defineClass(byte[])
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   273
 * Lookup.defineClass}.</td>
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   274
 *   <td>This grants code with a suitably privileged {@code Lookup} object
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   275
 * permission to define classes in the same package as the {@code Lookup}'s
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   276
 * lookup class. </td>
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   277
 * </tr>
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   278
 *
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   279
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   280
 *   <th scope="row">accessDeclaredMembers</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
 *   <td>Access to the declared members of a class</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
 *   <td>This grants code permission to query a class for its public,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
 * protected, default (package) access, and private fields and/or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
 * methods. Although the code would have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
 * access to the private and protected field and method names, it would not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
 * have access to the private/protected field data and would not be able
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
 * to invoke any private methods. Nevertheless, malicious code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
 * may use this information to better aim an attack.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
 * Additionally, it may invoke any public methods and/or access public fields
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
 * in the class.  This could be dangerous if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
 * the code would normally not be able to invoke those methods and/or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
 * access the fields  because
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
 * it can't cast the object to the class/interface with those methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
 * and fields.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   298
 *   <th scope="row">queuePrintJob</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
 *   <td>Initiation of a print job request</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
 *   <td>This could print sensitive information to a printer,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
 * or simply waste paper.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   305
 *   <th scope="row">getStackTrace</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
 *   <td>Retrieval of the stack trace information of another thread.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
 *   <td>This allows retrieval of the stack trace information of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
 * another thread.  This might allow malicious code to monitor the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
 * execution of threads and discover vulnerabilities in applications.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   313
 *   <th scope="row">getStackWalkerWithClassReference</th>
44262
bfbb47bd118d 8176815: Remove StackFramePermission and use RuntimePermission for stack walking
mchung
parents: 40798
diff changeset
   314
 *   <td>Get a stack walker that can retrieve stack frames with class reference.</td>
bfbb47bd118d 8176815: Remove StackFramePermission and use RuntimePermission for stack walking
mchung
parents: 40798
diff changeset
   315
 *   <td>This allows retrieval of Class objects from stack walking.
bfbb47bd118d 8176815: Remove StackFramePermission and use RuntimePermission for stack walking
mchung
parents: 40798
diff changeset
   316
 *   This might allow malicious code to access Class objects on the stack
bfbb47bd118d 8176815: Remove StackFramePermission and use RuntimePermission for stack walking
mchung
parents: 40798
diff changeset
   317
 *   outside its own context.</td>
bfbb47bd118d 8176815: Remove StackFramePermission and use RuntimePermission for stack walking
mchung
parents: 40798
diff changeset
   318
 * </tr>
bfbb47bd118d 8176815: Remove StackFramePermission and use RuntimePermission for stack walking
mchung
parents: 40798
diff changeset
   319
 *
bfbb47bd118d 8176815: Remove StackFramePermission and use RuntimePermission for stack walking
mchung
parents: 40798
diff changeset
   320
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   321
 *   <th scope="row">setDefaultUncaughtExceptionHandler</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
 *   <td>Setting the default handler to be used when a thread
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
 *   terminates abruptly due to an uncaught exception</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
 *   <td>This allows an attacker to register a malicious
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
 *   uncaught exception handler that could interfere with termination
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
 *   of a thread</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   330
 *   <th scope="row">preferences</th>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
 *   <td>Represents the permission required to get access to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
 *   java.util.prefs.Preferences implementations user or system root
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
 *   which in turn allows retrieval or update operations within the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
 *   Preferences persistent backing store.) </td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
 *   <td>This permission allows the user to read from or write to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
 *   preferences backing store if the user running the code has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
 *   sufficient OS privileges to read/write to that backing store.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
 *   The actual backing store may reside within a traditional filesystem
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
 *   directory or within a registry depending on the platform OS</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
 * </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   343
 *   <th scope="row">manageProcess</th>
30899
d2408e757489 8077350: JEP 102 Process API Updates Implementation
rriggs
parents: 30378
diff changeset
   344
 *   <td>Native process termination and information about processes
d2408e757489 8077350: JEP 102 Process API Updates Implementation
rriggs
parents: 30378
diff changeset
   345
 *       {@link ProcessHandle}.</td>
d2408e757489 8077350: JEP 102 Process API Updates Implementation
rriggs
parents: 30378
diff changeset
   346
 *   <td>Allows code to identify and terminate processes that it did not create.</td>
d2408e757489 8077350: JEP 102 Process API Updates Implementation
rriggs
parents: 30378
diff changeset
   347
 * </tr>
30378
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   348
 *
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   349
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   350
 *   <th scope="row">localeServiceProvider</th>
30378
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   351
 *   <td>This {@code RuntimePermission} is required to be granted to
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   352
 *   classes which subclass and implement
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   353
 *   {@code java.util.spi.LocaleServiceProvider}. The permission is
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   354
 *   checked during invocation of the abstract base class constructor.
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   355
 *   This permission ensures trust in classes which implement this
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   356
 *   security-sensitive provider mechanism. </td>
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   357
 *   <td>See <a href= "../util/spi/LocaleServiceProvider.html">
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   358
 *   {@code java.util.spi.LocaleServiceProvider}</a> for more
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   359
 *   information.</td>
c631cf59315d 8079186: Add 'localeServiceProvider' target in the class description of RuntimePermission
naoto
parents: 25859
diff changeset
   360
 * </tr>
33875
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   361
 *
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   362
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   363
 *   <th scope="row">loggerFinder</th>
33875
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   364
 *   <td>This {@code RuntimePermission} is required to be granted to
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   365
 *   classes which subclass or call methods on
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   366
 *   {@code java.lang.System.LoggerFinder}. The permission is
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   367
 *   checked during invocation of the abstract base class constructor, as
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   368
 *   well as on the invocation of its public methods.
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   369
 *   This permission ensures trust in classes which provide loggers
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   370
 *   to system classes.</td>
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   371
 *   <td>See {@link java.lang.System.LoggerFinder java.lang.System.LoggerFinder}
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   372
 *   for more information.</td>
c1c71107d45f 8140364: JEP 264 Platform Logger API and Service Implementation
dfuchs
parents: 32107
diff changeset
   373
 * </tr>
44359
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   374
 *
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   375
 * <tr>
45881
aaec0fbe17ae 8184208: update class="striped" tables for accessibility
jjg
parents: 45768
diff changeset
   376
 *   <th scope="row">accessSystemModules</th>
44359
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   377
 *   <td>Access system modules in the runtime image.</td>
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   378
 *   <td>This grants the permission to access resources in the
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   379
 *   {@linkplain ModuleFinder#ofSystem system modules} in the runtime image.</td>
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   380
 * </tr>
c6761862ca0b 8174823: Module system implementation refresh (3/2017)
alanb
parents: 40798
diff changeset
   381
 *
45124
144479e89cdb 8179592: Update tables in java.base to be HTML 5-friendly.
jjg
parents: 44360
diff changeset
   382
 * </tbody>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
 * </table>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
 *
32107
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
   385
 * @implNote
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
   386
 * Implementations may define additional target names, but should use naming
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
   387
 * conventions such as reverse domain name notation to avoid name clashes.
67aa4920495c 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used
mullan
parents: 32033
diff changeset
   388
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
 * @see java.security.BasicPermission
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
 * @see java.security.Permission
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
 * @see java.security.Permissions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
 * @see java.security.PermissionCollection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
 * @see java.lang.SecurityManager
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
 * @author Marianne Mueller
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
 * @author Roland Schemers
45434
4582657c7260 8181082: class-level since tag issues in java.base & java.datatransfer module
mli
parents: 45124
diff changeset
   398
 * @since 1.2
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
public final class RuntimePermission extends BasicPermission {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
57956
e0b8b019d2f5 8229997: Apply java.io.Serial annotations in java.base
darcy
parents: 47216
diff changeset
   403
    @java.io.Serial
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    private static final long serialVersionUID = 7399184964622342223L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
     * Creates a new RuntimePermission with the specified name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
     * The name is the symbolic name of the RuntimePermission, such as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
     * "exit", "setFactory", etc. An asterisk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
     * may appear at the end of the name, following a ".", or by itself, to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
     * signify a wildcard match.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
     * @param name the name of the RuntimePermission.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
     *
58288
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   415
     * @throws NullPointerException if {@code name} is {@code null}.
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   416
     * @throws IllegalArgumentException if {@code name} is empty.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
    public RuntimePermission(String name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
        super(name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
     * Creates a new RuntimePermission object with the specified name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
     * The name is the symbolic name of the RuntimePermission, and the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
     * actions String is currently unused and should be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
     * @param name the name of the RuntimePermission.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
     * @param actions should be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
     *
58288
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   432
     * @throws NullPointerException if {@code name} is {@code null}.
48e480e56aad 8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
jboes
parents: 57956
diff changeset
   433
     * @throws IllegalArgumentException if {@code name} is empty.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
    public RuntimePermission(String name, String actions)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
        super(name, actions);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
}