Apache Solr open-source search software
LUCENE-4337: Add a workaround for lucene.zones.apache.org's broken network configuration, also fix other possible misconfigurations of /etc/hosts: Solr sometimes connects to localhost, sometimes to 127.0.0.1, which may be different addresses.
Uwe Schindler4b3df5d6619b
diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policyindex 8264f31a589..f22126474d3 100644--- a/lucene/tools/junit4/tests.policy+++ b/lucene/tools/junit4/tests.policy@@ -23,11 +23,23 @@// PLEASE NOTE: You may need to enable other permissions when new tests are added,// everything not allowed here is forbidden!-grant {+grant {+ // permissions for file access, write access only to sandbox:permission java.io.FilePermission "<<ALL FILES>>", "read,execute";permission java.io.FilePermission "${tests.sandbox.dir}${/}-", "read,execute,write,delete";++ // all possibilities of accepting/binding connections on localhost with ports >=1024:permission java.net.SocketPermission "localhost:1024-", "accept,listen";+ permission java.net.SocketPermission "127.0.0.1:1024-", "accept,listen";+ permission java.net.SocketPermission "[::1]:1024-", "accept,listen";++ // This is a special case, because the network config of the Jenkins server is broken (INFRA-issue):+ permission java.net.SocketPermission "lucene.zones.apache.org:1024-", "accept,listen";++ // Allow connecting to the internet anywherepermission java.net.SocketPermission "*", "connect,resolve";++ // Basic permissions needed for Lucene to work:permission java.util.PropertyPermission "*", "read,write";permission java.lang.reflect.ReflectPermission "*";permission java.lang.RuntimePermission "*";