db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurag Shekhar <Anurag.Shek...@Sun.COM>
Subject Re: adding permission to derby_tests.policy(was:Re: Using StorageFactory to create temporary files)
Date Tue, 08 Aug 2006 19:34:10 GMT
I can use database tmp file system. I can get the tmp directory name 
from StorageFactory. Or is there some better way of getting this directory ?
anurag
Suresh Thalamati wrote:
> Anurag shekhar wrote:
>> I need to grant derby.jar read,write,delete access on tmp directory 
>> (issue derby-1341).
>> I tried adding
>>  permission java.io.FilePermission "${java.io.tmpdir}${/}-", "read, 
>> write, delete";
>>
>> in this section
>> grant codeBase "${derbyTesting.codejar}derby.jar"
>>
>> I continue to get security exception while creating a temporary file. 
>> But when I add same permission to all (grant {}) it works fine.
>> What am i doing wrong here ?
>> thanks
>> anurag
>>
>> Daniel John Debrunner wrote:
>>
>>> Anurag Shekhar wrote:
>>>
>>>
>>>  
>>>
>>>> Yes java.io.File.createTempFile() will work. But is it ok to grant 
>>>> file
>>>> i/o access to a jdbc driver class ?
>>>>     
>>>
>>>
>>> Permissions afre granted to derby.jar, not individual classes.
>>>
>>> Dan.
>>>
>>>
>>>
>>>   
>>
>>
>>
>
> Any reason why these temp files can not be created under database temp 
> directory  (derby.storage.tempDirectory)( may be in a seperate 
> directory under that). This might save users from adding permission to 
> yet another location seperately.
>
> Thanks
> -suresht
>
>


Mime
View raw message