You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2006/01/24 05:15:53 UTC
svn commit: r371800 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests:
tests/derbynet/ util/
Author: djd
Date: Mon Jan 23 20:15:44 2006
New Revision: 371800
URL: http://svn.apache.org/viewcvs?rev=371800&view=rev
Log:
DERBY-615 Enable some tests in derbynet to run with the security manager
with derby's client and identify those others which cannot run with a security manager.
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/default_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/maxthreads_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/runtimeinfo_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testconnection_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testij_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/timeslice_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/derbynet/DerbyNetAutoStart_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStart_app.properties Mon Jan 23 20:15:44 2006
@@ -1,5 +1,9 @@
startServer=false
-# disable security manager for now - needs investigating
+#exclude with SecurityManager
+# test execs another jvm with a relative path that means
+# the permission FilePermission("<<ALL FILES>>","execute")
+# would be required. Don't want to grant such a wide permission
+# to the testing jar.
noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetNewServer_app.properties Mon Jan 23 20:15:44 2006
@@ -4,5 +4,5 @@
startServer=false
# disable security manager for now - needs investigating
-noSecurityManager=true
+noSecurityManager=false
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM.java?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM.java Mon Jan 23 20:15:44 2006
@@ -29,8 +29,7 @@
public class NSinSameJVM {
private static final int NETWORKSERVER_PORT = 20000;
- private static final String INVALID_HOSTNAME = "myhost.nowhere.ibm.com";
- private String databaseFileName = "NSinSameJVMTestDB;create=true";
+ private String databaseFileName = "NSinSameJVMTestDB;create=true";
public NSinSameJVM() {
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_app.properties Mon Jan 23 20:15:44 2006
@@ -2,7 +2,4 @@
#It will be started in test
startServer=false
-# disable security manager for now - needs investigating
-noSecurityManager=true
-
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net_app.properties Mon Jan 23 20:15:44 2006
@@ -1,31 +1,7 @@
-#
-# This is the default system properties file for SQL and JAVA tests.
-#
-# *** DO NOT PUT PROPERTIES FOR THE DERBY SYSTEM IN THIS FILE.
-# *** THEY BELONG IN default_derby.properties.
-#
-# This file will get handed to the test on the command line in a -p <filename>
-# argument.
-#
-# This causes ij to load the driver and make an
-# initial connection to the database.
-#
-# The .java test has to call util.getPropertyArg and util.startJBMS
-# to process the property file. See any of the .java tests for this code.
-#
-# If you want to alter these to use a different driver, connect to a different
-# database, or to not be used, override this file by creating
-# a file <testname>_app.properties to be used instead of this file.
-#
-#
startServer=false
-database=wombat;create=true
-derby.optimizer.noTimeout=true
ij.defaultResourcePackage=/org/apache/derbyTesting/functionTests/tests/lang/
ij.showNoConnectionsAtStart=true
ij.showNoCountForSelect=true
-# disable security manager for now - needs investigating
-noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/default_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/default_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/default_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/default_app.properties Mon Jan 23 20:15:44 2006
@@ -18,7 +18,6 @@
# a file <testname>_app.properties to be used instead of this file.
#
database=jdbc:derby:wombat;create=true
-derby.optimizer.noTimeout=true
ij.showNoConnectionsAtStart=true
ij.showNoCountForSelect=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/getCurrentProperties_app.properties Mon Jan 23 20:15:44 2006
@@ -1,4 +1,2 @@
usedefaults=true
-# disable security manager for now - needs investigating
-noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/maxthreads_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/maxthreads_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/maxthreads_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/maxthreads_app.properties Mon Jan 23 20:15:44 2006
@@ -1,5 +1,9 @@
usedefaults=true
-# disable security manager for now - needs investigating
+#exclude with SecurityManager
+# test execs another jvm with a relative path that means
+# the permission FilePermission("<<ALL FILES>>","execute")
+# would be required. Don't want to grant such a wide permission
+# to the testing jar.
noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/runtimeinfo_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/runtimeinfo_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/runtimeinfo_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/runtimeinfo_app.properties Mon Jan 23 20:15:44 2006
@@ -1,5 +1,9 @@
usedefaults=true
-# disable security manager for now - needs investigating
+#exclude with SecurityManager
+# test execs another jvm with a relative path that means
+# the permission FilePermission("<<ALL FILES>>","execute")
+# would be required. Don't want to grant such a wide permission
+# to the testing jar.
noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_app.properties Mon Jan 23 20:15:44 2006
@@ -1,5 +1,9 @@
usedefaults=true
-# disable security manager for now - needs investigating
+#exclude with SecurityManager
+# test execs another jvm with a relative path that means
+# the permission FilePermission("<<ALL FILES>>","execute")
+# would be required. Don't want to grant such a wide permission
+# to the testing jar.
noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_app.properties Mon Jan 23 20:15:44 2006
@@ -1,5 +1,9 @@
usedefaults=true
-# disable security manager for now - needs investigating
+#exclude with SecurityManager
+# test execs another jvm with a relative path that means
+# the permission FilePermission("<<ALL FILES>>","execute")
+# would be required. Don't want to grant such a wide permission
+# to the testing jar.
noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec_app.properties Mon Jan 23 20:15:44 2006
@@ -1,30 +1,9 @@
-#
-# This is the default system properties file for SQL and JAVA tests.
-#
-# *** DO NOT PUT PROPERTIES FOR THE DERBY SYSTEM IN THIS FILE.
-# *** THEY BELONG IN default_derby.properties.
-#
-# This file will get handed to the test on the command line in a -p <filename>
-# argument.
-#
-# This causes ij to load the driver and make an
-# initial connection to the database.
-#
-# The .java test has to call util.getPropertyArg and util.startJBMS
-# to process the property file. See any of the .java tests for this code.
-#
-# If you want to alter these to use a different driver, connect to a different
-# database, or to not be used, override this file by creating
-# a file <testname>_app.properties to be used instead of this file.
-#
-#
+
startServer=false
database=wombat;create=true
-derby.optimizer.noTimeout=true
+
ij.defaultResourcePackage=/org/apache/derbyTesting/functionTests/tests/lang/
ij.showNoConnectionsAtStart=true
ij.showNoCountForSelect=true
-# disable security manager for now - needs investigating
-noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testconnection_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testconnection_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testconnection_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testconnection_app.properties Mon Jan 23 20:15:44 2006
@@ -1,5 +1,9 @@
usedefaults=true
-# disable security manager for now - needs investigating
+#exclude with SecurityManager
+# test execs another jvm with a relative path that means
+# the permission FilePermission("<<ALL FILES>>","execute")
+# would be required. Don't want to grant such a wide permission
+# to the testing jar.
noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testij_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testij_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testij_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testij_app.properties Mon Jan 23 20:15:44 2006
@@ -1,24 +1,4 @@
-#
-# This is the default system properties file for SQL and JAVA tests.
-#
-# *** DO NOT PUT PROPERTIES FOR THE DERBY SYSTEM IN THIS FILE.
-# *** THEY BELONG IN default_derby.properties.
-#
-# This file will get handed to the test on the command line in a -p <filename>
-# argument.
-#
-# This causes ij to load the driver and make an
-# initial connection to the database.
-#
-# The .java test has to call util.getPropertyArg and util.startJBMS
-# to process the property file. See any of the .java tests for this code.
-#
-# If you want to alter these to use a different driver, connect to a different
-# database, or to not be used, override this file by creating
-# a file <testname>_app.properties to be used instead of this file.
-#
-#
-derby.optimizer.noTimeout=true
+
supportfiles=tests/derbynet/testij.sql,tests/derbynet/testclientij.sql
useextdirs=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/timeslice_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/timeslice_app.properties?rev=371800&r1=371799&r2=371800&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/timeslice_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/timeslice_app.properties Mon Jan 23 20:15:44 2006
@@ -1,5 +1,9 @@
usedefaults=true
-# disable security manager for now - needs investigating
+#exclude with SecurityManager
+# test execs another jvm with a relative path that means
+# the permission FilePermission("<<ALL FILES>>","execute")
+# would be required. Don't want to grant such a wide permission
+# to the testing jar.
noSecurityManager=true
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=371800&r1=371799&r2=371800&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 Mon Jan 23 20:15:44 2006
@@ -58,10 +58,17 @@
// Permissions for the network server (derbynet.jar)
//
grant codeBase "${csinfo.codejar}derbynet.jar" {
- permission java.net.SocketPermission "127.0.0.1", "accept";
- permission java.net.SocketPermission "localhost", "accept";
- permission java.net.SocketPermission "${csinfo.serverhost}", "accept";
- permission java.net.SocketPermission "${csinfo.trustedhost}", "accept";
+
+ // accept is needed for the server accepting connections
+ // connect is needed for ping command (which is in the server jar)
+ permission java.net.SocketPermission "127.0.0.1", "accept,connect";
+ permission java.net.SocketPermission "localhost", "accept,connect";
+ permission java.net.SocketPermission "${csinfo.serverhost}", "accept,connect";
+ permission java.net.SocketPermission "${csinfo.trustedhost}", "accept,connect";
+
+ // derbynet/NSinSameJVM uses this addres for its serverControl
+ permission java.net.SocketPermission "0.0.0.0:20000", "connect";
+
// tracing files default to derby.system.home, derbynet/getCurrentProperties.java
permission java.io.FilePermission "${derby.system.home}${/}*", "write";