[rfc][icedtea-web][policyeditor] CustomPermissions toString correction for basic permissions
Andrew Azores
aazores at redhat.com
Fri Jun 6 15:40:50 UTC 2014
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,
>
(I also propose to backport this fix to 1.5)
Thanks,
--
Andrew A
More information about the distro-pkg-dev
mailing list