diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-process/src/main/java/org/sonar/process/SecurityManagement.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/SecurityManagement.java b/server/sonar-process/src/main/java/org/sonar/process/SecurityManagement.java index 7a2d32f4fc5..6c7c72f5bfe 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/SecurityManagement.java +++ b/server/sonar-process/src/main/java/org/sonar/process/SecurityManagement.java @@ -25,6 +25,7 @@ import java.security.PermissionCollection; import java.security.Permissions; import java.security.Policy; import java.security.ProtectionDomain; +import java.security.Security; import java.security.SecurityPermission; import java.util.Arrays; import java.util.HashSet; @@ -39,6 +40,8 @@ public class SecurityManagement { SecurityManager sm = new SecurityManager(); Policy.setPolicy(new CustomPolicy()); System.setSecurityManager(sm); + // SONAR-14870 By default, with a security manager installed, the DNS cache never times out. See InetAddressCachePolicy. + Security.setProperty("networkaddress.cache.ttl", "30"); } static class CustomPolicy extends Policy { |