01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package java.sql;
19:
20: import java.io.Serializable;
21: import java.security.BasicPermission;
22: import java.security.Guard;
23:
24: /**
25: * Permission relating to security access control in the java.sql package.
26: * <p>
27: * Currently, the only permission supported has the name "setLog". The setLog
28: * permission controls whether a Java application or applet can open a logging
29: * stream using the DriverManager.setLogWriter method or the
30: * DriverManager.setLogStream method. This is a potentially dangerous operation
31: * since the logging stream can contain usernames, passwords
32: */
33: public final class SQLPermission extends BasicPermission implements
34: Guard, Serializable {
35:
36: private static final long serialVersionUID = -1439323187199563495L;
37:
38: /**
39: * Creates a new SQLPermission object with the specified name.
40: *
41: * @param name
42: * the name to use for this SQLPermission
43: */
44: public SQLPermission(String name) {
45: super (name);
46: }
47:
48: /**
49: * Creates a new SQLPermission object with the specified name.
50: *
51: * @param name
52: * is the name of the SQLPermission. Currently only "setLog" is
53: * allowed.
54: * @param actions
55: * is currently unused and should be set to null
56: */
57: public SQLPermission(String name, String actions) {
58: super(name, null);
59: }
60: }
|