[rfc][icedtea-web] policytool in itweb-settings

Jiri Vanek jvanek at redhat.com
Fri Jan 17 08:52:07 PST 2014


On 01/17/2014 05:07 PM, Andrew Azores wrote:
> On 01/17/2014 05:35 AM, Jiri Vanek wrote:
>> snip
>>>
>>
>> Ugh. It still do not work.
>>
>> In 000  or  222 permissions - the policy tool executed with "read only" message. It should not
>> opena at all, and correct error message should apear (can not read)
>>
>> so  - rw - no message, open policy toool
>>     - r-  - read only warning, lucnh
>>     - -w or --, can not read/write, not luching
>>
>
> Apparently I had some difficulties with basic logic yesterday :D
>
>>
>> Unluckily I found one overlooked flaw - when policy tool is closed, it close ITW-settiings. It
>> should not happen.
>>
>> If it will be to complex* to fix, then I'm for this fix as another changeset. (as I would really
>> like this changeset (in simplest form) bubble to 1.4)
>>
>>
>> * I'm afraid You will have to owerride something or modify it via reflection or use some another
>> nasty ahck to fix it :(
>
> This is why I was launching PolicyTool in a new process in the first place, actually. In all its
> wisdom, PolicyTool exits the JVM when its window closes.

It should not be so hard -
By refelction get 'tw' field, and remove the  only (nasty words) WindowListener it have - the one 
responsible for system.exit and nothing else:-/

Unluckily, this listener is added in
PolicyTool.main in tw.displayToolWindow(args);

So you have to work on it a bit more. But again, nothing hard, and no copy pasting;)

Not sure if we will backport this, but probably yes.. Depends on final compelxiity.

>>
>>>>
>>>> Please use File.createTmpfile(dir,pattern) instead :)
>>>> It guarants you creation of the file, so you do not need to throw.
>>>
>>> I didn't do this in the attached new patches, because I'm not sure about it. This is going to create
>>> temp files, eg in /tmp - do we really want to back up to here? If the power goes out during a test
>> nope :)
>>
>> Se again:   File.createTmpfile(dir,pattern). You can let it crate file in any dir -
>> http://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile%28java.lang.String,%20java.lang.String,%20java.io.File%29
>>
>>
>> Pls really use this instead of your schema.
>
> Okay, okay, you win. :)
>
> Thanks,
>

ok. Ok to head, and please elaborate on backport to 1.4 it is worthy.
Also please fix the closing of window asap (as new chngeset)


Good work!
  J.


More information about the distro-pkg-dev mailing list