Conditional Statements ====================== boolean ------- Declares a run time boolean as true or false in the current namespace. The [`booleanif`](cil_conditional_statements.md#booleanif) statement contains the CIL code that will be in the binary policy file. [`boolean`](cil_conditional_statements.md#boolean) are not allowed in [`booleanif`](cil_conditional_statements.md#booleanif) blocks. **Statement definition:** ```secil (boolean boolean_id true|false) ``` **Where:**
boolean
The boolean keyword.
boolean_id
The boolean identifier.
true | false
The initial state of the boolean. This can be changed at run time using setsebool(8) and its status queried using getsebool(8).
setsebool
(8)
getsebool
booleanif
The booleanif keyword.
Either a single boolean identifier or one or more expr's.
expr
Zero or more expr's, the valid operators and syntax are:
(and boolean_id boolean_id)
(or boolean_id boolean_id)
(xor boolean_id boolean_id)
(eq boolean_id boolean_id)
(neq boolean_id boolean_id)
(not boolean_id)
true
An optional set of CIL statements that will be instantiated when the boolean is evaluated as true.
false
An optional set of CIL statements that will be instantiated when the boolean is evaluated as false.
tunable
The tunable keyword.
tunable_id
The tunable identifier.
The initial state of the tunable.
tunableif
The tunableif keyword.
Either a single tunable identifier or one or more expr's.
(and tunable_id tunable_id)
(or tunable_id tunable_id)
(xor tunable_id tunable_id)
(eq tunable_id tunable_id)
(neq tunable_id tunable_id)
(not tunable_id)
An optional set of CIL statements that will be instantiated when the tunable is evaluated as true.
An optional set of CIL statements that will be instantiated when the tunable is evaluated as false.