[rfc][icedtea-web] PolicyEditor empty entries save to file

Andrew Azores aazores at redhat.com
Tue Jun 3 20:50:28 UTC 2014


Oh, turns out the old patch also doesn't cleanly apply to HEAD anymore. I've attached an updated version which does, and also does a little cleanup (ensuring that a FileLock is released).

Thanks.

----- Original Message -----
> Hello,
> 
> ----- Original Message -----
> > On 05/27/2014 09:22 AM, Andrew Azores wrote:
> > > On 05/21/2014 11:54 AM, Andrew Azores wrote:
> > >> Hi,
> > >>
> > >> This patch makes it so that "empty" codebase entries (those with no
> > >> permissions applied to them) will still be written to the policy
> > >> file, so that on re-open, the "empty" codebase is still present. A
> > >> special exception is added for the default "All Applets" codebase,
> > >> since it always appears in the editor anyway and it doesn't make
> > >> sense to have a persistent empty entry in that case.
> > >>
> > >> For example:
> > >> 1) policyeditor -file .config/icedtea-web/security/java.policy
> > >> 2) add a new codebase which isn't already present, eg http://example.com
> > >> 3) save the file
> > >> 4) $EDITOR config/icedtea-web/security/java.policy - verify the empty
> > >> "grant codeBase http://example/com" block is present
> > >> 5) policyeditor -file .config/icedtea-web/security/java.policy -
> > >> verify the example.com codebase appears and has no permissions applied
> > >>
> > >> ChangeLog:
> > >>
> > >> Empty codebase entries in PolicyEditor are saved to file
> > >> * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
> > >> (savePolicyFile): fileLock made final, enabledPermissions declaration
> > >> moved closer to usage
> > >> * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEntry.java
> > >> (toString): add codebase.isEmpty() condition to returning empty
> > >> string result
> > >>
> 
> The patch looks fine. 0.5 from me :)
> 
> 
> Regards,
> 
> Jie
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: policyeditor-empty-entries-2.patch
Type: text/x-patch
Size: 3259 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140603/16c811b8/policyeditor-empty-entries-2.patch>


More information about the distro-pkg-dev mailing list