public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: Fix File.deleteOnExit() throwpoint check
@ 2006-07-18 11:48 Gary Benson
  0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2006-07-18 11:48 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

Hi all,

This commit fixes the File.deleteOnExit() throwpoint check on
Classpath, which performs some privileged checks that were not
being allowed.

Cheers,
Gary

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1686 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1806
diff -u -r1.1806 ChangeLog
--- ChangeLog	17 Jul 2006 16:34:25 -0000	1.1806
+++ ChangeLog	18 Jul 2006 11:45:09 -0000
@@ -1,3 +1,7 @@
+2006-07-18  Gary Benson  <gbenson@redhat.com>
+
+	* gnu/testlet/java/io/File/security.java: Fix deleteOnExit test.
+
 2006-07-17  David Gilbert  <david.gilbert@object-refinery.com>
 
 	* gnu/testlet/java/awt/image/ComponentSampleModel/constructors.java: New file,
Index: gnu/testlet/java/io/File/security.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/File/security.java,v
retrieving revision 1.13
diff -u -r1.13 security.java
--- gnu/testlet/java/io/File/security.java	14 Jul 2006 10:13:56 -0000	1.13
+++ gnu/testlet/java/io/File/security.java	18 Jul 2006 11:45:09 -0000
@@ -82,6 +82,11 @@
     Permission tmpdirPropPerm =
       new PropertyPermission("java.io.tmpdir", "read");
 
+    Permission modifyThreadGroup =
+      new RuntimePermission("modifyThreadGroup");
+    Permission shutdownHooks =
+      new RuntimePermission("shutdownHooks");
+
     // Keep a record of created temp files so we can delete them later.
     File tf1 = null;
     File tf2 = null;
@@ -291,7 +296,8 @@
       // throwpoint: java.io.File-deleteOnExit-DIR
       harness.checkPoint("dir.deleteOnExit()");
       try {
-	sm.prepareChecks(new Permission[]{tmpdirDeletePerm});
+	sm.prepareChecks(new Permission[]{tmpdirDeletePerm},
+			 new Permission[]{modifyThreadGroup, shutdownHooks});
 	tmpdir.deleteOnExit();
 	sm.checkAllChecked();
       }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-18 11:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-18 11:48 FYI: Fix File.deleteOnExit() throwpoint check Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).