8308872: enhance logging and some exception in krb5/Config.java
Reviewed-by: weijun
This commit is contained in:
parent
024d9b131d
commit
70670b4af6
@ -671,6 +671,9 @@ public class Config {
|
||||
private List<String> loadConfigFile(final String fileName)
|
||||
throws IOException, KrbException {
|
||||
|
||||
if (DEBUG) {
|
||||
System.out.println("Loading config file from " + fileName);
|
||||
}
|
||||
List<String> result = new ArrayList<>();
|
||||
List<String> raw = new ArrayList<>();
|
||||
Set<Path> dupsCheck = new HashSet<>();
|
||||
@ -781,6 +784,9 @@ public class Config {
|
||||
throws KrbException {
|
||||
Hashtable<String,Object> current = stanzaTable;
|
||||
for (String line: v) {
|
||||
if (DEBUG) {
|
||||
System.out.println(line);
|
||||
}
|
||||
// There are only 3 kinds of lines
|
||||
// 1. a = b
|
||||
// 2. a = {
|
||||
@ -979,16 +985,22 @@ public class Config {
|
||||
String default_enctypes;
|
||||
default_enctypes = get("libdefaults", configName);
|
||||
if (default_enctypes == null && !configName.equals("permitted_enctypes")) {
|
||||
if (DEBUG) {
|
||||
System.out.println("Getting permitted_enctypes from libdefaults");
|
||||
}
|
||||
default_enctypes = get("libdefaults", "permitted_enctypes");
|
||||
}
|
||||
int[] etype;
|
||||
if (default_enctypes == null) {
|
||||
if (DEBUG) {
|
||||
System.out.println("Using builtin default etypes for " +
|
||||
System.out.println("default_enctypes were null, using builtin default etypes for configuration " +
|
||||
configName);
|
||||
}
|
||||
etype = EType.getBuiltInDefaults();
|
||||
} else {
|
||||
if (DEBUG) {
|
||||
System.out.println("default_enctypes:" + default_enctypes);
|
||||
}
|
||||
String delim = " ";
|
||||
StringTokenizer st;
|
||||
for (int j = 0; j < default_enctypes.length(); j++) {
|
||||
@ -1010,7 +1022,8 @@ public class Config {
|
||||
}
|
||||
}
|
||||
if (ls.isEmpty()) {
|
||||
throw new KrbException("no supported default etypes for "
|
||||
throw new KrbException("out of " + len +
|
||||
" default etypes no supported etypes found for configuration "
|
||||
+ configName);
|
||||
} else {
|
||||
etype = new int[ls.size()];
|
||||
|
Loading…
x
Reference in New Issue
Block a user