Date: Tue, 11 Aug 1998 14:29:57 -0400
From: "Ralph G. Puga" <puga@tis.com>
To: schemers@Eng
Subject: Re: jdk1.2beta3/4 changes in codeBase interpretation for permissions
This is a multi-part message in MIME format.
--------------A1DCC8412D97C1C1F49209D6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Roland,
I tried running the same program with the "file:/-" option as you suggested and I
received the following error messages: (See the attachment).
I then tried the same program with "file:/home" (since my program is relative to the
/home directory) as the codeBase and it worked. Any ideas on this issue ?
I also tried other combinations like "file:/home/-" with the same failure results.
Thanks again,
--Ralph P.
schemers@Eng.Sun.COM wrote:
> Robert Watson writes:
> > This email is with regards to a change moving from jdk1.2beta3 to jdk1.2beta4.
> > Under 1.2beta3, we were able to specify permissions to apply to locally loaded
> > code by using the "file:/" codebase in the Java policy file. Under
> > jdk1.2beta4, however, this no longer appears to work. Here is some source
> > code and some sample policy files:
>
> This should be documented in the policy docs. Instead of:
>
> grant codeBase "file:/" {
>
> You need to use:
>
> grant codeBase "file:/-" {
>
> This is the same syntax the FilePermission uses. We had a number of
> requests to make this change, in order to make it explict.
>
> roland
>
-- Ralph G. Puga puga@tis.com TIS Labs/Network Associates Inc. Washington (301) 854-5323 3060 Washington Road (Voice) Baltimore (410) 442-1673 (x323) Glenwood, MD 21738 FAX (301) 854-5363
--------------A1DCC8412D97C1C1F49209D6 Content-Type: text/plain; charset=us-ascii; name="foo" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="foo"
Exception in thread "main" java.security.AccessControlException: access denied (java.security.AllPermission <all permissions> <all actions>) at java.security.AccessControlContext.checkPermission(Compiled Code) at java.security.AccessController.checkPermission(Compiled Code) at test.main(Compiled Code)
--------------A1DCC8412D97C1C1F49209D6--