Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
6de8daee
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看板
提交
6de8daee
编写于
4月 24, 2017
作者:
A
aefimov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8176067: Proper directory lookup processing
Reviewed-by: weijun
上级
b4069b63
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
8 deletion
+28
-8
src/share/classes/com/sun/jndi/ldap/LdapClient.java
src/share/classes/com/sun/jndi/ldap/LdapClient.java
+2
-1
src/share/classes/com/sun/jndi/ldap/LdapCtx.java
src/share/classes/com/sun/jndi/ldap/LdapCtx.java
+21
-3
src/share/classes/com/sun/jndi/ldap/LdapReferralException.java
...hare/classes/com/sun/jndi/ldap/LdapReferralException.java
+3
-2
src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java
...es/sun/security/provider/certpath/ldap/LDAPCertStore.java
+2
-2
未找到文件。
src/share/classes/com/sun/jndi/ldap/LdapClient.java
浏览文件 @
6de8daee
/*
* Copyright (c) 1999, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
...
...
@@ -1233,6 +1233,7 @@ public final class LdapClient implements PooledConnection {
static
final
int
LDAP_REF_FOLLOW
=
0x01
;
// follow referrals
static
final
int
LDAP_REF_THROW
=
0x02
;
// throw referral ex.
static
final
int
LDAP_REF_IGNORE
=
0x03
;
// ignore referrals
static
final
int
LDAP_REF_FOLLOW_SCHEME
=
0x04
;
// follow referrals of the same scheme
static
final
String
LDAP_URL
=
"ldap://"
;
// LDAPv3
static
final
String
LDAPS_URL
=
"ldaps://"
;
// LDAPv3
...
...
src/share/classes/com/sun/jndi/ldap/LdapCtx.java
浏览文件 @
6de8daee
/*
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
...
...
@@ -2413,6 +2413,9 @@ final public class LdapCtx extends ComponentDirContext
// First determine the referral mode
if
(
ref
!=
null
)
{
switch
(
ref
)
{
case
"follow-scheme"
:
handleReferrals
=
LdapClient
.
LDAP_REF_FOLLOW_SCHEME
;
break
;
case
"follow"
:
handleReferrals
=
LdapClient
.
LDAP_REF_FOLLOW
;
break
;
...
...
@@ -2975,8 +2978,23 @@ final public class LdapCtx extends ComponentDirContext
r
=
new
LdapReferralException
(
resolvedName
,
resolvedObj
,
remainName
,
msg
,
envprops
,
fullDN
,
handleReferrals
,
reqCtls
);
// only one set of URLs is present
r
.
setReferralInfo
(
res
.
referrals
==
null
?
null
:
res
.
referrals
.
elementAt
(
0
),
false
);
Vector
<
String
>
refs
;
if
(
res
.
referrals
==
null
)
{
refs
=
null
;
}
else
if
(
handleReferrals
==
LdapClient
.
LDAP_REF_FOLLOW_SCHEME
)
{
refs
=
new
Vector
<>();
for
(
String
s
:
res
.
referrals
.
elementAt
(
0
))
{
if
(
s
.
startsWith
(
"ldap:"
))
{
refs
.
add
(
s
);
}
}
if
(
refs
.
isEmpty
())
{
refs
=
null
;
}
}
else
{
refs
=
res
.
referrals
.
elementAt
(
0
);
}
r
.
setReferralInfo
(
refs
,
false
);
if
(
hopCount
>
1
)
{
r
.
setHopCount
(
hopCount
);
...
...
src/share/classes/com/sun/jndi/ldap/LdapReferralException.java
浏览文件 @
6de8daee
/*
* Copyright (c) 1999, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
...
...
@@ -117,7 +117,8 @@ final public class LdapReferralException extends
// If following referral, request controls are passed to referral ctx
this
.
reqCtls
=
(
handleReferrals
==
LdapClient
.
LDAP_REF_FOLLOW
?
reqCtls
:
null
);
(
handleReferrals
==
LdapClient
.
LDAP_REF_FOLLOW
||
handleReferrals
==
LdapClient
.
LDAP_REF_FOLLOW_SCHEME
?
reqCtls
:
null
);
}
/**
...
...
src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java
浏览文件 @
6de8daee
/*
* Copyright (c) 2000, 201
3
, 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
...
...
@@ -265,7 +265,7 @@ public final class LDAPCertStore extends CertStoreSpi {
*/
Hashtable
<?,?>
currentEnv
=
ctx
.
getEnvironment
();
if
(
currentEnv
.
get
(
Context
.
REFERRAL
)
==
null
)
{
ctx
.
addToEnvironment
(
Context
.
REFERRAL
,
"follow"
);
ctx
.
addToEnvironment
(
Context
.
REFERRAL
,
"follow
-scheme
"
);
}
}
catch
(
NamingException
e
)
{
if
(
debug
!=
null
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录