Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
9d06e61f
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9d06e61f
编写于
2月 24, 2017
作者:
J
jwilhelm
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
965f6faa
5fe884f2
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
22 addition
and
35 deletion
+22
-35
jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java
...e/mandatory/subjectDelegation/SubjectDelegation2Test.java
+4
-19
jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java
...e/mandatory/subjectDelegation/SubjectDelegation3Test.java
+3
-15
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21
...ax/management/remote/mandatory/subjectDelegation/policy21
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22
...ax/management/remote/mandatory/subjectDelegation/policy22
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23
...ax/management/remote/mandatory/subjectDelegation/policy23
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24
...ax/management/remote/mandatory/subjectDelegation/policy24
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25
...ax/management/remote/mandatory/subjectDelegation/policy25
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31
...ax/management/remote/mandatory/subjectDelegation/policy31
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32
...ax/management/remote/mandatory/subjectDelegation/policy32
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33
...ax/management/remote/mandatory/subjectDelegation/policy33
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34
...ax/management/remote/mandatory/subjectDelegation/policy34
+1
-0
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35
...ax/management/remote/mandatory/subjectDelegation/policy35
+1
-0
jdk/test/sun/management/jdp/DynamicLauncher.java
jdk/test/sun/management/jdp/DynamicLauncher.java
+5
-0
jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java
jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java
+0
-1
未找到文件。
jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation2Test.java
浏览文件 @
9d06e61f
/*
* Copyright (c) 2005, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
7
, 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
...
...
@@ -44,7 +44,6 @@ import java.lang.management.ManagementFactory;
import
java.rmi.RemoteException
;
import
java.rmi.registry.LocateRegistry
;
import
java.rmi.registry.Registry
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.Properties
;
import
javax.management.Attribute
;
...
...
@@ -57,24 +56,11 @@ import javax.management.remote.JMXConnector;
import
javax.management.remote.JMXConnectorFactory
;
import
javax.management.remote.JMXConnectorServer
;
import
javax.management.remote.JMXConnectorServerFactory
;
import
javax.management.remote.JMXPrincipal
;
import
javax.management.remote.JMXServiceURL
;
import
javax.security.auth.Subject
;
public
class
SubjectDelegation2Test
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// Check for supported operating systems: Solaris
//
// This test runs only on Solaris due to CR 6285916
//
String
osName
=
System
.
getProperty
(
"os.name"
);
System
.
out
.
println
(
"os.name = "
+
osName
);
if
(!
osName
.
equals
(
"SunOS"
))
{
System
.
out
.
println
(
"This test runs on Solaris only."
);
System
.
out
.
println
(
"Bye! Bye!"
);
return
;
}
String
policyFile
=
args
[
0
];
String
testResult
=
args
[
1
];
System
.
out
.
println
(
"Policy file = "
+
policyFile
);
...
...
@@ -137,9 +123,8 @@ public class SubjectDelegation2Test {
// Create an RMI connector server
//
System
.
out
.
println
(
"Create an RMI connector server"
);
JMXServiceURL
url
=
new
JMXServiceURL
(
"rmi"
,
null
,
0
,
"/jndi/rmi://:"
+
port
+
"/server"
+
port
);
JMXServiceURL
url
=
new
JMXServiceURL
(
"rmi"
,
null
,
0
);
jmxcs
=
JMXConnectorServerFactory
.
newJMXConnectorServer
(
url
,
env
,
mbs
);
jmxcs
.
start
();
...
...
@@ -151,7 +136,7 @@ public class SubjectDelegation2Test {
//
String
[]
credentials
=
new
String
[]
{
"monitorRole"
,
"QED"
};
cli_env
.
put
(
"jmx.remote.credentials"
,
credentials
);
jmxc
=
JMXConnectorFactory
.
connect
(
url
,
cli_env
);
jmxc
=
JMXConnectorFactory
.
connect
(
jmxcs
.
getAddress
()
,
cli_env
);
MBeanServerConnection
mbsc
=
jmxc
.
getMBeanServerConnection
();
// Get domains from MBeanServer
//
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation3Test.java
浏览文件 @
9d06e61f
/*
* Copyright (c) 2005, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
7
, 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
...
...
@@ -65,17 +65,6 @@ import javax.security.auth.Subject;
public
class
SubjectDelegation3Test
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// Check for supported operating systems: Solaris
//
// This test runs only on Solaris due to CR 6285916
//
String
osName
=
System
.
getProperty
(
"os.name"
);
System
.
out
.
println
(
"os.name = "
+
osName
);
if
(!
osName
.
equals
(
"SunOS"
))
{
System
.
out
.
println
(
"This test runs on Solaris only."
);
System
.
out
.
println
(
"Bye! Bye!"
);
return
;
}
String
policyFile
=
args
[
0
];
String
testResult
=
args
[
1
];
System
.
out
.
println
(
"Policy file = "
+
policyFile
);
...
...
@@ -139,8 +128,7 @@ public class SubjectDelegation3Test {
//
System
.
out
.
println
(
"Create an RMI connector server"
);
JMXServiceURL
url
=
new
JMXServiceURL
(
"rmi"
,
null
,
0
,
"/jndi/rmi://:"
+
port
+
"/server"
+
port
);
new
JMXServiceURL
(
"rmi"
,
null
,
0
);
jmxcs
=
JMXConnectorServerFactory
.
newJMXConnectorServer
(
url
,
env
,
mbs
);
jmxcs
.
start
();
...
...
@@ -152,7 +140,7 @@ public class SubjectDelegation3Test {
//
String
[]
credentials
=
new
String
[]
{
"monitorRole"
,
"QED"
};
cli_env
.
put
(
"jmx.remote.credentials"
,
credentials
);
jmxc
=
JMXConnectorFactory
.
connect
(
url
,
cli_env
);
jmxc
=
JMXConnectorFactory
.
connect
(
jmxcs
.
getAddress
()
,
cli_env
);
Subject
delegationSubject
=
new
Subject
(
true
,
Collections
.
singleton
(
new
JMXPrincipal
(
"delegate"
)),
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21
浏览文件 @
9d06e61f
...
...
@@ -2,6 +2,7 @@ grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.security.SecurityPermission "createAccessControlContext";
permission java.lang.RuntimePermission "*";
permission javax.management.MBeanPermission "*", "getDomains";
permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute";
permission javax.security.auth.AuthPermission "getSubject";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.lang.RuntimePermission "*";
permission java.security.SecurityPermission "createAccessControlContext";
// permission javax.management.MBeanPermission "*", "getDomains";
permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.lang.RuntimePermission "*";
permission java.security.SecurityPermission "createAccessControlContext";
permission javax.management.MBeanPermission "*", "getDomains";
permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.lang.RuntimePermission "*";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.security.SecurityPermission "createAccessControlContext";
permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.lang.RuntimePermission "*";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.security.SecurityPermission "createAccessControlContext";
permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.lang.RuntimePermission "*";
permission java.security.SecurityPermission "createAccessControlContext";
permission javax.management.MBeanPermission "*", "getDomains";
permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.lang.RuntimePermission "*";
permission java.security.SecurityPermission "createAccessControlContext";
// permission javax.management.MBeanPermission "*", "getDomains";
permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.lang.RuntimePermission "*";
permission java.security.SecurityPermission "createAccessControlContext";
permission javax.management.MBeanPermission "*", "getDomains";
permission javax.management.MBeanPermission "SimpleStandard#State[MBeans:type=SimpleStandard]", "getAttribute";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.lang.RuntimePermission "*";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.security.SecurityPermission "createAccessControlContext";
permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole";
...
...
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35
浏览文件 @
9d06e61f
grant codebase "file:/-" {
permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
permission java.lang.RuntimePermission "*";
permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
permission java.security.SecurityPermission "createAccessControlContext";
permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole";
...
...
jdk/test/sun/management/jdp/DynamicLauncher.java
浏览文件 @
9d06e61f
...
...
@@ -58,6 +58,11 @@ public abstract class DynamicLauncher {
}
}
}
while
(
tryAgain
);
output
.
shouldHaveExitValue
(
0
);
// java.lang.Exception is thrown by JdpTestCase if something goes wrong
// for instance - see JdpTestCase::shutdown()
output
.
shouldNotContain
(
"java.lang.Exception:"
);
output
.
shouldNotContain
(
"Error: Could not find or load main class"
);
}
protected
OutputAnalyzer
runVM
()
throws
Exception
{
...
...
jdk/test/sun/management/jdp/JdpJmxRemoteDynamicPortTest.java
浏览文件 @
9d06e61f
...
...
@@ -40,7 +40,6 @@ public class JdpJmxRemoteDynamicPortTest extends DynamicLauncher {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
DynamicLauncher
launcher
=
new
JdpJmxRemoteDynamicPortTest
();
launcher
.
run
();
launcher
.
getProcessOutpoutAnalyzer
().
stderrShouldNotContain
(
"java.lang.Exception:"
);
}
protected
String
[]
options
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录