Bug 46774 - [gcj] Calling Policy.setPolicy with a new Policy object has no effect on the DefaultSecurityManager
Summary: [gcj] Calling Policy.setPolicy with a new Policy object has no effect on the ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.5.1
: P3 normal
Target Milestone: 4.5.3
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 46773
  Show dependency treegraph
 
Reported: 2010-12-03 00:34 UTC by Andrew John Hughes
Modified: 2010-12-20 18:32 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew John Hughes 2010-12-03 00:34:51 UTC
VMAccessController creates PermissionDomain objects with the two-argument constructor, with the result that the default SecurityManager does not check the system policy.  See PR46773 for more details.

gcj has a local copy of this class so a separate fix is required to that for GNU Classpath.
Comment 1 Andrew John Hughes 2010-12-03 00:35:09 UTC
Add metabug.
Comment 2 gandalf@gcc.gnu.org 2010-12-16 19:48:12 UTC
Author: gandalf
Date: Thu Dec 16 19:48:07 2010
New Revision: 167952

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167952
Log:
PR libgcj/46774: Create dynamic ProtectionDomain instances which check the system policy.

2010-12-13  Andrew John Hughes  <ahughes@redhat.com>

	PR libgcj/46774
	* libjava/java/security/VMAccessController.java:
	(DEFAULT_CONTEXT): Create ProtectionDomain with
	four argument constructor (arguments are the same
	as those implied by the two argument constructor).
	(getContext()): Create ProtectionDomain instances
	with four argument constructor using a null Principal
	array (as before) but including the classloader, which
	was always null before.


Modified:
    trunk/libjava/ChangeLog
    trunk/libjava/classpath/lib/java/security/VMAccessController.class
    trunk/libjava/java/security/VMAccessController.java
Comment 3 gandalf@gcc.gnu.org 2010-12-20 18:19:57 UTC
Author: gandalf
Date: Mon Dec 20 18:19:52 2010
New Revision: 168092

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168092
Log:
PR libgcj/46774: Create dynamic ProtectionDomain instances which check the system policy.

2010-12-13  Andrew John Hughes  <ahughes@redhat.com>

	    PR libgcj/46774
	    * libjava/java/security/VMAccessController.java:
	    (DEFAULT_CONTEXT): Create ProtectionDomain with
	    four argument constructor (arguments are the same
	    as those implied by the two argument constructor).
	    (getContext()): Create ProtectionDomain instances
	    with four argument constructor using a null Principal
	    array (as before) but including the classloader, which
	    was always null before.


Modified:
    branches/gcc-4_5-branch/libjava/ChangeLog
    branches/gcc-4_5-branch/libjava/classpath/lib/java/security/VMAccessController.class
    branches/gcc-4_5-branch/libjava/java/security/VMAccessController.java
Comment 4 Andrew John Hughes 2010-12-20 18:32:25 UTC
Fixed in trunk and 4.5 branch.