| Message ID | 20261206051525.304963-1-nirameka@qti.qualcomm.com |
|---|---|
| State | New |
| Headers | show |
| Series | [meta-security] swtpm: do not enable bundled SELinux policy by default | expand |
diff --git a/meta-tpm/recipes-tpm/swtpm/swtpm_0.10.2.bb b/meta-tpm/recipes-tpm/swtpm/swtpm_0.10.2.bb index 50d2cfc..d5153bc 100644 --- a/meta-tpm/recipes-tpm/swtpm/swtpm_0.10.2.bb +++ b/meta-tpm/recipes-tpm/swtpm/swtpm_0.10.2.bb @@ -21,7 +21,6 @@ TSS_USER = "tss" TSS_GROUP = "tss" PACKAGECONFIG ?= "openssl gnutls" -PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 'seccomp', '', d)}" PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}" PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
swtpm's --with-selinux option builds and installs the SELinux policy modules bundled with swtpm. It does not enable SELinux functionality in the swtpm binaries themselves. The recipe currently enables this option automatically whenever "selinux" is present in DISTRO_FEATURES. This implicitly selects swtpm's bundled policy implementation even when the distribution provides swtpm policy through its selected virtual/refpolicy provider. The current recipe also does not provide the policy development environment required by this option. swtpm invokes /usr/share/selinux/devel/Makefile, while Yocto policy development files and native tools are supplied through recipe sysroots. After staging the equivalent virtual/refpolicy and native policy build tools, the bundled swtpm policy additionally fails against the selected upstream refpolicy because it uses fs_mmap_nfs_files(), which that policy does not provide. Do not select swtpm's bundled policy automatically from DISTRO_FEATURES. Keep PACKAGECONFIG[selinux] available so distributions that intentionally use the bundled policy can continue to enable it explicitly. This allows distributions using virtual/refpolicy to keep swtpm policy ownership in the selected system policy provider. Signed-off-by: Niranjan Reddy Mekala <nirameka@qti.qualcomm.com> --- meta-tpm/recipes-tpm/swtpm/swtpm_0.10.2.bb | 1 - 1 file changed, 1 deletion(-)