OSDN Git Service

Add license clarification.
[pf3gnuchains/gcc-fork.git] / libjava / java / security / SecurityPermission.java
1 /* SecurityPermission.java -- Class for named security permissions
2    Copyright (C) 1998 Free Software Foundation, Inc.
3
4 This file is part of GNU Classpath.
5
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING.  If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
20
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library.  Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
25
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module.  An independent module is a module which is not derived from
33 or based on this library.  If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so.  If you do not wish to do so, delete this
36 exception statement from your version. */
37
38 package java.security;
39
40 /**
41  * This class provides a mechanism for specified named permissions 
42  * related to the Java security framework.  These permissions have no
43  * associated actions list.  They are either granted or no granted.
44  * <p>
45  * The list of valid permission names is:
46  * <p><ul>
47  * <li>getPolicy - Allows retrieval of the system security policy.
48  * <li>setPolicy - Allows the security policy to be changed.
49  * <li>getProperty.&lt;key&gt; - Allows retrieval of the value of the named
50  * property or all properties if &lt;key&gt is a '*'.
51  * <li>setProperty.&lt;key&gt; - Allows changing of the value of the named
52  * property or all properties if &lt;key&gt is a '*'.
53  * <li>insertProvider.&lt;key&gt; - Allows the named provider to be added,
54  * or any provide if the key is '*'.
55  * <li>removeProvider.&lt;key&gt; - Allows the named provider to be removed,
56  * or any provide if the key is '*'.
57  * <li>setSystemScope - Allows the system identity scope to be set.
58  * <li>setIdentityPublicKey - Allows the public key of an Identity to be set.
59  * <li>SetIdentityInfo - Allows the description of an Identity to be set.
60  * <li>addIdentityCertificate - Allows a certificate to be set for the public
61  * key of an identity.
62  * <li>removeIdentityCertificate - Allows a certificate to be removed from the 
63  * public key of an identity.
64  * <li>clearProviderProperties.&lt;key%gt; - Allows the properties of the
65  * named provider to be cleared, or all providers if key is '*'.
66  * <li>putProviderProperty.&lt;key%gt; - Allows the properties of the
67  * named provider to be changed, or all providers if key is '*'.
68  * <li>removeProviderProperty.&lt;key%gt; - Allows the properties of the
69  * named provider to be deleted, or all providers if key is '*'.
70  * <li>getSignerPrivateKey - Allows the retrieval of the private key for
71  * a signer.
72  * <li>setSignerKeyPair - Allows the public and private key of a Signer to
73  * be changed.
74  * </ul>
75  * <p>
76  * There is some degree of security risk in granting any of these permissions.
77  * Some of them can completely compromise system security.  Please exercise
78  * extreme caution in granting these permissions.
79  *
80  * @version 0.0
81  *
82  * @author Aaron M. Renn (arenn@urbanophile.com)
83  */
84 public final class SecurityPermission extends BasicPermission
85 {
86   /**
87    * This method initializes a new instance of <code>SecurityPermission</code>
88    * to have the specified name.
89    *
90    * @param name The name to assign to this permission.
91    */
92   public SecurityPermission(String name)
93   {
94     super(name);
95   }
96
97   /**
98    * This method initializes a new instance of <code>SecurityPermission</code>
99    * to have the specified name.  The actions parameter is ignored in this
100    * class.
101    *
102    * @param name The name to assign to this permission.
103    * @param actions The action list for this permission - ignored.
104    */
105   public SecurityPermission(String name, String actions)
106   {
107     super(name, actions);
108   }
109 }