Author: djd
Date: Fri Jan 13 14:59:50 2006
New Revision: 368903
URL: http://svn.apache.org/viewcvs?rev=368903&view=rev
Log:
DERBY-615 Enable Junit tests under the SecurityManager.
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/default_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/default_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/default_app.properties?rev=368903&r1=368902&r2=368903&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/default_app.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/lang/default_app.properties
Fri Jan 13 14:59:50 2006
@@ -18,7 +18,6 @@
# a file <testname>_app.properties to be used instead of this file.
#
#
-noSecurityManager=true
ij.database=jdbc:derby:wombat;create=true
ij.protocol=jdbc:derby:
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy?rev=368903&r1=368902&r2=368903&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
Fri Jan 13 14:59:50 2006
@@ -149,7 +149,7 @@
permission java.net.SocketPermission "localhost", "accept,connect,resolve";
permission java.net.SocketPermission "${csinfo.serverhost}", "accept";
permission java.net.SocketPermission "${csinfo.trustedhost}", "accept";
-
+
// Access all files under ${user.dir}to write the test directory structure
permission java.io.FilePermission "${user.dir}${/}-", "read,write,delete";
@@ -173,6 +173,19 @@
// lang/errorStream.java
permission java.lang.RuntimePermission "setIO";
+};
+
+// JUnit jar file tries to read junit.properties in the user's
+// home directory and seems to require permission to read the
+// property user.home as well.
+// Ideally these would be granted to junit.jar only but currently
+// the jar may be anyway on a file system. Could expand the test harness
+// to look for junit.jar on the classpath as it done for the Derby jars.
+// The exposure in making these properties grantable to all is somewhat low,
+// though reading the property user.home is a little troubling.
+grant {
+ permission java.util.PropertyPermission "user.home", "read";
+ permission java.io.FilePermission "${user.home}${/}junit.properties", "read";
};
|