From: Charlie.Lai@Eng (Charlie Lai)
Message-Id: <199803052305.PAA04496@angeles.eng.sun.com>
Subject: Re: jkd1.2 - security - new types of permissions - example
To: edjlali@ece.eng.wayne.edu (Guy Edjlali)
Date: Thu, 5 Mar 1998 15:05:43 -0800 (PST)
In-Reply-To: <Pine.SOL.3.96.980304103122.17552A-100000@ernie> from "Guy Edjlali" at Mar 4, 98 12:59:03 pm
hi,
> I was implementing a template of your example on how to create
> new types of permissions. I wanted to see how the functions are
> called. The test example (see below for the code of: Test.java
> TVPermission.java and java.policy) is giving me the
> following output:
> [72] java Test
> TVPermission channel-7 watch
> TVPermission channel-7 read
> TVPermission channel-2 watch
> [73]
>
> There seems to be no call to the implies function.
>
> BTW: Is the -usepolicy option implemented?
> [73] java -usepolicy:myPolicy Test
> usepolicy:myPolicy: illegal argument
are you using JDK1.2 beta2?
unfortunately the -usepolicy flag isn't there yet.
however, you can still run an application with the
new access control mechanisms turned on by using: sun.misc.Launcher
for example, if Test.class and java.policy reside in the directory, /home/guy.
then run:
java -Djava.app.class.path -Djava.policy=/home/guy/java.policy sun.misc.Launcher Test
from a directory other than /home/guy.
hope this helps,
charlie