Skip to content

restorecon context validation improvement

Yuli Khodorkovskiy selinux 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v22 patches 7 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- Fix compiler error caused by unused variable in selabel_validate()

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libselinux: verify file_contexts when using restoreconlibselinux/src/label.c libselinux/src/label_backends_android.c libselinux/src/label_file.c +3 more+10 -140 replies
2/2libselinux: echo line number of bad label in selabel_fini()libselinux/src/label.c libselinux/src/label_file.h libselinux/src/label_internal.h+3 -10 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/2] restorecon context validation improvement

In permissive, if a bad label is written to a file_context file, restorecon will not verify the label before succesfully applying the context. These patches fix validation of labels during restorecon while not breaking current behavior of lazy validation.

Changes since V1:
- Continue using lazy validation for restorecon that was broken in V1 of the patch.
- Add line number tracking for error messages in restorecon.

Changes since V2:
- Fix compiler error caused by unused variable in selabel_validate()

Yuli Khodorkovskiy (2):
libselinux: verify file_contexts when using restorecon
libselinux: echo line number of bad label in selabel_fini()

 libselinux/src/label.c                  | 7 +++----
 libselinux/src/label_backends_android.c | 2 +-
 libselinux/src/label_file.c             | 2 +-
 libselinux/src/label_file.h             | 3 ++-
 libselinux/src/label_internal.h         | 7 +++----
 libselinux/src/matchpathcon.c           | 5 ++---
 6 files changed, 12 insertions(+), 14 deletions(-)
Signature · 1 line
2.14.3