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