| Message ID | 20261116025714.2558951-1-chenqi_hycx@cetc.com.cn |
|---|---|
| State | New |
| Headers | show |
| Series | meta-selinux: fix systemd 262 denials and ensure SELinux tests work on every variant | expand |
Hi, Qi > The targeted repolicy is a looser policy than standard/mcs/mls Nit: repolicy -> refpolicy > variants. What surprises users is that a looser repolicy does not Nit: repolicy -> refpolicy Yes, this surprised me: https://github.com/SELinuxProject/refpolicy/pull/914 > allow ssh login while the sticter ones do. Nit: sticter -> stricter >@ > This is because Yocto's targeted policy is making users land in > unconfined_u selinux user by default, and unconfined_u is treated > as privileged user, thus being forbidden by default as the default > value of ssh_sysadm_login is false. A Yocto mechanism could be added to map users; I do this in a private layer. >@ > Change to enable ssh_sysadm_login for targeted thus minimal by > default. >@ I don't think ssh_sysadm_login should be enabled by default, given: * RefPolicy upstream doesn't do so (secure by default) * Yocto generally doesn't do so [1] What are your thoughts on adding a configuration fragment instead, similar to [1]? [1] https://docs.yoctoproject.org/security-manual/securing-images.html#considerations-specific-to-the-openembedded-build-system Thanks! Clayton Casciato
diff --git a/recipes-security/refpolicy/refpolicy-targeted_git.bb b/recipes-security/refpolicy/refpolicy-targeted_git.bb index b4bec46..32457f1 100644 --- a/recipes-security/refpolicy/refpolicy-targeted_git.bb +++ b/recipes-security/refpolicy/refpolicy-targeted_git.bb @@ -15,3 +15,5 @@ SRC_URI += " \ file://0001-refpolicy-targeted-Revert-users-Move-unconfined_u-definition-to-unconfi.patch \ file://0002-refpolicy-targeted-make-unconfined_u-the-default-sel.patch \ " + +POLICY_BOOLEANS ?= "ssh_sysadm_login=true"