db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepa Remesh <drem...@gmail.com>
Subject Re: [Fwd: Re: derbynet/getCurrentProperties.java fails]
Date Mon, 17 Oct 2005 20:32:45 GMT
> Deepa Remesh wrote:
>
> > Thanks Ole for posting the files.
> >
> > I did not catch this problem when I ran tests because I was using
> > trunk/classes to run tests. When I tried with jars, the tests failed
> > on my machine too. On looking at  derby_tests.policy, the policy for
> > running with classes covered writes to derby.system.home directory.
> > But for derbynet.jar, permission to write to derby.system.home was not
> > in the policy. I have added that and now the test
> > derbynet/getCurrentProperties.java passes with jars. I am attaching
> > the patch for policy file with this mail. If there are any comments,
> > please let me know. I will upload it to JIRA once tests finish.
>
> Why does derbynet.jar need to write to ${derby.system.home}?

With patch for DERBY-375, the default value for
derby.drda.traceDirectory is "If the derby.system.home property has
been set, it is the default. Otherwise, the default is the current
directory." With this change network server may have to write to trace
files to ${derby.system.home}.

> I'll add comments to the file that added permissions need comments as to
> why they are added.
>
> The policies granted to the classes directory is a super-set of the
> permissions granted to the other jars, but that does not imply a
> permission granted to the classes is applicable for a specific jar.
>

Since the policies granted to classes directory is a superset, it
includes read,write, delete to derby.system.home (which is required by
derby.jar). With patch for DERBY-375, derbynet.jar requires write
permission to ${derby.system.home}. I have only added the following
line to derby_tests.policy:
"permission java.io.FilePermission "${derby.system.home}${/}*", "write";  "

I have modified the comments in derby_tests.policy to indicate why I
added it. If that is not clear, I can modify it.

Deepa

Mime
View raw message