Skip to contentSkip to conversation

cil_container_statements.md: clarify in-statement limitations

PATCH In review Dominick Grift 2 participants 2 messages Aug 12, 2021 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cil_container_statements.md: clarify in-statement limitations

in-statements are resolved before inheritance and this is unintuitive. Explain that one can instead re-declare blocks and macros that were inherited, effectively yielding similar results.

---
 secilc/docs/cil_container_statements.md | 2 ++
 1 file changed, 2 insertions(+)
secilc/docs/cil_container_statements.md +2 -0
index 41a4612c..0259778c 100644
@@ -282,6 +282,8 @@ Allows the insertion of CIL statements into a named container ([`block`](cil_con
 
 Not allowed in [`macro`](cil_call_macro_statements.md#macro), [`booleanif`](cil_conditional_statements.md#booleanif), and other [`in`](cil_container_statements.md#in) blocks.
 
+Note that [`in`](cil_container_statements.md#in) statements referencing blocks and macros that were inherited cannot be resolved and that instead it is allowed to re-declare blocks and macros that were inherited, resulting in similar behavior.
+
 [`tunable`](cil_conditional_statements.md#tunable) and [`in`](cil_container_statements.md#in) statements are not allowed in [`in`](cil_container_statements.md#in) blocks.
 
 **Statement definition:**
Signature · 1 line
2.32.0
#1 lore raw
Quoted 6 lines · Dominick Grift

in-statements are resolved before inheritance and this is unintuitive. Explain that one can instead re-declare blocks and macros that were inherited, effectively yielding similar results.

I am working on an optional extension of the behavior of the in-statement that I hope to send out soon. If that works out, then the documentation is going to change, so let's hold off on this patch for now to see how that turns out.

Thanks,
Jim

Quoted 20 lines
---
 secilc/docs/cil_container_statements.md | 2 ++
 1 file changed, 2 insertions(+)
secilc/docs/cil_container_statements.md +2 -1
index 41a4612c..0259778c 100644
@@ -282,6 +282,8 @@ Allows the insertion of CIL statements into a named container ([`block`](cil_con
 
 Not allowed in [`macro`](cil_call_macro_statements.md#macro), [`booleanif`](cil_conditional_statements.md#booleanif), and other [`in`](cil_container_statements.md#in) blocks.
 
+Note that [`in`](cil_container_statements.md#in) statements referencing blocks and macros that were inherited cannot be resolved and that instead it is allowed to re-declare blocks and macros that were inherited, resulting in similar behavior.
+
 [`tunable`](cil_conditional_statements.md#tunable) and [`in`](cil_container_statements.md#in) statements are not allowed in [`in`](cil_container_statements.md#in) blocks.
 
 **Statement definition:**
--

2.32.0