< prev index next >

src/java.security.jgss/share/classes/sun/security/krb5/Config.java

Print this page

        

*** 43,52 **** --- 43,53 ---- import java.security.PrivilegedExceptionAction; import java.util.regex.Matcher; import java.util.regex.Pattern; import sun.net.dns.ResolverConfiguration; + import sun.security.action.GetIntegerAction; import sun.security.action.GetPropertyAction; import sun.security.krb5.internal.crypto.EType; import sun.security.krb5.internal.Krb5; /**
*** 54,63 **** --- 55,87 ---- * from configuration file or from user specified system properties. */ public class Config { + public static final boolean DISABLE_REFERRALS; + + /** + * {@systemProperty sun.security.krb5.disableReferrals} property + * indicating whether or not cross-realm referrals (RFC 6806) are + * enabled. + */ + static { + PrivilegedAction<String> getDisableReferralsProp = + () -> System.getProperty( + "sun.security.krb5.disableReferrals", "false"); + DISABLE_REFERRALS = "true".equalsIgnoreCase( + AccessController.doPrivileged(getDisableReferralsProp)); + } + + /** + * {@systemProperty sun.security.krb5.maxReferrals} property + * indicating the maximum number of cross-realm referral + * hops allowed. + */ + public static final int MAX_REFERRALS = GetIntegerAction + .privilegedGetProperty("sun.security.krb5.maxReferrals", 5); + /* * Only allow a single instance of Config. */ private static Config singleton = null;
< prev index next >