Skip to content

Add CIL Deny Rule

James Carter selinux 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 8 repliesIn review
  2. v39 patches 2 repliesSuperseded
  3. v2 RFC9 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC9 patches10 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9libsepol/cil: Parse and add deny rule to AST, but do not processlibsepol/cil/src/cil.c libsepol/cil/src/cil_build_ast.c libsepol/cil/src/cil_build_ast.h +9 more+183 -00 replies
2/9libsepol/cil: Add cil_list_is_empty macrolibsepol/cil/src/cil_list.h+3 -00 replies
3/9libsepol/cil: Add cil_tree_node_remove functionlibsepol/cil/src/cil_tree.c libsepol/cil/src/cil_tree.h+36 -00 replies
4/9libsepol/cil: Process deny ruleslibsepol/cil/src/cil_deny.c libsepol/cil/src/cil_deny.h libsepol/cil/src/cil_post.c+1456 -01 reply
5/9libsepol/cil: Add cil_write_post_ast functionlibsepol/cil/include/cil/cil.h libsepol/cil/src/cil.c libsepol/cil/src/cil_write_ast.h+52 -00 replies
6/9libsepol: Export the cil_write_post_ast functionlibsepol/src/libsepol.map.in+5 -00 replies
7/9secilc/secil2tree: Add option to write CIL AST after post processingsecilc/secil2tree.c+7 -10 replies
8/9secilc/test: Add deny rule testssecilc/test/deny_rule_test1.cil secilc/test/deny_rule_test2.cil+998 -00 replies
9/9secilc/docs: Add deny rule to CIL documentationsecilc/docs/cil_access_vector_rules.md+40 -11 reply

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDaniel BurgenerPetr Lautrbach
SeriesA-b
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH 0/9 v4] Add CIL Deny Rule

This patch series depends on the "Add support for notself and other to CIL" patch series from August 9th

These patches add a deny rule to CIL. Deny rules will be processed after everything except for neverallow rules. Unlike neverallow rules, they remove the permissions in the deny rule rather than reporting an error.

See the individual patches for an explanation of what they do.

Patches 1-8 are unchanged from v3, see:
https://lore.kernel.org/selinux/[email protected]/

Previously, patch 9, as Daniel Burgener noted, did not do what it said it was going to do. Now it does.

James Carter (9):
libsepol/cil: Parse and add deny rule to AST, but do not process libsepol/cil: Add cil_list_is_empty macro
libsepol/cil: Add cil_tree_node_remove function libsepol/cil: Process deny rules
libsepol/cil: Add cil_write_post_ast function
libsepol: Export the cil_write_post_ast function secilc/secil2tree: Add option to write CIL AST after post processing secilc/test: Add deny rule tests
secilc/docs: Add deny rule to CIL documentation

 libsepol/cil/include/cil/cil.h         |    1 +
 libsepol/cil/src/cil.c                 |   68 ++
 libsepol/cil/src/cil_build_ast.c       |   56 +
 libsepol/cil/src/cil_build_ast.h       |    2 +
 libsepol/cil/src/cil_copy_ast.c        |   19 +
 libsepol/cil/src/cil_copy_ast.h        |    1 +
 libsepol/cil/src/cil_deny.c            | 1413 ++++++++++++++++++++++++
 libsepol/cil/src/cil_deny.h            |   36 +
 libsepol/cil/src/cil_flavor.h          |    1 +
 libsepol/cil/src/cil_internal.h        |   10 +
 libsepol/cil/src/cil_list.h            |    3 +
 libsepol/cil/src/cil_post.c            |    7 +
 libsepol/cil/src/cil_reset_ast.c       |    8 +
 libsepol/cil/src/cil_resolve_ast.c     |   48 +
 libsepol/cil/src/cil_resolve_ast.h     |    1 +
 libsepol/cil/src/cil_tree.c            |   35 +
 libsepol/cil/src/cil_tree.h            |    1 +
 libsepol/cil/src/cil_verify.c          |    9 +
 libsepol/cil/src/cil_write_ast.c       |   10 +
 libsepol/cil/src/cil_write_ast.h       |    1 +
 libsepol/src/libsepol.map.in           |    5 +
 secilc/docs/cil_access_vector_rules.md |   41 +-
 secilc/secil2tree.c                    |    8 +-
 secilc/test/deny_rule_test1.cil        |  580 ++++++++++
 secilc/test/deny_rule_test2.cil        |  418 +++++++
 25 files changed, 2780 insertions(+), 2 deletions(-)
 create mode 100644 libsepol/cil/src/cil_deny.c
 create mode 100644 libsepol/cil/src/cil_deny.h
 create mode 100644 secilc/test/deny_rule_test1.cil
 create mode 100644 secilc/test/deny_rule_test2.cil
Signature · 1 line
2.41.0