Skip to content

Commit 145e10b

Browse files
committed
gss: set krb5 debug mode according to sun.security.krb5.debug property
When jvm option sun.security.krb5.debug is set, the auto-generated JAAS configuration should be adjusted accordingly. Acked-by: Paul Millar Target: master
1 parent 44005ba commit 145e10b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

oncrpc4j-core/src/main/java/org/dcache/oncrpc4j/rpc/gss/JaasConfigGenerator.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009 - 2018 Deutsches Elektronen-Synchroton,
2+
* Copyright (c) 2009 - 2019 Deutsches Elektronen-Synchroton,
33
* Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
44
*
55
* This library is free software; you can redistribute it and/or modify
@@ -42,9 +42,11 @@ class JaasConfigGenerator {
4242
private static final FileAttribute<Set<PosixFilePermission>> OWNER_RW =
4343
PosixFilePermissions.asFileAttribute(EnumSet.of(OWNER_READ, OWNER_WRITE));
4444

45+
private final static String KRB5_DEBUG = System.getProperty("sun.security.krb5.debug", "false");
46+
4547
private final static String JAAS_CONFIG_TEMPLATE = "com.sun.security.jgss.accept {\n"
4648
+ " com.sun.security.auth.module.Krb5LoginModule required\n"
47-
+ " debug=false\n"
49+
+ " debug=" + KRB5_DEBUG + "\n"
4850
+ " principal=\"%s\"\n"
4951
+ " doNotPrompt=true\n"
5052
+ " useKeyTab=true\n"

0 commit comments

Comments
 (0)