mbox series

[meta-selinux,0/4] Add selint and fix local refpolicy patches

Message ID 20261124114137.2203106-1-chenqi_hycx@cetc.com.cn
Headers show
Series Add selint and fix local refpolicy patches | expand

Message

Chen Qi Nov. 24, 2026, 11:41 a.m. UTC
From: Chen Qi <chenqi_hycx@cetc.com.cn>

Add selint (https://github.com/SELinuxProject/selint) which is
used to check if policies are written in a standard refpolicy way.

There are mainly two benefits:
1) People fixing refpolicy bugs can know in advance whether the codes
   conform to upstream refpolicy standard.
2) Local Yocto specific patches can now be linted in preparation for
   working closer with refpolicy upstream to add a new 'yocto' distro.

Chen Qi (4):
  selint: add recipe
  refpolicy: label start_getty as bin_t in corecommands.fc
  refpolicy: escape the dot in the /run/issue.d file context
  refpolicy: run selint over the policy sources

 recipes-security/refpolicy/files/selint.conf  | 16 ++++++++++
 ...ecommands-label-start_getty-as-bin_t.patch | 30 +++++++++++++++++++
 ...etty-add-file-context-to-start_getty.patch | 27 -----------------
 ...temd-add-rules-for-systemd-ssh-issue.patch |  2 +-
 .../refpolicy/refpolicy_common.inc            | 13 ++++++--
 recipes-security/selint/selint_git.bb         | 27 +++++++++++++++++
 6 files changed, 85 insertions(+), 30 deletions(-)
 create mode 100644 recipes-security/refpolicy/files/selint.conf
 create mode 100644 recipes-security/refpolicy/refpolicy/0023-fc-corecommands-label-start_getty-as-bin_t.patch
 delete mode 100644 recipes-security/refpolicy/refpolicy/0023-fc-getty-add-file-context-to-start_getty.patch
 create mode 100644 recipes-security/selint/selint_git.bb