1Policy Configuration Statements 2=============================== 3 4mls 5--- 6 7Defines whether the policy is built as an MLS or non-MLS policy by the CIL compiler. There MUST only be one [`mls`](cil_policy_config_statements.md#mls) entry in the policy otherwise the compiler will exit with an error. 8 9Note that this can be over-ridden by the CIL compiler command line parameter `-M true|false` or `--mls true|false` flags. 10 11**Statement definition:** 12 13 (mls boolean) 14 15**Where:** 16 17<table> 18<colgroup> 19<col width="25%" /> 20<col width="75%" /> 21</colgroup> 22<tbody> 23<tr class="odd"> 24<td align="left"><p><code>mls</code></p></td> 25<td align="left"><p>The <code>mls</code> keyword.</p></td> 26</tr> 27<tr class="even"> 28<td align="left"><p><code>boolean</code></p></td> 29<td align="left"><p>Set to either <code>true</code> or <code>false</code>.</p></td> 30</tr> 31</tbody> 32</table> 33 34**Example:** 35 36 (mls true) 37 38handleunknown 39------------- 40 41Defines how the kernel will handle unknown object classes and permissions when loading the policy. There MUST only be one [`handleunknown`](cil_policy_config_statements.md#handleunknown) entry in the policy otherwise the compiler will exit with an error. 42 43Note that this can be over-ridden by the CIL compiler command line parameter `-U` or `--handle-unknown` flags. 44 45**Statement definition:** 46 47 (handleunknown action) 48 49**Where:** 50 51<table> 52<colgroup> 53<col width="20%" /> 54<col width="80%" /> 55</colgroup> 56<tbody> 57<tr class="odd"> 58<td align="left"><p><code>handleunknown</code></p></td> 59<td align="left"><p>The <code>handleunknown</code> keyword.</p></td> 60</tr> 61<tr class="even"> 62<td align="left"><p><code>action</code></p></td> 63<td align="left"><p>A keyword of either <code>allow</code>, <code>deny</code> or <code>reject</code>. The kernel will handle these keywords as follows:</p> 64<p><code> allow</code> unknown class / permissions. This will set the returned AV with all 1's.</p> 65<p><code> deny</code> unknown class / permissions (the default). This will set the returned AV with all 0's.</p> 66<p><code> reject</code> loading the policy if it does not contain all the object classes / permissions.</p></td> 67</tr> 68</tbody> 69</table> 70 71**Example:** 72 73This will allow unknown classes / permissions to be present in the policy: 74 75 (handleunknown allow) 76 77policycap 78--------- 79 80Allow policy capabilities to be enabled via policy. These should be declared in the global namespace and be valid policy capabilities as they are checked against those known in libsepol by the CIL compiler. 81 82**Statement definition:** 83 84 (policycap policycap_id) 85 86**Where:** 87 88<table> 89<colgroup> 90<col width="25%" /> 91<col width="75%" /> 92</colgroup> 93<tbody> 94<tr class="odd"> 95<td align="left"><p><code>policycap</code></p></td> 96<td align="left"><p>The <code>policycap</code> keyword.</p></td> 97</tr> 98<tr class="even"> 99<td align="left"><p><code>policycap_id</code></p></td> 100<td align="left"><p>The <code>policycap</code> identifier (e.g. <code>open_perms</code>).</p></td> 101</tr> 102</tbody> 103</table> 104 105**Example:** 106 107These set two valid policy capabilities: 108 109 ; Enable networking controls. 110 (policycap network_peer_controls) 111 112 ; Enable open permission check. 113 (policycap open_perms) 114