Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
68fae39f
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看板
提交
68fae39f
编写于
8月 01, 2017
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
7cafd2e1
a5d5458f
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
82 addition
and
32 deletion
+82
-32
.hgtags
.hgtags
+1
-0
src/share/classes/sun/net/ftp/impl/FtpClient.java
src/share/classes/sun/net/ftp/impl/FtpClient.java
+2
-2
src/share/classes/sun/rmi/transport/Target.java
src/share/classes/sun/rmi/transport/Target.java
+11
-22
src/share/classes/sun/security/krb5/KrbAsRep.java
src/share/classes/sun/security/krb5/KrbAsRep.java
+2
-2
src/share/classes/sun/security/krb5/KrbTgsRep.java
src/share/classes/sun/security/krb5/KrbTgsRep.java
+2
-2
src/share/classes/sun/security/provider/certpath/ResponderId.java
...e/classes/sun/security/provider/certpath/ResponderId.java
+1
-1
src/share/classes/sun/security/util/ConstraintsParameters.java
...hare/classes/sun/security/util/ConstraintsParameters.java
+1
-1
test/sun/security/krb5/auto/KDC.java
test/sun/security/krb5/auto/KDC.java
+4
-2
test/sun/security/krb5/auto/TicketSName.java
test/sun/security/krb5/auto/TicketSName.java
+58
-0
未找到文件。
.hgtags
浏览文件 @
68fae39f
...
...
@@ -719,6 +719,7 @@ bd40efd56b4544ff9048d2f7be4cf108b281a6f3 jdk8u151-b02
27273bbb711a402efe5fcd332003ba419102f662 jdk8u151-b04
0efdf2c7a21464e5f3d89474ffdfe81db61031fd jdk8u151-b05
c6c870e267de694bc85dc4af23a648824063f95b jdk8u151-b06
84b0fbbfb8d664031a9f5283f79b13b98714cc7f jdk8u151-b07
1442bc728814af451e2dd1a6719a64485d27e3a0 jdk8u122-b00
f6030acfa5aec0e64d45adfac69b9e7e5c12bc74 jdk8u122-b01
6b072c3a6db7ab06804c91aab77431799dfb5d47 jdk8u122-b02
...
...
src/share/classes/sun/net/ftp/impl/FtpClient.java
浏览文件 @
68fae39f
...
...
@@ -116,8 +116,8 @@ public class FtpClient extends sun.net.ftp.FtpClient {
new
PrivilegedAction
<
Object
>()
{
public
Object
run
()
{
vals
[
0
]
=
Integer
.
getInteger
(
"sun.net.client.defaultReadTimeout"
,
0
).
intValue
();
vals
[
1
]
=
Integer
.
getInteger
(
"sun.net.client.defaultConnectTimeout"
,
0
).
intValue
();
vals
[
0
]
=
Integer
.
getInteger
(
"sun.net.client.defaultReadTimeout"
,
300_00
0
).
intValue
();
vals
[
1
]
=
Integer
.
getInteger
(
"sun.net.client.defaultConnectTimeout"
,
300_00
0
).
intValue
();
encs
[
0
]
=
System
.
getProperty
(
"file.encoding"
,
"ISO8859_1"
);
return
null
;
}
...
...
src/share/classes/sun/rmi/transport/Target.java
浏览文件 @
68fae39f
/*
* Copyright (c) 1996, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 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
...
...
@@ -31,6 +31,7 @@ import java.rmi.server.ObjID;
import
java.rmi.server.Unreferenced
;
import
java.security.AccessControlContext
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.util.*
;
import
sun.rmi.runtime.Log
;
import
sun.rmi.runtime.NewThreadAction
;
...
...
@@ -322,27 +323,15 @@ public final class Target {
Remote
obj
=
getImpl
();
if
(
obj
instanceof
Unreferenced
)
{
final
Unreferenced
unrefObj
=
(
Unreferenced
)
obj
;
final
Thread
t
=
java
.
security
.
AccessController
.
doPrivileged
(
new
NewThreadAction
(
new
Runnable
()
{
public
void
run
()
{
unrefObj
.
unreferenced
();
}
},
"Unreferenced-"
+
nextThreadNum
++,
false
,
true
));
// REMIND: access to nextThreadNum not synchronized; you care?
/*
* We must manually set the context class loader appropriately
* for threads that may invoke user code (see bugid 4171278).
*/
java
.
security
.
AccessController
.
doPrivileged
(
new
java
.
security
.
PrivilegedAction
<
Void
>()
{
public
Void
run
()
{
t
.
setContextClassLoader
(
ccl
);
return
null
;
}
});
t
.
start
();
AccessController
.
doPrivileged
(
new
NewThreadAction
(()
->
{
Thread
.
currentThread
().
setContextClassLoader
(
ccl
);
AccessController
.
doPrivileged
((
PrivilegedAction
<
Void
>)
()
->
{
unrefObj
.
unreferenced
();
return
null
;
},
acc
);
},
"Unreferenced-"
+
nextThreadNum
++,
false
,
true
)).
start
();
// REMIND: access to nextThreadNum not synchronized; you care?
}
unpinImpl
();
...
...
src/share/classes/sun/security/krb5/KrbAsRep.java
浏览文件 @
68fae39f
/*
* Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 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
...
...
@@ -160,7 +160,7 @@ class KrbAsRep extends KrbKdcRep {
creds
=
new
Credentials
(
rep
.
ticket
,
req
.
reqBody
.
cname
,
rep
.
ticke
t
.
sname
,
enc_par
t
.
sname
,
enc_part
.
key
,
enc_part
.
flags
,
enc_part
.
authtime
,
...
...
src/share/classes/sun/security/krb5/KrbTgsRep.java
浏览文件 @
68fae39f
/*
* Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 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
...
...
@@ -88,7 +88,7 @@ public class KrbTgsRep extends KrbKdcRep {
this
.
creds
=
new
Credentials
(
rep
.
ticket
,
rep
.
cname
,
rep
.
ticke
t
.
sname
,
enc_par
t
.
sname
,
enc_part
.
key
,
enc_part
.
flags
,
enc_part
.
authtime
,
...
...
src/share/classes/sun/security/provider/certpath/ResponderId.java
浏览文件 @
68fae39f
/*
* Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2017
,
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
...
...
src/share/classes/sun/security/util/ConstraintsParameters.java
浏览文件 @
68fae39f
/*
* Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017
,
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
...
...
test/sun/security/krb5/auto/KDC.java
浏览文件 @
68fae39f
/*
* Copyright (c) 2008, 201
5
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 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
...
...
@@ -808,7 +808,9 @@ public class KDC {
throw
new
KrbException
(
Krb5
.
KDC_ERR_SUMTYPE_NOSUPP
);
// TODO
}
Ticket
t
=
new
Ticket
(
service
,
System
.
getProperty
(
"test.kdc.diff.sname"
)
!=
null
?
new
PrincipalName
(
"xx"
+
service
.
toString
())
:
service
,
new
EncryptedData
(
skey
,
enc
.
asn1Encode
(),
KeyUsage
.
KU_TICKET
)
);
EncTGSRepPart
enc_part
=
new
EncTGSRepPart
(
...
...
test/sun/security/krb5/auto/TicketSName.java
0 → 100644
浏览文件 @
68fae39f
/*
* Copyright (c) 2017, 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.
*/
/*
* @test
* @bug 8178794
* @summary krb5 client should ignore sname in incoming tickets
* @compile -XDignore.symbol.file TicketSName.java
* @run main/othervm -Dtest.kdc.diff.sname TicketSName
*/
import
sun.security.jgss.GSSUtil
;
import
javax.security.auth.kerberos.KerberosTicket
;
public
class
TicketSName
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
new
OneKDC
(
null
).
writeJAASConf
();
Context
c
,
s
;
c
=
Context
.
fromJAAS
(
"client"
);
s
=
Context
.
fromJAAS
(
"server"
);
c
.
startAsClient
(
OneKDC
.
SERVER
,
GSSUtil
.
GSS_KRB5_MECH_OID
);
s
.
startAsServer
(
GSSUtil
.
GSS_KRB5_MECH_OID
);
Context
.
handshake
(
c
,
s
);
String
expected
=
OneKDC
.
SERVER
+
"@"
+
OneKDC
.
REALM
;
if
(!
c
.
s
().
getPrivateCredentials
(
KerberosTicket
.
class
)
.
stream
()
.
anyMatch
(
t
->
t
.
getServer
().
toString
().
equals
(
expected
)))
{
c
.
status
();
throw
new
Exception
(
"no "
+
expected
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录