Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
8593a976
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8593a976
编写于
11月 26, 2012
作者:
M
mullan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7167056: Clarify that BasicPermission names that contain non-wildcard asterisks are not invalid
Reviewed-by: weijun, xuelei
上级
1182413c
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
75 addition
and
21 deletion
+75
-21
src/share/classes/com/sun/net/ssl/SSLPermission.java
src/share/classes/com/sun/net/ssl/SSLPermission.java
+3
-3
src/share/classes/java/lang/RuntimePermission.java
src/share/classes/java/lang/RuntimePermission.java
+3
-3
src/share/classes/java/net/NetPermission.java
src/share/classes/java/net/NetPermission.java
+3
-3
src/share/classes/java/security/BasicPermission.java
src/share/classes/java/security/BasicPermission.java
+3
-3
src/share/classes/java/sql/SQLPermission.java
src/share/classes/java/sql/SQLPermission.java
+3
-3
src/share/classes/java/util/PropertyPermission.java
src/share/classes/java/util/PropertyPermission.java
+3
-3
src/share/classes/javax/net/ssl/SSLPermission.java
src/share/classes/javax/net/ssl/SSLPermission.java
+3
-3
test/java/security/BasicPermission/Wildcard.java
test/java/security/BasicPermission/Wildcard.java
+54
-0
未找到文件。
src/share/classes/com/sun/net/ssl/SSLPermission.java
浏览文件 @
8593a976
/*
/*
* Copyright (c) 2000, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -46,8 +46,8 @@ import java.lang.SecurityManager;
...
@@ -46,8 +46,8 @@ import java.lang.SecurityManager;
* convention follows the hierarchical property naming convention.
* convention follows the hierarchical property naming convention.
* Also, an asterisk
* Also, an asterisk
* may appear at the end of the name, following a ".", or by itself, to
* may appear at the end of the name, following a ".", or by itself, to
* signify a wildcard match. For example: "foo.*"
or "*" is valid,
* signify a wildcard match. For example: "foo.*"
and "*" signify a wildcard
*
"*foo" or "a*b" is not valid
.
*
match, while "*foo" and "a*b" do not
.
* <P>
* <P>
* The following table lists all the possible SSLPermission target names,
* The following table lists all the possible SSLPermission target names,
* and for each provides a description of what the permission allows
* and for each provides a description of what the permission allows
...
...
src/share/classes/java/lang/RuntimePermission.java
浏览文件 @
8593a976
/*
/*
* Copyright (c) 1997, 20
05
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -41,8 +41,8 @@ import java.util.StringTokenizer;
...
@@ -41,8 +41,8 @@ import java.util.StringTokenizer;
* naming convention follows the hierarchical property naming convention.
* naming convention follows the hierarchical property naming convention.
* Also, an asterisk
* Also, an asterisk
* may appear at the end of the name, following a ".", or by itself, to
* may appear at the end of the name, following a ".", or by itself, to
* signify a wildcard match. For example: "loadLibrary.*"
or "*" is valid,
* signify a wildcard match. For example: "loadLibrary.*"
and "*" signify a
*
"*loadLibrary" or "a*b" is not valid
.
*
wildcard match, while "*loadLibrary" and "a*b" do not
.
* <P>
* <P>
* The following table lists all the possible RuntimePermission target names,
* The following table lists all the possible RuntimePermission target names,
* and for each provides a description of what the permission allows
* and for each provides a description of what the permission allows
...
...
src/share/classes/java/net/NetPermission.java
浏览文件 @
8593a976
/*
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -40,8 +40,8 @@ import java.util.StringTokenizer;
...
@@ -40,8 +40,8 @@ import java.util.StringTokenizer;
* convention follows the hierarchical property naming convention.
* convention follows the hierarchical property naming convention.
* Also, an asterisk
* Also, an asterisk
* may appear at the end of the name, following a ".", or by itself, to
* may appear at the end of the name, following a ".", or by itself, to
* signify a wildcard match. For example: "foo.*"
or "*" is valid,
* signify a wildcard match. For example: "foo.*"
and "*" signify a wildcard
*
"*foo" or "a*b" is not valid
.
*
match, while "*foo" and "a*b" do not
.
* <P>
* <P>
* The following table lists all the possible NetPermission target names,
* The following table lists all the possible NetPermission target names,
* and for each provides a description of what the permission allows
* and for each provides a description of what the permission allows
...
...
src/share/classes/java/security/BasicPermission.java
浏览文件 @
8593a976
/*
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -46,8 +46,8 @@ import java.io.IOException;
...
@@ -46,8 +46,8 @@ import java.io.IOException;
* convention follows the hierarchical property naming convention.
* convention follows the hierarchical property naming convention.
* An asterisk may appear by itself, or if immediately preceded by a "."
* An asterisk may appear by itself, or if immediately preceded by a "."
* may appear at the end of the name, to signify a wildcard match.
* may appear at the end of the name, to signify a wildcard match.
* For example, "*" and "java.*"
are valid
, while "*java", "a*b",
* For example, "*" and "java.*"
signify a wildcard match
, while "*java", "a*b",
* and "java*"
are not valid
.
* and "java*"
do not
.
* <P>
* <P>
* The action string (inherited from Permission) is unused.
* The action string (inherited from Permission) is unused.
* Thus, BasicPermission is commonly used as the base class for
* Thus, BasicPermission is commonly used as the base class for
...
...
src/share/classes/java/sql/SQLPermission.java
浏览文件 @
8593a976
/*
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -49,8 +49,8 @@ import java.security.*;
...
@@ -49,8 +49,8 @@ import java.security.*;
* In addition, an asterisk
* In addition, an asterisk
* may appear at the end of the name, following a ".", or by itself, to
* may appear at the end of the name, following a ".", or by itself, to
* signify a wildcard match. For example: <code>loadLibrary.*</code>
* signify a wildcard match. For example: <code>loadLibrary.*</code>
*
or <code>*</code> is valid
,
*
and <code>*</code> signify a wildcard match
,
*
but <code>*loadLibrary</code> or <code>a*b</code> is not valid
.
*
while <code>*loadLibrary</code> and <code>a*b</code> do not
.
* <P>
* <P>
* The following table lists all the possible <code>SQLPermission</code> target names.
* The following table lists all the possible <code>SQLPermission</code> target names.
* The table gives a description of what the permission allows
* The table gives a description of what the permission allows
...
...
src/share/classes/java/util/PropertyPermission.java
浏览文件 @
8593a976
/*
/*
* Copyright (c) 1997, 20
03
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -48,8 +48,8 @@ import sun.security.util.SecurityConstants;
...
@@ -48,8 +48,8 @@ import sun.security.util.SecurityConstants;
* convention follows the hierarchical property naming convention.
* convention follows the hierarchical property naming convention.
* Also, an asterisk
* Also, an asterisk
* may appear at the end of the name, following a ".", or by itself, to
* may appear at the end of the name, following a ".", or by itself, to
* signify a wildcard match. For example: "java.*"
or "*" is valid,
* signify a wildcard match. For example: "java.*"
and "*" signify a wildcard
*
"*java" or "a*b" is not valid
.
*
match, while "*java" and "a*b" do not
.
* <P>
* <P>
* <P>
* <P>
* The actions to be granted are passed to the constructor in a string containing
* The actions to be granted are passed to the constructor in a string containing
...
...
src/share/classes/javax/net/ssl/SSLPermission.java
浏览文件 @
8593a976
/*
/*
* Copyright (c) 2000, 20
05
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -42,8 +42,8 @@ import java.lang.SecurityManager;
...
@@ -42,8 +42,8 @@ import java.lang.SecurityManager;
* convention follows the hierarchical property naming convention.
* convention follows the hierarchical property naming convention.
* Also, an asterisk
* Also, an asterisk
* may appear at the end of the name, following a ".", or by itself, to
* may appear at the end of the name, following a ".", or by itself, to
* signify a wildcard match. For example: "foo.*"
or "*" is valid,
* signify a wildcard match. For example: "foo.*"
and "*" signify a wildcard
*
"*foo" or "a*b" is not valid
.
*
match, while "*foo" and "a*b" do not
.
* <P>
* <P>
* The following table lists all the possible SSLPermission target names,
* The following table lists all the possible SSLPermission target names,
* and for each provides a description of what the permission allows
* and for each provides a description of what the permission allows
...
...
test/java/security/BasicPermission/Wildcard.java
0 → 100644
浏览文件 @
8593a976
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
java.lang.RuntimePermission
;
import
java.net.NetPermission
;
import
java.sql.SQLPermission
;
import
java.util.PropertyPermission
;
import
javax.net.ssl.SSLPermission
;
/*
* @test
* @bug 7167056
* @summary Check that BasicPermission subclasses don't throw exception if name
* contains wildcard character ("*") but does not signify a
* wildcard match
*/
public
class
Wildcard
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
wildcard
(
"*java"
);
wildcard
(
"java*"
);
wildcard
(
"ja*va"
);
}
private
static
void
wildcard
(
String
wildcard
)
throws
Exception
{
new
RuntimePermission
(
wildcard
);
new
NetPermission
(
wildcard
);
new
SQLPermission
(
wildcard
);
new
PropertyPermission
(
wildcard
,
"read"
);
new
SSLPermission
(
wildcard
);
new
com
.
sun
.
net
.
ssl
.
SSLPermission
(
wildcard
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录