Subject: Re: [PATCH 2/2] secilc/docs: Add documentation for neverallowx rules To: Steve Lawrence , SELinux List References: <1448984310-17097-1-git-send-email-slawrence@tresys.com> <1448984310-17097-2-git-send-email-slawrence@tresys.com> From: James Carter Message-ID: <565F550A.5030505@tycho.nsa.gov> Date: Wed, 2 Dec 2015 15:31:06 -0500 MIME-Version: 1.0 In-Reply-To: <1448984310-17097-2-git-send-email-slawrence@tresys.com> Content-Type: text/plain; charset=windows-1252; format=flowed List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: On 12/01/2015 10:38 AM, Steve Lawrence wrote: > Signed-off-by: Steve Lawrence Applied. Thanks, Jim > --- > secilc/docs/cil_access_vector_rules.xml | 67 ++++++++++++++++++++++ > .../docs/cil_class_and_permission_statements.xml | 2 +- > 2 files changed, 68 insertions(+), 1 deletion(-) > > diff --git a/secilc/docs/cil_access_vector_rules.xml b/secilc/docs/cil_access_vector_rules.xml > index 985fc3d..e768558 100644 > --- a/secilc/docs/cil_access_vector_rules.xml > +++ b/secilc/docs/cil_access_vector_rules.xml > @@ -448,4 +448,71 @@ > > > > + > + neverallowx > + Never allow access rights defined for extended permissions. This is a compiler enforced action that will stop compilation until the offending rules are modified. > + Note that these rules can be over-ridden by the CIL compiler command line parameter -N or --disable-neverallow flags. > + Rule definition: > + > + Where: > + > + > + > + > + > + > + > + neverallowx > + > + > + The neverallowx keyword. > + > + > + > + > + source_id > + > + > + A single previously defined source type, typealias or typeattribute identifier. > + > + > + > + > + target_id > + > + > + A single previously defined target type, typealias or typeattribute identifier. > + The self keyword may be used instead to signify that source and target are the same. > + > + > + > + > + permissionx_id > + > + > + A single named or anonymous permissionx. > + > + > + > + > + > + Example: > + This example will not compile as type_3 is not allowed to be a source type and ioctl range for the allowx rule: > + +(class property_service (ioctl)) > + > +(block av_rules > + (type type_1) > + (type type_2) > + (type type_3) > + (typeattribute all_types) > + (typeattributeset all_types ((all))) > + > + (neverallowx type_3 all_types (ioctl property_service (range 0x2000 0x20FF))) > + ; This rule will fail compilation: > + (allowx type_3 self (ioctl property_service (0x20A0))) > +)]]> > + > + > + > > diff --git a/secilc/docs/cil_class_and_permission_statements.xml b/secilc/docs/cil_class_and_permission_statements.xml > index 20c3eb7..f4982e0 100644 > --- a/secilc/docs/cil_class_and_permission_statements.xml > +++ b/secilc/docs/cil_class_and_permission_statements.xml > @@ -508,7 +508,7 @@ > > > permissionx > - Defines a named extended permission, which can be used in the allowx, auditallowx, and dontauditx statements. > + Defines a named extended permission, which can be used in the allowx, auditallowx, dontauditx, and neverallowx statements. > Statement definition: > > Where: > -- James Carter National Security Agency