[rfc][icedtea-web][policyeditor] CustomPermissions toString correction for basic permissions

Jie Kang jkang at redhat.com
Fri Jun 6 17:42:19 UTC 2014



----- Original Message -----
> On 06/06/2014 11:39 AM, Andrew Azores wrote:
> > Hi,
> >
> > There are two major types of permissions that go into policy files -
> > standard permissions, and basic permissions. Standard permissions have
> > the following format:
> >
> > permission $permission_type "$permission_target",
> > "$permission_action1,$permission_action2";
> >
> > Basic permissions have the following format:
> >
> > permission $permission_type "$permission_target";
> >
> > Without this patch, the CustomPermission class erroneously formats its
> > basic permissions to include an empty actions string. So, in the case of:
> >
> > permission java.lang.RuntimePermission "createClassLoader";
> >
> > Instead, it would be presented as:
> >
> > permission java.lang.RuntimePermission "createClassLoader", "";
> >
> > This patch very simply fixes this bug (which was due to comparing a
> > string to an enum member containing a string field, rather than
> > comparing a string to the string field *contained* by the enum member)
> > and adds a unit test for this case.
> >
> > Thanks,
> >


Patch looks fine. 0.5


> 
> (I also propose to backport this fix to 1.5)


I agree that this can be backported to 1.5.

> 
> Thanks,
> 
> --
> Andrew A
> 
> 


Regards,

Jie


More information about the distro-pkg-dev mailing list