Skip to content

Fix/add optional file type handling for genfscon rules

James Carter selinux 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyIn review
  2. v14 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5libsepol: Add support for file types in writing out policy.conflibsepol/src/kernel_to_conf.c+33 -21 reply
2/5libsepol/cil: Refactor filecon file type handlinglibsepol/cil/src/cil.c libsepol/cil/src/cil_build_ast.c libsepol/cil/src/cil_internal.h +1 more+29 -160 replies
3/5libsepol/cil: Allow optional file type in genfscon ruleslibsepol/cil/src/cil.c libsepol/cil/src/cil_binary.c libsepol/cil/src/cil_build_ast.c +2 more+105 -40 replies
4/5secilc/docs: Document the optional file type for genfscon rulessecilc/docs/cil_file_labeling_statements.md+8 -20 replies
5/5libsepol: Write out genfscon file type when writing out CIL policylibsepol/src/kernel_to_cil.c libsepol/src/module_to_cil.c+59 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/5 v2] Fix/add optional file type handling for genfscon rules

genfscon rules have always supported an optional file type, but when the ability for writing a policy.conf file from a kernel policy was added to libsepol it did not include that support. Support for the optional file type was also left out of CIL genfscon rules.

This patch set fixes these problems.

Patch 1 adds support for writing the optional file type in genfscon rules when writing a policy.conf file from a kernel policy.

Patches 2-5 adds support in CIL for handling an optional file type in genfscon rules, updates the CIL documentation, and adds support when writing out CIL from a kernel policy or module as well.

James Carter (5):
libsepol: Add support for file types in writing out policy.conf libsepol/cil: Refactor filecon file type handling libsepol/cil: Allow optional file type in genfscon rules secilc/docs: Document the optional file type for genfscon rules
libsepol: Write out genfscon file type when writing out CIL policy

 libsepol/cil/src/cil.c                      |  6 ++-
 libsepol/cil/src/cil_binary.c               | 37 +++++++++++++
 libsepol/cil/src/cil_build_ast.c            | 49 +++++++++++++++---
 libsepol/cil/src/cil_internal.h             |  5 +-
 libsepol/cil/src/cil_write_ast.c            | 57 +++++++++++++++++----
 libsepol/src/kernel_to_cil.c                | 35 ++++++++++++-
 libsepol/src/kernel_to_conf.c               | 35 ++++++++++++-
 libsepol/src/module_to_cil.c                | 27 +++++++++-
 secilc/docs/cil_file_labeling_statements.md | 10 +++-
 9 files changed, 234 insertions(+), 27 deletions(-)
Signature · 1 line
2.31.1