This is the mail archive of the
mauve-patches@sources.redhat.com
mailing list for the Mauve project.
Re: gnu/testlet/java/lang/Thread/security10.java...
- From: David Daney <ddaney at avtrex dot com>
- To: Jeroen Frijters <jeroen at sumatra dot nl>
- Cc: Michael Koch <konqueror at gmx dot de>, mauve-patches at sources dot redhat dot com
- Date: Wed, 02 Feb 2005 10:23:52 -0800
- Subject: Re: gnu/testlet/java/lang/Thread/security10.java...
- References: <D92197D0A6547B44A1567814F851FA68069403@LEMBU.sumatrasoftware.com>
Jeroen Frijters wrote:
I ran into this problem as well and I'm committing the attached patch to
solve this.
Regards,
Jeroen
2005-01-31 Jeroen Frijters <jeroen@frijters.net>
* gnu/testlet/java/lang/Thread/security10.java:
Added code to save and restore security manager.
Still not quite right. I just committed this:
2005-02-02 David Daney <ddaney@avtrex.com>
* gnu/testlet/java/lang/Thread/security10.java:
Allow setSecurityManager.
Index: security10.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Thread/security10.java,v
retrieving revision 1.2
diff -c -p -r1.2 security10.java
*** security10.java 31 Jan 2005 11:26:16 -0000 1.2
--- security10.java 2 Feb 2005 18:17:43 -0000
***************
*** 1,6 ****
// Tags: JDK1.0
! // Copyright (C) 2004 Free Software Foundation, Inc.
// Written by Michael Koch (konqueror@gmx.de)
// This file is part of Mauve.
--- 1,6 ----
// Tags: JDK1.0
! // Copyright (C) 2004, 2005 Free Software Foundation, Inc.
// Written by Michael Koch (konqueror@gmx.de)
// This file is part of Mauve.
*************** package gnu.testlet.java.lang.Thread;
*** 24,29 ****
--- 24,30 ----
import gnu.testlet.Testlet;
import gnu.testlet.TestHarness;
+ import java.security.Permission;
public class security10 implements Testlet
{
*************** public class security10 implements Testl
*** 33,38 ****
--- 34,47 ----
{
throw new SecurityException();
}
+
+ public void checkPermission(Permission perm)
+ {
+ RuntimePermission p = new RuntimePermission("setSecurityManager");
+ if (p.implies(perm))
+ return;
+ super.checkPermission(perm);
+ }
}
public void test (TestHarness h)