2011-06-23 03:20:26

by harrytaurus2002

[permalink] [raw]
Subject: [refpolicy] A mozilla_run_plugin bug


Hi Chris,

If I make role-types rule no longer used to declare a role(but use the newly added role-attr rule along with the role attribute support), I seem to have found that when mozilla_role() calls mozilla_run_plugin(), the 2nd argument is wrong, which would result below compile error:

policy/modules/roles/staff.te":115:ERROR 'unknown role staff_t' at token ';'
role staff_t types mozilla_plugin_t;

Which could be simply fixed by the attached patch:

- mozilla_run_plugin(mozilla_t, $2)
+ mozilla_run_plugin(mozilla_t, $1)

Thanks,
Harry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20110623/878b6226/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-the-call-to-mozilla_run_plugin.patch
Type: text/x-patch
Size: 1155 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20110623/878b6226/attachment.bin


2011-06-24 13:05:35

by cpebenito

[permalink] [raw]
Subject: [refpolicy] A mozilla_run_plugin bug

On 06/22/11 23:20, HarryCiao wrote:
> Hi Chris,
>
> If I make role-types rule no longer used to declare a role(but use the
> newly added role-attr rule along with the role attribute support), I
> seem to have found that when mozilla_role() calls mozilla_run_plugin(),
> the 2nd argument is wrong, which would result below compile error:
>
> policy/modules/roles/staff.te":115:ERROR 'unknown role staff_t' at
> token ';'
> role staff_t types mozilla_plugin_t;
>
> Which could be simply fixed by the attached patch:
>
> - mozilla_run_plugin(mozilla_t, $2)
> + mozilla_run_plugin(mozilla_t, $1)

Merged.

--
Chris PeBenito
Tresys Technology, LLC
http://www.tresys.com | oss.tresys.com