summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2024-07-24 13:38:55 +0800
committerJoe MacDonald <joe.macdonald@siemens.com>2024-07-24 09:21:52 -0400
commit5a92976a8614e1eb639988ecef4cce890418d4e8 (patch)
tree80e00f5623ada4830ed2badec8b56c44c7938f97
parent0dbf1bdc02cdcb38b5a57fad351adeff8d12b66d (diff)
downloadmeta-selinux-5a92976a8614e1eb639988ecef4cce890418d4e8.tar.gz
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>
-rw-r--r--recipes-security/refpolicy/refpolicy-minimum_git.bb1
-rw-r--r--recipes-security/refpolicy/refpolicy/0002-refpolicy-minimum-make-xdg-module-optional.patch40
-rw-r--r--recipes-security/refpolicy/refpolicy/0040-policy-modules-system-logging-grant-getpcap-capabili.patch (renamed from recipes-security/refpolicy/refpolicy/0057-policy-modules-system-logging-grant-getpcap-capabili.patch)0
-rw-r--r--recipes-security/refpolicy/refpolicy/0040-policy-modules-system-systemd-allow-systemd-logind-t.patch38
-rw-r--r--recipes-security/refpolicy/refpolicy_common.inc3
-rw-r--r--recipes-security/refpolicy/refpolicy_git.inc2
6 files changed, 2 insertions, 82 deletions
diff --git a/recipes-security/refpolicy/refpolicy-minimum_git.bb b/recipes-security/refpolicy/refpolicy-minimum_git.bb
index 67c3785..562ccac 100644
--- a/recipes-security/refpolicy/refpolicy-minimum_git.bb
+++ b/recipes-security/refpolicy/refpolicy-minimum_git.bb
@@ -13,7 +13,6 @@ domains are unconfined. \
13 13
14SRC_URI += " \ 14SRC_URI += " \
15 file://0001-refpolicy-minimum-make-sysadmin-module-optional.patch \ 15 file://0001-refpolicy-minimum-make-sysadmin-module-optional.patch \
16 file://0002-refpolicy-minimum-make-xdg-module-optional.patch \
17 " 16 "
18 17
19POLICY_NAME = "minimum" 18POLICY_NAME = "minimum"
diff --git a/recipes-security/refpolicy/refpolicy/0002-refpolicy-minimum-make-xdg-module-optional.patch b/recipes-security/refpolicy/refpolicy/0002-refpolicy-minimum-make-xdg-module-optional.patch
deleted file mode 100644
index cc8c0b7..0000000
--- a/recipes-security/refpolicy/refpolicy/0002-refpolicy-minimum-make-xdg-module-optional.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 39b825d24a34864c3d9bae684b083a9b656f641a Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Wed, 29 Sep 2021 11:08:49 +0800
4Subject: [PATCH] refpolicy-minimum: make xdg module optional
5
6The systemd module invokes xdg_config_content and xdg_data_content
7interfaces which are from xdg module. Since xdg is not a core module, we
8could make it optional in minimum policy.
9
10Upstream-Status: Inappropriate [embedded specific]
11
12Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
13---
14 policy/modules/system/systemd.te | 8 ++++++--
15 1 file changed, 6 insertions(+), 2 deletions(-)
16
17diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te
18index a0e6bb405..b1fc414ea 100644
19--- a/policy/modules/system/systemd.te
20+++ b/policy/modules/system/systemd.te
21@@ -313,10 +313,14 @@ init_unit_file(systemd_user_manager_unit_t)
22
23 type systemd_conf_home_t;
24 init_unit_file(systemd_conf_home_t)
25-xdg_config_content(systemd_conf_home_t)
26+optional_policy(`
27+ xdg_config_content(systemd_conf_home_t)
28+')
29
30 type systemd_data_home_t;
31-xdg_data_content(systemd_data_home_t)
32+optional_policy(`
33+ xdg_data_content(systemd_data_home_t)
34+')
35
36 type systemd_user_runtime_notify_t;
37 userdom_user_runtime_content(systemd_user_runtime_notify_t)
38--
392.25.1
40
diff --git a/recipes-security/refpolicy/refpolicy/0057-policy-modules-system-logging-grant-getpcap-capabili.patch b/recipes-security/refpolicy/refpolicy/0040-policy-modules-system-logging-grant-getpcap-capabili.patch
index 5c2e789..5c2e789 100644
--- a/recipes-security/refpolicy/refpolicy/0057-policy-modules-system-logging-grant-getpcap-capabili.patch
+++ b/recipes-security/refpolicy/refpolicy/0040-policy-modules-system-logging-grant-getpcap-capabili.patch
diff --git a/recipes-security/refpolicy/refpolicy/0040-policy-modules-system-systemd-allow-systemd-logind-t.patch b/recipes-security/refpolicy/refpolicy/0040-policy-modules-system-systemd-allow-systemd-logind-t.patch
deleted file mode 100644
index 4322590..0000000
--- a/recipes-security/refpolicy/refpolicy/0040-policy-modules-system-systemd-allow-systemd-logind-t.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 1b8a639bfdce84c9b39cd9e89b6da4c1d06cc7ab Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Sun, 4 Feb 2024 19:40:32 +0800
4Subject: [PATCH] policy/modules/system/systemd: allow systemd-logind to
5 inherit local login file descriptors
6
7Fix reboot timeout error:
8$ reboot
9Failed to set wall message, ignoring: Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
10Call to Reboot failed: Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
11
12avc: denied { use } for pid=287 comm="systemd-logind"
13path="anon_inode:[pidfd]" dev="anon_inodefs" ino=1044
14scontext=system_u:system_r:systemd_logind_t
15tcontext=system_u:system_r:local_login_t tclass=fd permissive=0
16
17Upstream-Status: Pending
18
19Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
20---
21 policy/modules/system/systemd.te | 1 +
22 1 file changed, 1 insertion(+)
23
24diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te
25index ffce3c0e8..03aeb8515 100644
26--- a/policy/modules/system/systemd.te
27+++ b/policy/modules/system/systemd.te
28@@ -973,6 +973,7 @@ init_stop_system(systemd_logind_t)
29 miscfiles_read_localization(systemd_logind_t)
30
31 locallogin_read_state(systemd_logind_t)
32+locallogin_use_fds(systemd_logind_t)
33
34 seutil_libselinux_linked(systemd_logind_t)
35 seutil_read_default_contexts(systemd_logind_t)
36--
372.25.1
38
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc
index 05dca2c..7b45882 100644
--- a/recipes-security/refpolicy/refpolicy_common.inc
+++ b/recipes-security/refpolicy/refpolicy_common.inc
@@ -55,7 +55,7 @@ SRC_URI += " \
55 file://0037-policy-modules-roles-sysadm-allow-sysadm-to-use-init.patch \ 55 file://0037-policy-modules-roles-sysadm-allow-sysadm-to-use-init.patch \
56 file://0038-policy-modules-system-systemd-systemd-user-fixes.patch \ 56 file://0038-policy-modules-system-systemd-systemd-user-fixes.patch \
57 file://0039-policy-modules-system-authlogin-fix-login-errors-aft.patch \ 57 file://0039-policy-modules-system-authlogin-fix-login-errors-aft.patch \
58 file://0040-policy-modules-system-systemd-allow-systemd-logind-t.patch \ 58 file://0040-policy-modules-system-logging-grant-getpcap-capabili.patch \
59 file://0041-policy-modules-system-mount-make-mount_t-domain-MLS-.patch \ 59 file://0041-policy-modules-system-mount-make-mount_t-domain-MLS-.patch \
60 file://0042-policy-modules-roles-sysadm-MLS-sysadm-rw-to-clearan.patch \ 60 file://0042-policy-modules-roles-sysadm-MLS-sysadm-rw-to-clearan.patch \
61 file://0043-policy-modules-services-rpc-make-nfsd_t-domain-MLS-t.patch \ 61 file://0043-policy-modules-services-rpc-make-nfsd_t-domain-MLS-t.patch \
@@ -72,7 +72,6 @@ SRC_URI += " \
72 file://0054-policy-modules-system-setrans-allow-setrans_t-use-fd.patch \ 72 file://0054-policy-modules-system-setrans-allow-setrans_t-use-fd.patch \
73 file://0055-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch \ 73 file://0055-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch \
74 file://0056-policy-modules-system-logging-make-syslogd_runtime_t.patch \ 74 file://0056-policy-modules-system-logging-make-syslogd_runtime_t.patch \
75 file://0057-policy-modules-system-logging-grant-getpcap-capabili.patch \
76 " 75 "
77 76
78S = "${WORKDIR}/refpolicy" 77S = "${WORKDIR}/refpolicy"
diff --git a/recipes-security/refpolicy/refpolicy_git.inc b/recipes-security/refpolicy/refpolicy_git.inc
index ee69664..80d92ac 100644
--- a/recipes-security/refpolicy/refpolicy_git.inc
+++ b/recipes-security/refpolicy/refpolicy_git.inc
@@ -2,7 +2,7 @@ PV = "2.20240226+git"
2 2
3SRC_URI = "git://github.com/SELinuxProject/refpolicy.git;protocol=https;branch=main;name=refpolicy;destsuffix=refpolicy" 3SRC_URI = "git://github.com/SELinuxProject/refpolicy.git;protocol=https;branch=main;name=refpolicy;destsuffix=refpolicy"
4 4
5SRCREV_refpolicy ?= "c920fc5d9e626874b9af8693e5aa697200f76a12" 5SRCREV_refpolicy ?= "71f4bd1992e05bcd79dc5234f8a30deeb141aa3d"
6 6
7UPSTREAM_CHECK_GITTAGREGEX = "RELEASE_(?P<pver>\d+_\d+)" 7UPSTREAM_CHECK_GITTAGREGEX = "RELEASE_(?P<pver>\d+_\d+)"
8 8