Commit Graph

667 Commits

Author SHA1 Message Date
Hongxu Jia
612f8bcbcc libselinux-python: support reproducible builds
Originally, direct_url.json contains build path and it was removed
to fix buildpaths issue, but the hash of direct_url.json in RECORD
was not updated. In order to support reproducible builds [1], this
commit manually updates hash of direct_url.json in RECORD after
build path was removed

[1] https://reproducible-builds.org/

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-11-21 11:21:20 +08:00
Anuj Mittal
c6398215c0 policycoreutils: remove reference to obsolete code
The code referenced no longer exists [1]. It was refactored later to
change the way modules are loaded [2].

Remove reference to the code, comment and creation of directory as it
can be set to something else as well.

[1] 565ea9832e
[2] 2ff279e21e

Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-11-19 15:13:24 +08:00
Anuj Mittal
9894597022 selinux-python: make semanage RDEPENDS on sepolgen
Make the dependency explicit, otherwise when it leads to errors when it
is not included.

| ~ # semanage permissive
| Traceback (most recent call last):
|   File "/sbin/semanage", line 29, in <module>
|     import seobject
|   File "/usr/lib/python3.13/site-packages/seobject.py", line 33, in <module>
|     import sepolicy
|   File "/usr/lib/python3.13/site-packages/sepolicy/__init__.py", line 8, in <module>
|     import sepolgen.defaults as defaults
| ModuleNotFoundError: No module named 'sepolgen'

Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-11-19 15:12:44 +08:00
Yi Zhao
5776ff1a93 refpolicy: update to latest git rev
* 739ee699b portage: grant compile domains getattr on chr_files in /dev
* 7de9ae015 ssh: set file context for default locations of split binaries
* 4af789c43 check_fc_files.py: Add a version suffix match
* e93b0cf5e devices: Add iio write and rw interfaces

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-11-06 10:24:56 +08:00
Sasi Kumar Maddineni
5ef032c675 refpolicy: Correct policy version in semanage.conf as per checkpolicy
The code "OUTPUT_POLICY=`${STAGING_BINDIR_NATIVE}/checkpolicy -V | cut -d' ' -f1`"
assigns OUTPUT_POLICY with 35 and policy.35 is getting generated.

So, correcting the policy version in semanage.conf file too.

Signed-off-by: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-10-23 10:51:25 +08:00
Sasi Kumar Maddineni
237007feee refpolicy: Remove build path reference from file_contexts.homedirs
filecontexts.homedirs is getting populated with reference to TMPDIR
path and yocto's QA check is flagging it.

To avoid this, removing the line that contains TMPDIR path from
filecontexts.homedirs.

Signed-off-by: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-10-23 10:50:29 +08:00
Sasi Kumar Maddineni
7bbd3b12d8 refpolicy: Use selinux tools from recipe-sysroot path
The following code snippet from refpolicy shows that the host machine's
/sbin, /usr/bin, /usr/sbin paths were configured to use selinux tools,
instead from yocto build recipe-sysroot paths.

refpolicy/Makefile:47:BINDIR ?= /usr/bin
refpolicy/Makefile:48:SBINDIR ?= /usr/sbin
refpolicy/Makefile:63:tc_usrbindir := $(BINDIR)
refpolicy/Makefile:64:tc_usrsbindir := $(SBINDIR)
refpolicy/Makefile:65:tc_sbindir := /sbin

Fix: Configured 'tc_usrsbindir' and 'tc_sbindir' with yocto build
recipe-sysroot paths. 'tc_usrbindir' already configured as
per recipe-sysroot paths.

Signed-off-by: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-10-23 10:48:27 +08:00
Sasi Kumar Maddineni
b7822f7772 refpolicy: Skip HLL module processing for monolithic policy builds
Avoid processing and copying high-level language (.pp) modules during do_install
when MONOLITHIC=y is set. This prevents build failures due to missing files in
/usr/share/selinux/targeted, which are not generated in monolithic mode.

Fixes error:
  cp: cannot stat '/usr/share/selinux/targeted/*.*': No such file or directory

Signed-off-by: Sasi Kumar Maddineni <quic_sasikuma@quicinc.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-10-23 10:47:54 +08:00
Yi Zhao
6f88a2fba5 refpolicy: upgrade 20250213+git -> 20250923+git
ChangeLog:
https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20250618
https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20250923

Notable Changes

20250618:
* Updates to support screen 5.0.
* Add labeling for bcachefs.
* Various systemd updates and fixes.

20250923:
* Several updates and fixes for systemd
* Add new permissions and policy capabilities
* Drop reiserfs support (it was removed in kernel 6.13)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-10-01 20:36:39 +08:00
Yi Zhao
6b87622198 setools: upgrade 4.5.1 -> 4.6.0
ChangeLog:
https://github.com/SELinuxProject/setools/releases/tag/4.6.0

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-09-23 14:19:38 +08:00
Vincent Davis Jr
db37a0b841 selinux-python: fix No module named pip
When running the do install task run
into No modules named pip.

Add python3-pip-native to DEPENDS
so that pip it available.

PREFIX variable not being set also
appears to effect whether pip is
found or not. No reason was found
as to why that is.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-08-27 22:56:12 +08:00
Vincent Davis Jr
d8a8d39377 libselinux-python: fix No module named pip
When running the do install task run
into No modules named pip.

Add python3-pip-native to DEPENDS
so that pip it available.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-08-27 22:55:45 +08:00
Yi Zhao
979b3caf98 selinux: upgrade 3.8.1 -> 3.9
ChangeLog:
https://github.com/SELinuxProject/selinux/releases/tag/3.9

* Support static-only builds with DISABLE_SHARED=y
* Add restore option to modify user and role portions
* setfiles: Add -U option to modify user and role portions
* semanage.conf: Add relabel_store config option
* semodule: Add [-g PATH |--config=PATH] for an alternate path for the
  semanage config
* libselinux: Fix local literal fcontext definitions priority
* libselinux: Fix order for path substitutions
* libsepol: Add new 'netif_wildcard' policy capability
* checkpolicy: Add support for wildcard netifcon names
* libsepol: Allow multiple policycap statements
* libsepol: Support genfs_seclabel_wildcard
* Replace all links to selinuxproject.org
* Bug fixes

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-08-07 21:06:27 +08:00
Poonam Jadhav
954e13ed6c libselinux-python: Add native support
Add native support for libselinux-python
to fix build error for setools-native

ERROR: Nothing RPROVIDES 'libselinux-python-native'
(but virtual:native: meta-selinux/recipes-security/setools/setools_4.5.1.bb
RDEPENDS on or otherwise requires it)

Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-07-11 11:21:59 +08:00
Poonam Jadhav
48f7a7ba09 setools: Add native support
Enable using setools native for analyzing
the built SELinux policy during the build.

Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-07-11 11:18:58 +08:00
Scott Murray
05178ce178 Adapt to UNPACKDIR changes
Remove or update S definitions as required to work with oe-core
S/UNPACKDIR changes.  A default definition of S has been added to
selinux_common.inc to avoid duplication in the set of recipes that
use it to build packages from different subdirectories of the selinux
repo.  The three packagegroups test build successfully with these
changes.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-06-30 13:38:18 +08:00
Yi Zhao
32adf788c7 refpolicy: update to latest git rev
* 5a6c7d8bf systemd: Add log env to systemd-machine-id-setup.
* 33af8dfa4 Module for ipmitool
* a3a6b1704 oddjob: allow oddjob_mkhomedir_t privfd:fd use
* 621eb6caf systemd: allow reading /dev/cpu/0/msr
* fb0e9cdda Remove unneeded backticks from gen_tunable
* 2240e1a89 locallogin: allow sulogin_t user_tty_device_t rw

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-04-22 14:54:24 +08:00
Yi Zhao
b60fb46e68 refpolicy: update to latest rev
* d05a0d068 networkmanager: Watch systemd directories for
            nm-session-monitor.
* 3a60340e9 systemd: allow systemd-hostnamed and systemd-rfkill to get
            attributes of nsfs inodes
* ccbf1d66f fixup! Allow to specify module version
* d664ebbaa Allow to specify module version
* 1c8a95dbc Fix mislabeling of /etc/shadow
* ec2b2befd locallogin: allow sulogin_t unconfined domtrans
* 450522052 use init_use_script_ptys for knotc in initscript
* 79dda56d3 locallogin: dontaudit sulogin_t checkpoint_restore
* 4b3b8e7ce lldpad: Configure FW-LLDP on i40e NICs.
* ed9d87976 Revert "Merge pull request #867 from PPN-SD/upd-knot-sel"
* e053fced8 files, init: filetrans /run/machine-id etc_runtime_t
* c5a76add7 firewalld: fix firewalld_t firewalld_tmpfs_t exec
* 8a4043060 firewalld: fix lib_t Python cache denial auditing
* bcb8e1d4d unconfined: fix oddjob security_compute_sid
* ec8a5080a Permit init_t to start a detached screen session
* b025e0ec4 Add setcap to knotd / add knotc_initrc_domtrans
* 231960371 chronyd: fix dac_read_search denials

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2025-04-02 15:15:58 +08:00
Yi Zhao
5ce36d63ef selinux: upgrade 3.8 -> 3.8.1
ChangeLog:
https://github.com/SELinuxProject/selinux/releases/tag/3.8.1

* libsemanage: improved performance of semanage store rebuild

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2025-03-10 09:51:22 -04:00
Yi Zhao
87fb662ff1 refpolicy: update to 20250213+git
ChangeLog:
https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20250213

* Add tool for validating appconfig contexts files.
* Add netlink extended permissions definitions.
* Updates for Systemd up to v257.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2025-03-07 14:34:46 -05:00
Yi Zhao
4273eb6d6e selinux: upgrade 3.7 -> 3.8
ChangeLog:
https://github.com/SELinuxProject/selinux/releases/tag/3.8

* libsemanage: Preserve file context and ownership in policy store
* libselinux: deprecate security_disable(3)
* libsepol: Support nlmsg extended permissions
* libsepol: Add policy capability netlink_xperm
* libsemanage: Optionally allow duplicate declarations
* policycoreutils: introduce unsetfiles
* libselinux/utils: introduce selabel_compare
* improved selabel_lookup performance
* libselinux: support parallel usage of selabel_lookup(3)
* libsepol: add support for xperms in conditional policies
* Improved man pages
* Code improvements and bug fixes
* Always build for LFS mode on 32-bit archs.
* libsemanage: Mute error messages from selinux_restorecon introduced in
  3.8-rc1
* Regex spec ordering is restored to pre 3.8-rc1
* Binary fcontext files format changed, files using old format are ignored
* Code improvements and bug fixes

License-Update: White space cleanup for libsemanage/LICENSE

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2025-03-07 14:34:45 -05:00
Yi Zhao
1e40ada23b setools: inherit cython class
Use the new cython class to avoid duplicated fixup code to remove build
paths.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2025-03-07 14:33:23 -05:00
Yi Zhao
1b4c274757 libsemanage: fix build with swig 4.3
Backport a patch to fix build with swig 4.3[1].

[1] https://github.com/SELinuxProject/selinux/issues/447

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-12-10 12:39:38 -05:00
Yi Zhao
c3527f5859 libselinux-python: fix build with swig 4.3
Backport a patch to fix build with swig 4.3[1].

[1] https://github.com/SELinuxProject/selinux/issues/447

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-12-10 12:39:38 -05:00
Yi Zhao
06289974f8 selinux-python: fix sepolicy runtime error
For some distributions (e.g. Yocto) that do not provide
system-release/distribution-release file, libdnf can not get releasever
variable, causing conf.substitutions['releasever'] to not be set.
This will cause 'sepolicy generate' command to fail with the following
error on these distributions:

$ sepolicy generate --init /usr/local/bin/foo
Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 702, in <module>
    args.func(args)
  File "/usr/bin/sepolicy", line 569, in generate
    mypolicy.gen_writeable()
  File "/usr/lib/python3.12/site-packages/sepolicy/generate.py", line 1302, in gen_writeable
    self.__extract_rpms()
  File "/usr/lib/python3.12/site-packages/sepolicy/generate.py", line 1268, in __extract_rpms
    base.read_all_repos()
  File "/usr/lib/python3.12/site-packages/dnf/base.py", line 554, in read_all_repos
    for repo in reader:
                ^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/conf/read.py", line 42, in __iter__
    for r in self._get_repos(self.conf.config_file_path):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/conf/read.py", line 109, in _get_repos
    parser.setSubstitutions(substs)
  File "/usr/lib/python3.12/site-packages/libdnf/conf.py", line 1643, in setSubstitutions
    return _conf.ConfigParser_setSubstitutions(self, substitutions)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: in method 'ConfigParser_setSubstitutions', argument 2 of type 'std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > const &'

Set conf.substitutions['releasever'] to empty str if releasever is None.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-10-10 17:47:34 -04:00
Yi Zhao
98456e0868 refpolicy: upgrade 20240226+git -> 20240916+git
ChangeLog:
https://github.com/SELinuxProject/refpolicy/releases/tag/RELEASE_2_20240916

Notable Changes
  Added sechecker configuration for GitHub CI actions.
  Cleaned up concerning permissions uncovered by sechecker
  Removed extremely deprecated domains in cups (ptal) and xen (xend/xm)
  Systemd updates up to v256
  Various container fixes

New Modules
  haproxy

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-10-09 10:23:22 -04:00
Yi Zhao
f8ccc77076 refpolicy: update to latest git rev
* Update policy for systemd-v256

  c20cf2214 systemd: allow systemd-hostnamed to read vsock device
  4f3437040 systemd: fix policy for systemd-ssh-generator
  d852b7540 devices: add label vsock_device_t for /dev/vsock
  a4a7b830f systemd: add policy for systemd-nsresourced
  47081be47 systemd: allow system --user to create netlink_route_socket
  78cacc708 systemd: allow systemd-networkd to manage sock files under
            /run/systemd/netif
  29d0bb8c3 systemd: set context to systemd_networkd_var_lib_t for
            /var/lib/systemd/network
  22fd3ddad Allow interactive user terminal output for the NetLabel
            management tool.
  c1284c601 bluetooth: Move line.
  50a5555f2 Adding SE Policy rules to allow usage of unix stream sockets
            by dbus and bluetooth contexts when Gatt notifications are
            turned on by remote.
  2b8fa2b4a kubernetes: allow kubelet to connect all TCP ports
  9ab94df30 container: allow reading generic certs
  7530dfa3c testing: add container_kvm_t to net admin exempt list
  47eced9be Makefile: drop duplicate quotes
  b0b0d52dd various: rules required for DV manipulation in kubevirt
  21e4a44c0 container: add container_kvm_t and supporting kubevirt rules
  a9bd177bb iptables: allow reading container engine tmp files
  af0b40824 container: allow spc various rules for kubevirt
  d585f08c2 container, kubernetes: add supporting rules for kubevirt and
            multus
  9f37f86b2 dbus: dontaudit session bus domains the netadmin capability
  d9ca32f5a container: allow super privileged containers to manage BPF
            dirs
  1900fbe68 kubernetes: allow kubelet to create unlabeled dirs
  b9c8ba607 haproxy: allow interactive usage
  846804c58 podman: allow managing init runtime units
  8787b3d8d iptables: allow reading usr files

* Drop obsolete patches:
  0033-policy-modules-services-rpcbind-allow-rpcbind_t-to-c.patch
  0039-policy-modules-system-authlogin-fix-login-errors-aft.patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-09-24 15:21:39 -04:00
Yi Zhao
3482e0e650 setools: switch to PEP-517 build backend
Fix QA warning:
WARNING: setools-4.5.1-r0 do_check_backend: QA Issue: inherits
setuptools3 but has pyproject.toml with setuptools.build_meta, use the
correct class [pep517-backend]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-08-26 08:16:18 -04:00
Alejandro Enedino Hernandez Samaniego
9b392cb0fd policycoreutils: fix packaging for sestatus binary
sestatus is provided as ${base_sbindir}/sestatus which is currently packaged into
PN-sestatus, however, this is only a symlink to the binary located in
${bindir}/sestatus.

This causes that when runtime dependencies are calculated, bitbake properly detects
a dependency from policycoreutils-sestatus to the main policycoreutils package.

Hence the policycoreutils-sestatus package has no usability by itself, this has
several implications, but one of them means that it recursively pulls all
runtime dependencies, making policycoreutils-sestatus require everything that the
main policycoreutils package RDEPENDS on, including python3.

By correctly splitting these packages, an image that RDEPENDS only on
policycoreutils-sestatus decreases its size by about ~13MB.

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-07-24 10:50:23 -04:00
Yi Zhao
5a92976a86 refpolicy: update to latest git rev
* a6cf20736 filesystem, devices: move gadgetfs to usbfs_t
* 75492f95f systemd: make xdg optional
* 097d688ff sshd: label sshd-session as sshd_exec_t
* b57b6005c Setting bluetooth helper domain for bluetoothctl
* 30f451d6a Adding Sepolicy rules to allow pulseaudio to access
            bluetooth sockets.
* 7037c341f systemd: allow logind to use locallogin pidfds
* 5f7f494d1 userdomain: allow administrative user to get attributes of
            shadow history file
* 0126cb1e6 node_exporter: allow reading RPC sysctls
* 9c90f9f7d asterisk: allow reading certbot lib
* bfcaec9ba postfix: allow postfix pipe to watch mail spool
* 06a80c3d8 netutils: allow ping to read net sysctls
* 2e0509c9e node_exporter: allow reading localization
* 50a8cddd1 container: allow containers to execute tmpfs files
* 09a747a16 sysadm: make haproxy admin
* c8c3ae2cb haproxy: initial policy
* 4e97f87ce init: use pidfds from local login
* 7fd9032d8 dbus, init: add interface for pidfd usage
* a6d6921a9 asterisk: allow watching spool dirs
* 72c1d912f su, sudo: allow sudo to signal all su domains
* 8b3178248 sudo: allow systemd-logind to read cgroup state of sudo
* 871f0b0dd postfix: allow smtpd to mmap SASL keytab files
* 578375480 sysnetwork: allow ifconfig to read usr files
* 6916e9b20 systemd: allow systemd-logind to use sshd pidfds
* 96ebb7c4e Reorder perms and classes
* cb68df087 tests.yml: Add policy diff on PRs.
* 99258825c tests.yml: Divide into reusable workflows.
* 1e4b68930 Reorder perms and classes

Drop 0002-refpolicy-minimum-make-xdg-module-optional.patch and
0040-policy-modules-system-systemd-allow-systemd-logind-t.patch which
have been merged upstream.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-07-24 09:21:52 -04:00
Yi Zhao
0dbf1bdc02 refpolicy: fixes for auditctl and rsyslog
* Allow auditctl to read symlink of var/log directory.
* Grant getpcap capability to syslogd_t.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-07-23 12:51:05 -04:00
Yi Zhao
37ede3a5fe refpolicy: update to latest git rev
* 2102055d4 devices: Change dev_rw_uhid() to use a policy pattern
* 1cbe455a5 device: Move dev_rw_uhid definition
* 7a33b4bc8 Sepolicy changes for bluez to access uhid
* c6dd4087d selinuxutil: make policykit optional
* 10feb47e5 newrole: allow newrole to search faillock runtime directory
* bf34d3e5e sysnetwork: fixes for dhcpcd
* 4663e613f Adding Sepolicy rules to allow bluetoothctl and dbus-daemon
            to access unix stream sockets
* 27602a932 various: various fixes
* 63d50bbaa container, crio, kubernetes: minor fixes
* 11e729e27 container, podman: various fixes
* ef5954a0e systemd: allow systemd-sysctl to search tmpfs
* 472e0442e container: allow containers to getcap
* 7876e5151 container: allow system container engines to mmap runtime
            files
* d917092a8 matrixd: add tunable for binding to all unreserved ports
* 3dba91dd4 bootloader: allow systemd-boot to manage EFI binaries
* ddf395d5d asterisk: allow binding to all unreserved UDP ports
* 3bad3696b postgres: add a standalone execmem tunable
* ef28f7879 userdom: allow users to read user home dir symlinks
* 03711caea dovecot: allow dovecot-auth to read SASL keytab
* cd781e783 fail2ban: allow reading net sysctls
* ddc6ac493 init: allow systemd to use sshd pidfds
* b9c457d80 files context for merged-usr profile on gentoo
* 5040dd3b6 Need map perm for cockpit 300.4
* 2ef9838db tests.yml: Add sechecker testing
* c62bd5c6c cockpit: Change $1_cockpit_tmpfs_t to a tmpfs file type
* 1c694125b certbot: Drop execmem
* 349411d55 xen: Drop xend/xm stack
* 2a261f916 Allow systemd to pass down sig mask
* 2577feb83 cups: Remove PTAL
* 5b02b44e5 xen: Revoke kernel module loading permissions
* 1c20c002c minissdpd: Revoke kernel module loading permissions
* 5671390e2 docker: Fix dockerc typo in container_engine_executable_file
* e1bc4830d cron: Use raw entrypoint rule for system_cronjob_t
* 0f71792c8 uml: Remove excessive access from user domains on
            uml_exec_t
* 511223e2d Set the type on /etc/machine-info to net_conf_t so
            hostnamectl can manipulate it (CRUD)
* 72fc1b2a3 fix: minor correction in MCS_CATS range comment
* cbf56c8ae systemd: allow notify client to stat socket

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-07-23 12:51:05 -04:00
Etienne Cordonnier
e77a4e1c93 selinux-python: make GPLv3 dependency optional
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-06-29 21:04:15 -04:00
Yi Zhao
c1f20cb764 setools: upgrade 4.4.4 -> 4.5.1
ChangeLog:
https://github.com/SELinuxProject/setools/releases/tag/4.5.0
https://github.com/SELinuxProject/setools/releases/tag/4.5.1

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-06-29 20:48:59 -04:00
Yi Zhao
e506763d39 selinux: upgrade 3.6 -> 3.7
ChangeLog:
https://github.com/SELinuxProject/selinux/releases/tag/3.7

* audit2allow -C for CIL output mode
* sepolgen: adjust parse for refpolicy
* semanage: Allow modifying records on "add"
* semanage: Do not sort local fcontext definitions
* Improved man pages
* checkpolicy: support CIDR notation for nodecon statements
* sandbox: Add support for Wayland
* Code improvements and bug fixes

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-06-29 20:48:59 -04:00
Changqing Li
de19386222 recipes: WORKDIR -> UNPACKDIR transition
* WORKDIR -> UNPACKDIR transition
* Switch away from S = WORKDIR

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-06-26 11:09:53 -04:00
Yi Zhao
8784122dde packagegroup-selinux-minimal: add missing runtime dependency selinux-autorelabel
Add selinux-autorelabel to reset the SELinux label on the root
filesystem at boot time.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-06-26 11:09:53 -04:00
Yi Zhao
769274a8ca refpolicy: update to latest git rev
* 0aff1990e quote: read localization
* ab13c0421 getty: grant checkpoint_restore
* 3643773ae Update SOS report to work on RHEL9
* 523b279bd Setup domain for dbus selinux interface

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
2024-04-19 20:21:17 -04:00
Yi Zhao
7fc76cf77b refpolicy: upgrade 20231002+git -> 20240226+git
ChangeLog:
https://github.com/SELinuxProject/refpolicy/blob/main/Changelog

Notable Changes:
  Many systemd updates up to v255
  RPM and dnf fixes
  Tighten private key handling for Apache
  Many container and kubernetes improvements
  Add support for Cilium
  Update object class definitions up to io_uring:cmd
  Add additional rules to cloud-init based on sysadm_t

* Update to latest git rev.
* Refresh patches.
* Add a patch to fix reboot timeout error.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2024-03-12 08:34:35 -04:00
Yi Zhao
4544e817a1 refpolicy: drop ${SRCPV} usage
Drop SRCPV as this variable is no longer needed in PV[1].

[1] https://git.openembedded.org/openembedded-core/commit/?id=a8e7b0f932b9ea69b3a218fca18041676c65aba0

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2024-02-28 07:49:48 -05:00
Yi Zhao
6fcfb3a600 refpolicy: update to latest git rev
Update to latest rev to fix policy for systemd 255.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2024-02-27 12:30:21 -05:00
Yi Zhao
39a5525a22 libselinux-python: add recipe
We merged libselinux recipe and libselinux-python recipe in commit[1]
because we thought the circular dependency was gone. But unfortunately,
it still exists.

Here are the steps to reproduce:
$ echo "DISTRO_FEATURES:append = \" x11\"" >> conf/local.conf
$ echo "PACKAGECONFIG:append:pn-python3 = \" tk\"" >> conf/local.conf
$ bitbake core-image-selinux -n

So we still need to split the libselinux recipe into two recipes:
libselinux and libselinux-python.

[1] https://git.yoctoproject.org/meta-selinux/commit/?id=62b9c816a5000dc01b28e78213bde26b58cbca9d

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2024-01-24 10:20:31 -05:00
Yi Zhao
7d5dc44b35 setools: upgrade 4.4.3 -> 4.4.4
ChangeLog:
https://github.com/SELinuxProject/setools/releases/tag/4.4.4

* Refresh local patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00
Yi Zhao
8950bef26c semodule-utils: upgrade 3.5 -> 3.6
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00
Yi Zhao
085abdcf42 selinux-sandbox: upgrade 3.5 -> 3.6
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00
Yi Zhao
24e994955d selinux-gui: upgrade 3.5 -> 3.6
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00
Yi Zhao
a14ae01ba9 selinux-dbus: upgrade 3.5 -> 3.6
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00
Yi Zhao
94ee9d0a42 selinux-python: upgrade 3.5 -> 3.6
* Refresh patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00
Yi Zhao
527b6649e9 restorecond: upgrade 3.5 -> 3.6
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00
Yi Zhao
5044ef5352 mcstrans: upgrade 3.5 -> 3.6
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
2023-12-18 11:06:31 -05:00