Skip to content

Detect identical genfscon

Pierre-Hugues Husson selinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest1 patch 2 repliesIn review

Changes in v2 from the cover letter

- Respect multiple_decls behaviour
- Fail merge when context is different
- genfscon compare function returns partial or full match

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1Detect identical genfsconlibsepol/cil/src/cil_post.c+32 -22 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/1] Detect identical genfscon

Currently secilc doesn't deal with duplicate genfscon rules.

This commit fixes this, and implements multiple_decls behaviour.

To reduce the code changes, the compare function returns in its LSB whether the rules are only a matching rule match, or a full match.

One usecase is Android/Project Treble:
With Project Treble, vendor might include rules included in later in framework.
In order to be able to update the framework in this case, we need to remove identical rules.

This is a RFC version, this hasn't been properly tested.

v2:
- Respect multiple_decls behaviour
- Fail merge when context is different
- genfscon compare function returns partial or full match

Pierre-Hugues Husson (1):
Detect identical genfscon

 libsepol/cil/src/cil_post.c | 34 ++++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)
Signature · 1 line
2.15.1