|
From: <mad...@us...> - 2008-01-24 20:42:57
|
Revision: 2756
http://selinux.svn.sourceforge.net/selinux/?rev=2756&view=rev
Author: madmethod
Date: 2008-01-24 12:42:54 -0800 (Thu, 24 Jan 2008)
Log Message:
-----------
Author: Joshua Brindle
Email: me...@ma...
Subject: role dominance
Date: Tue, 08 Jan 2008 15:48:34 -0500
Joshua Brindle wrote:
> Stephen Smalley wrote:
>> On Mon, 2008-01-07 at 10:41 -0500, Joshua Brindle wrote:
>>
>>> While working on policyrep we've found that role dominance is pretty
>>> difficult to implement correctly, and apparently there is some
>>> ambiguity about how it works. The main problem we are running into
>>> now is that converting the role bitmaps of an old module
>>> (compatibility) back to a role dominance statement is very difficult.
>>>
>>
>> And likely unnecessary. It isn't required that a conversion yield the
>> same source representation, but only that it yield the same end result
>> when you ultimately generate a kernel binary policy. Or are you saying
>> that you can't even do the latter?
>>
>>
>
> The latter is possible.
>
>>> Also it seems like noone has really used role dominance. During
>>> conversations about it here Chris PeBenito suggests that he wants
>>> something like it for refpolicy but a role attribute kind of system
>>> may be much simpler and easier to implement/understand.
>>>
>>> Thoughts?
>>>
>>
>> Any language feature that isn't actually being used should probably be
>> deprecated.
>>
>
> I vote for deprecation in the current compiler and no implementation
> in policyrep. If we want to add role attribute that would be fine too.
> Chris wants some way to group roles and I never really thought role
> dominance was the right way to do it.
>
Patch below to deprecate role dominance. I think we should throw a
warning in policyrep if we see anything in the dominates field of the
role datum and continue without support. Chris suggests that he'd like
role attributes so we can put that on the todo list to implement.
Modified Paths:
--------------
trunk/checkpolicy/policy_parse.y
Modified: trunk/checkpolicy/policy_parse.y
===================================================================
--- trunk/checkpolicy/policy_parse.y 2008-01-24 20:38:56 UTC (rev 2755)
+++ trunk/checkpolicy/policy_parse.y 2008-01-24 20:42:54 UTC (rev 2756)
@@ -2563,6 +2563,8 @@
return (role_datum_t *) 1; /* any non-NULL value */
}
+ yywarn("Role dominance has been deprecated");
+
role_id = queue_remove(id_queue);
if (!is_id_in_scope(SYM_ROLES, role_id)) {
yyerror2("role %s is not within scope", role_id);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|