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.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1379039 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-08-30 17:56:15 +00:00
parent d7120c7e43
commit 4b3df5d661
1 changed files with 13 additions and 1 deletions

View File

@ -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 anywhere
permission 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 "*";