Re: jdk1.2beta3/4 changes in codeBase interpretation for permissions

schemers@Eng
Tue, 11 Aug 1998 11:37:17 -0700 (PDT)

Date: Tue, 11 Aug 1998 11:37:17 -0700 (PDT)
From: schemers@Eng
To: "Ralph G. Puga" <puga@tis.com>
Subject: Re: jdk1.2beta3/4 changes in codeBase interpretation for permissions
In-Reply-To: <35D08DA4.921E8D0A@tis.com>
<13776.35449.207175.234684@crypto.eng.sun.com>

Hum. It should work. You could try running with debug turned on to
see what is happening. In particular, try:

java -Djava.security.debug=access,failure,policy ...

That might help track down your problem.

roland

Ralph G. Puga writes:
> 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
>
> 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)