Blame SOURCES/jdk8275535-rh2053256-ldap_auth.patch
|
|
53c576 |
diff --git openjdk.orig/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java openjdk/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java
|
|
|
53c576 |
index cf4becb7db..4ab2ac0a31 100644
|
|
|
53c576 |
--- openjdk.orig/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java
|
|
|
53c576 |
+++ openjdk/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java
|
|
|
53c576 |
@@ -189,6 +189,10 @@ final public class LdapCtxFactory implements ObjectFactory, InitialContextFactor
|
|
|
53c576 |
ctx = getLdapCtxFromUrl(
|
|
|
53c576 |
r.getDomainName(), url, new LdapURL(u), env);
|
|
|
53c576 |
return ctx;
|
|
|
53c576 |
+ } catch (AuthenticationException e) {
|
|
|
53c576 |
+ // do not retry on a different endpoint to avoid blocking
|
|
|
53c576 |
+ // the user if authentication credentials are wrong.
|
|
|
53c576 |
+ throw e;
|
|
|
53c576 |
} catch (NamingException e) {
|
|
|
53c576 |
// try the next element
|
|
|
53c576 |
lastException = e;
|
|
|
53c576 |
@@ -241,6 +245,10 @@ final public class LdapCtxFactory implements ObjectFactory, InitialContextFactor
|
|
|
53c576 |
for (String u : urls) {
|
|
|
53c576 |
try {
|
|
|
53c576 |
return getUsingURL(u, env);
|
|
|
53c576 |
+ } catch (AuthenticationException e) {
|
|
|
53c576 |
+ // do not retry on a different URL to avoid blocking
|
|
|
53c576 |
+ // the user if authentication credentials are wrong.
|
|
|
53c576 |
+ throw e;
|
|
|
53c576 |
} catch (NamingException e) {
|
|
|
53c576 |
ex = e;
|
|
|
53c576 |
}
|