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 mi...@apache.org on 2006/03/01 04:01:57 UTC
svn commit: r381883 - in /db/derby/code/trunk/java:
engine/org/apache/derby/impl/store/raw/
testing/org/apache/derbyTesting/functionTests/tests/store/
testing/org/apache/derbyTesting/functionTests/tests/storetests/
testing/org/apache/derbyTesting/funct...
Author: mikem
Date: Tue Feb 28 19:01:55 2006
New Revision: 381883
URL: http://svn.apache.org/viewcvs?rev=381883&view=rev
Log:
DERBY-709, committing on behalf of Suresh Thalamati
This patch (derby-709_latest.diff) fixes the problems appreared with earlier
patch when tests are run againest JARS.
--- correctly catch the Security Exception when there is no permission to get
a canonical path.
--- Modified the deryb_tests.plocy to allow deltes in
${user.dir}${/}extinout${/}- .,
It is needed because, backup tests deletes the old copy of the backup at the
backup location.
--- set noSecurityManager = true for the tests that can not be run under
security manager due to bug : 1066
--- changes st_1 properties to use external tests dirs , so that tests does not
required "user.dir" permission to create parent directories for the backup
paths.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/encryptionKey_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/logDevice_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/rollForwardBackup_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/storetests/st_1_app.properties
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java?rev=381883&r1=381882&r2=381883&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java Tue Feb 28 19:01:55 2006
@@ -83,6 +83,8 @@
import java.net.URL;
import java.security.PrivilegedExceptionAction;
+import java.lang.SecurityException;
+
/**
A Raw store that implements the RawStoreFactory module by delegating all the
@@ -1546,7 +1548,14 @@
{
return (String) AccessController.doPrivileged( this);
}
- catch( PrivilegedActionException pae) { return null;} // does not throw an exception
+ catch( PrivilegedActionException pae) {
+ return null;
+ } // does not throw an exception
+ catch(SecurityException se) {
+ // there are no permission to get canonical path
+ // just return null.
+ return null;
+ }
finally
{
actionStorageFile = null;
@@ -1563,7 +1572,14 @@
{
return (String) AccessController.doPrivileged( this);
}
- catch( PrivilegedActionException pae) { return null;} // does not throw an exception
+ catch( PrivilegedActionException pae) {
+ return null;
+ } // does not throw an exception
+ catch(SecurityException se) {
+ // there are no permission to get canonical path
+ // just return null.
+ return null;
+ }
finally
{
actionRegularFile = null;
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/encryptionKey_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/encryptionKey_app.properties?rev=381883&r1=381882&r2=381883&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/encryptionKey_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/encryptionKey_app.properties Tue Feb 28 19:01:55 2006
@@ -6,5 +6,4 @@
ij.showNoConnectionsAtStart=true
ij.showNoCountForSelect=true
runwithjdk13=false
-
-
+useextdirs=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/logDevice_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/logDevice_app.properties?rev=381883&r1=381882&r2=381883&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/logDevice_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/logDevice_app.properties Tue Feb 28 19:01:55 2006
@@ -20,4 +20,6 @@
ij.dataSource.createDatabase=create
ij.dataSource.connectionAttributes=logDevice=extinout/wierdlog
+# Test fails with security manager due to bug DEBRY-1066
+noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/rollForwardBackup_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/rollForwardBackup_app.properties?rev=381883&r1=381882&r2=381883&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/rollForwardBackup_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/rollForwardBackup_app.properties Tue Feb 28 19:01:55 2006
@@ -12,3 +12,5 @@
useextdirs=true
usedefaults=true
+# Test fails with security manager due to bug DEBRY-1066
+noSecurityManager=true
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/storetests/st_1_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/storetests/st_1_app.properties?rev=381883&r1=381882&r2=381883&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/storetests/st_1_app.properties (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/storetests/st_1_app.properties Tue Feb 28 19:01:55 2006
@@ -1,3 +1,3 @@
usedefaults=true
-
+useextdirs=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=381883&r1=381882&r2=381883&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 Tue Feb 28 19:01:55 2006
@@ -39,7 +39,7 @@
// Import/export and other support files from these locations in tests
permission java.io.FilePermission "${user.dir}${/}extin${/}-", "read";
- permission java.io.FilePermission "${user.dir}${/}extinout${/}-", "read, write";
+ permission java.io.FilePermission "${user.dir}${/}extinout${/}-", "read, write, delete";
permission java.io.FilePermission "${user.dir}${/}extout${/}-", "write";
permission java.io.FilePermission "${user.dir}${/}extinout", "read,write";