diff options
81 files changed, 556 insertions, 1636 deletions
diff --git a/recipes-security/refpolicy/refpolicy-minimum_git.bb b/recipes-security/refpolicy/refpolicy-minimum_git.bb index 2e95b9f..a50a4cd 100644 --- a/recipes-security/refpolicy/refpolicy-minimum_git.bb +++ b/recipes-security/refpolicy/refpolicy-minimum_git.bb | |||
@@ -14,28 +14,28 @@ domains are unconfined. \ | |||
14 | SRC_URI += " \ | 14 | SRC_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 \ | 16 | file://0002-refpolicy-minimum-make-xdg-module-optional.patch \ |
17 | file://0003-refpolicy-minimum-enable-nscd_use_shm.patch \ | 17 | file://0003-refpolicy-minimum-make-dbus-module-optional.patch \ |
18 | " | 18 | " |
19 | 19 | ||
20 | POLICY_NAME = "minimum" | 20 | POLICY_NAME = "minimum" |
21 | 21 | ||
22 | CORE_POLICY_MODULES = "unconfined \ | 22 | CORE_POLICY_MODULES = "unconfined \ |
23 | selinuxutil \ | 23 | selinuxutil \ |
24 | storage \ | 24 | storage \ |
25 | sysnetwork \ | 25 | sysnetwork \ |
26 | application \ | 26 | application \ |
27 | libraries \ | 27 | libraries \ |
28 | miscfiles \ | 28 | miscfiles \ |
29 | logging \ | 29 | logging \ |
30 | userdomain \ | 30 | userdomain \ |
31 | init \ | 31 | init \ |
32 | mount \ | 32 | mount \ |
33 | modutils \ | 33 | modutils \ |
34 | getty \ | 34 | getty \ |
35 | authlogin \ | 35 | authlogin \ |
36 | locallogin \ | 36 | locallogin \ |
37 | " | 37 | " |
38 | #systemd dependent policy modules | 38 | # systemd dependent policy modules |
39 | CORE_POLICY_MODULES += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'clock systemd udev fstools dbus', '', d)}" | 39 | CORE_POLICY_MODULES += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'clock systemd udev fstools dbus', '', d)}" |
40 | 40 | ||
41 | # nscd caches libc-issued requests to the name service. | 41 | # nscd caches libc-issued requests to the name service. |
@@ -60,39 +60,38 @@ EXTRA_POLICY_MODULES += "modutils consoletype hostname netutils" | |||
60 | # | 60 | # |
61 | # PURGE_POLICY_MODULES += "xdg xen" | 61 | # PURGE_POLICY_MODULES += "xdg xen" |
62 | 62 | ||
63 | |||
64 | POLICY_MODULES_MIN = "${CORE_POLICY_MODULES} ${EXTRA_POLICY_MODULES}" | 63 | POLICY_MODULES_MIN = "${CORE_POLICY_MODULES} ${EXTRA_POLICY_MODULES}" |
65 | 64 | ||
66 | # re-write the same func from refpolicy_common.inc | 65 | # Re-write the same func from refpolicy_common.inc |
67 | prepare_policy_store () { | 66 | prepare_policy_store() { |
68 | oe_runmake 'DESTDIR=${D}' 'prefix=${D}${prefix}' install | 67 | oe_runmake 'DESTDIR=${D}' 'prefix=${D}${prefix}' install |
69 | POL_PRIORITY=100 | 68 | POL_PRIORITY=100 |
70 | POL_SRC=${D}${datadir}/selinux/${POLICY_NAME} | 69 | POL_SRC=${D}${datadir}/selinux/${POLICY_NAME} |
71 | POL_STORE=${D}${localstatedir}/lib/selinux/${POLICY_NAME} | 70 | POL_STORE=${D}${localstatedir}/lib/selinux/${POLICY_NAME} |
72 | POL_ACTIVE_MODS=${POL_STORE}/active/modules/${POL_PRIORITY} | 71 | POL_ACTIVE_MODS=${POL_STORE}/active/modules/${POL_PRIORITY} |
73 | 72 | ||
74 | # Prepare to create policy store | 73 | # Prepare to create policy store |
75 | mkdir -p ${POL_STORE} | 74 | mkdir -p ${POL_STORE} |
76 | mkdir -p ${POL_ACTIVE_MODS} | 75 | mkdir -p ${POL_ACTIVE_MODS} |
77 | 76 | ||
78 | # get hll type from suffix on base policy module | 77 | # Get hll type from suffix on base policy module |
79 | HLL_TYPE=$(echo ${POL_SRC}/base.* | awk -F . '{if (NF>1) {print $NF}}') | 78 | HLL_TYPE=$(echo ${POL_SRC}/base.* | awk -F . '{if (NF>1) {print $NF}}') |
80 | HLL_BIN=${STAGING_DIR_NATIVE}${prefix}/libexec/selinux/hll/${HLL_TYPE} | 79 | HLL_BIN=${STAGING_DIR_NATIVE}${prefix}/libexec/selinux/hll/${HLL_TYPE} |
81 | 80 | ||
82 | for i in base ${POLICY_MODULES_MIN}; do | 81 | for i in base ${POLICY_MODULES_MIN}; do |
83 | MOD_FILE=${POL_SRC}/${i}.${HLL_TYPE} | 82 | MOD_FILE=${POL_SRC}/${i}.${HLL_TYPE} |
84 | MOD_DIR=${POL_ACTIVE_MODS}/${i} | 83 | MOD_DIR=${POL_ACTIVE_MODS}/${i} |
85 | mkdir -p ${MOD_DIR} | 84 | mkdir -p ${MOD_DIR} |
86 | echo -n "${HLL_TYPE}" > ${MOD_DIR}/lang_ext | 85 | echo -n "${HLL_TYPE}" > ${MOD_DIR}/lang_ext |
87 | 86 | ||
88 | if ! bzip2 -t ${MOD_FILE} >/dev/null 2>&1; then | 87 | if ! bzip2 -t ${MOD_FILE} >/dev/null 2>&1; then |
89 | ${HLL_BIN} ${MOD_FILE} | bzip2 --stdout > ${MOD_DIR}/cil | 88 | ${HLL_BIN} ${MOD_FILE} | bzip2 --stdout > ${MOD_DIR}/cil |
90 | bzip2 -f ${MOD_FILE} && mv -f ${MOD_FILE}.bz2 ${MOD_FILE} | 89 | bzip2 -f ${MOD_FILE} && mv -f ${MOD_FILE}.bz2 ${MOD_FILE} |
91 | else | 90 | else |
92 | bunzip2 --stdout ${MOD_FILE} | \ | 91 | bunzip2 --stdout ${MOD_FILE} | \ |
93 | ${HLL_BIN} | \ | 92 | ${HLL_BIN} | \ |
94 | bzip2 --stdout > ${MOD_DIR}/cil | 93 | bzip2 --stdout > ${MOD_DIR}/cil |
95 | fi | 94 | fi |
96 | cp ${MOD_FILE} ${MOD_DIR}/hll | 95 | cp ${MOD_FILE} ${MOD_DIR}/hll |
97 | done | 96 | done |
98 | } | 97 | } |
diff --git a/recipes-security/refpolicy/refpolicy-targeted_git.bb b/recipes-security/refpolicy/refpolicy-targeted_git.bb index 15226db..de81d46 100644 --- a/recipes-security/refpolicy/refpolicy-targeted_git.bb +++ b/recipes-security/refpolicy/refpolicy-targeted_git.bb | |||
@@ -14,5 +14,4 @@ include refpolicy_${PV}.inc | |||
14 | 14 | ||
15 | SRC_URI += " \ | 15 | SRC_URI += " \ |
16 | file://0001-refpolicy-targeted-make-unconfined_u-the-default-sel.patch \ | 16 | file://0001-refpolicy-targeted-make-unconfined_u-the-default-sel.patch \ |
17 | file://0002-refpolicy-targeted-add-capability2-bpf-and-perfmon-f.patch \ | ||
18 | " | 17 | " |
diff --git a/recipes-security/refpolicy/refpolicy/0001-fc-subs-volatile-alias-common-var-volatile-paths.patch b/recipes-security/refpolicy/refpolicy/0001-fc-subs-volatile-alias-common-var-volatile-paths.patch index c3a03f3..1605d90 100644 --- a/recipes-security/refpolicy/refpolicy/0001-fc-subs-volatile-alias-common-var-volatile-paths.patch +++ b/recipes-security/refpolicy/refpolicy/0001-fc-subs-volatile-alias-common-var-volatile-paths.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d39f2ddbfcfd6e224a50bf327a7bd0031d74d0c6 Mon Sep 17 00:00:00 2001 | 1 | From ee66387c393af77b88c833f5d271efe48036112c Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Thu, 28 Mar 2019 16:14:09 -0400 | 3 | Date: Thu, 28 Mar 2019 16:14:09 -0400 |
4 | Subject: [PATCH] fc/subs/volatile: alias common /var/volatile paths | 4 | Subject: [PATCH] fc/subs/volatile: alias common /var/volatile paths |
@@ -29,5 +29,5 @@ index ba22ce7e7..23d4328f7 100644 | |||
29 | +/var/volatile/log /var/log | 29 | +/var/volatile/log /var/log |
30 | +/var/volatile/tmp /var/tmp | 30 | +/var/volatile/tmp /var/tmp |
31 | -- | 31 | -- |
32 | 2.17.1 | 32 | 2.25.1 |
33 | 33 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0001-refpolicy-minimum-make-sysadmin-module-optional.patch b/recipes-security/refpolicy/refpolicy/0001-refpolicy-minimum-make-sysadmin-module-optional.patch index f607cbb..657c5cd 100644 --- a/recipes-security/refpolicy/refpolicy/0001-refpolicy-minimum-make-sysadmin-module-optional.patch +++ b/recipes-security/refpolicy/refpolicy/0001-refpolicy-minimum-make-sysadmin-module-optional.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 669293ddf351f231b34979a7d708601ccbd11930 Mon Sep 17 00:00:00 2001 | 1 | From 0e3b79ae0ae468640d7092c9a91a91d258d07645 Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Fri, 5 Apr 2019 11:53:28 -0400 | 3 | Date: Fri, 5 Apr 2019 11:53:28 -0400 |
4 | Subject: [PATCH] refpolicy-minimum: make sysadmin module optional | 4 | Subject: [PATCH] refpolicy-minimum: make sysadmin module optional |
@@ -22,10 +22,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
22 | 2 files changed, 11 insertions(+), 7 deletions(-) | 22 | 2 files changed, 11 insertions(+), 7 deletions(-) |
23 | 23 | ||
24 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te | 24 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te |
25 | index 5a19f0e43..1f4a671dc 100644 | 25 | index 671b5aef3..8ce3d5956 100644 |
26 | --- a/policy/modules/system/init.te | 26 | --- a/policy/modules/system/init.te |
27 | +++ b/policy/modules/system/init.te | 27 | +++ b/policy/modules/system/init.te |
28 | @@ -556,13 +556,15 @@ ifdef(`init_systemd',` | 28 | @@ -615,13 +615,15 @@ ifdef(`init_systemd',` |
29 | unconfined_write_keys(init_t) | 29 | unconfined_write_keys(init_t) |
30 | ') | 30 | ') |
31 | ',` | 31 | ',` |
@@ -48,10 +48,10 @@ index 5a19f0e43..1f4a671dc 100644 | |||
48 | ') | 48 | ') |
49 | ') | 49 | ') |
50 | diff --git a/policy/modules/system/locallogin.te b/policy/modules/system/locallogin.te | 50 | diff --git a/policy/modules/system/locallogin.te b/policy/modules/system/locallogin.te |
51 | index 109980e79..313112371 100644 | 51 | index 7728de804..a8ff403dd 100644 |
52 | --- a/policy/modules/system/locallogin.te | 52 | --- a/policy/modules/system/locallogin.te |
53 | +++ b/policy/modules/system/locallogin.te | 53 | +++ b/policy/modules/system/locallogin.te |
54 | @@ -265,7 +265,9 @@ userdom_use_unpriv_users_fds(sulogin_t) | 54 | @@ -274,7 +274,9 @@ userdom_use_unpriv_users_fds(sulogin_t) |
55 | userdom_search_user_home_dirs(sulogin_t) | 55 | userdom_search_user_home_dirs(sulogin_t) |
56 | userdom_use_user_ptys(sulogin_t) | 56 | userdom_use_user_ptys(sulogin_t) |
57 | 57 | ||
@@ -63,5 +63,5 @@ index 109980e79..313112371 100644 | |||
63 | # by default, sulogin does not use pam... | 63 | # by default, sulogin does not use pam... |
64 | # sulogin_pam might need to be defined otherwise | 64 | # sulogin_pam might need to be defined otherwise |
65 | -- | 65 | -- |
66 | 2.17.1 | 66 | 2.25.1 |
67 | 67 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0001-refpolicy-targeted-make-unconfined_u-the-default-sel.patch b/recipes-security/refpolicy/refpolicy/0001-refpolicy-targeted-make-unconfined_u-the-default-sel.patch index 9939b59..64e658e 100644 --- a/recipes-security/refpolicy/refpolicy/0001-refpolicy-targeted-make-unconfined_u-the-default-sel.patch +++ b/recipes-security/refpolicy/refpolicy/0001-refpolicy-targeted-make-unconfined_u-the-default-sel.patch | |||
@@ -1,14 +1,14 @@ | |||
1 | From bf7b74e7c38b546e162eb5a3bd4774e3d84d593d Mon Sep 17 00:00:00 2001 | 1 | From 60b4e5ea5668a71b2a0660461daecea66fd11d51 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Mon, 20 Apr 2020 11:50:03 +0800 | 3 | Date: Mon, 20 Apr 2020 11:50:03 +0800 |
4 | Subject: [PATCH] refpolicy-targeted: make unconfined_u the default selinux | 4 | Subject: [PATCH] refpolicy-targeted: make unconfined_u the default selinux |
5 | user | 5 | user |
6 | 6 | ||
7 | For targeted policy type, we define unconfined_u as the default selinux | 7 | For targeted policy type, we define unconfined_u as the default selinux |
8 | user for root and normal users, so users could login in and run most | 8 | user for root and normal users, so users could login and run most |
9 | commands and services on unconfined domains. | 9 | commands and services on unconfined domains. |
10 | 10 | ||
11 | Upstream-Status: Inappropriate [configuration] | 11 | Upstream-Status: Inappropriate [embedded specific] |
12 | 12 | ||
13 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | 13 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> |
14 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> | 14 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> |
@@ -38,7 +38,7 @@ index ce614b41b..c0903d98b 100644 | |||
38 | +root:unconfined_u:s0-mcs_systemhigh | 38 | +root:unconfined_u:s0-mcs_systemhigh |
39 | +__default__:unconfined_u:s0 | 39 | +__default__:unconfined_u:s0 |
40 | diff --git a/policy/modules/system/unconfined.te b/policy/modules/system/unconfined.te | 40 | diff --git a/policy/modules/system/unconfined.te b/policy/modules/system/unconfined.te |
41 | index 4972094cb..b6d769412 100644 | 41 | index d116a1b9b..32720f68f 100644 |
42 | --- a/policy/modules/system/unconfined.te | 42 | --- a/policy/modules/system/unconfined.te |
43 | +++ b/policy/modules/system/unconfined.te | 43 | +++ b/policy/modules/system/unconfined.te |
44 | @@ -20,6 +20,11 @@ type unconfined_execmem_t alias ada_t; | 44 | @@ -20,6 +20,11 @@ type unconfined_execmem_t alias ada_t; |
@@ -77,5 +77,5 @@ index ca203758c..e737cd9cc 100644 | |||
77 | + gen_user(root, sysadm, unconfined_r sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats) | 77 | + gen_user(root, sysadm, unconfined_r sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats) |
78 | ') | 78 | ') |
79 | -- | 79 | -- |
80 | 2.17.1 | 80 | 2.25.1 |
81 | 81 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0002-fc-subs-busybox-set-aliases-for-bin-sbin-and-usr.patch b/recipes-security/refpolicy/refpolicy/0002-fc-subs-busybox-set-aliases-for-bin-sbin-and-usr.patch index d2b8139..ef00602 100644 --- a/recipes-security/refpolicy/refpolicy/0002-fc-subs-busybox-set-aliases-for-bin-sbin-and-usr.patch +++ b/recipes-security/refpolicy/refpolicy/0002-fc-subs-busybox-set-aliases-for-bin-sbin-and-usr.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 974befcafcee1377e122f19a4182f74eea757158 Mon Sep 17 00:00:00 2001 | 1 | From 8fa6c5b7b99a50b09e9dffd142c066fa41319750 Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Thu, 28 Mar 2019 20:48:10 -0400 | 3 | Date: Thu, 28 Mar 2019 20:48:10 -0400 |
4 | Subject: [PATCH] fc/subs/busybox: set aliases for bin, sbin and usr | 4 | Subject: [PATCH] fc/subs/busybox: set aliases for bin, sbin and usr |
@@ -29,5 +29,5 @@ index 23d4328f7..690007f22 100644 | |||
29 | +/usr/lib/busybox/sbin /usr/sbin | 29 | +/usr/lib/busybox/sbin /usr/sbin |
30 | +/usr/lib/busybox/usr /usr | 30 | +/usr/lib/busybox/usr /usr |
31 | -- | 31 | -- |
32 | 2.17.1 | 32 | 2.25.1 |
33 | 33 | ||
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 index 84764e5..25afa3b 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 1ff0e212ce737bba59d90977a58a15250bc84ea9 Mon Sep 17 00:00:00 2001 | 1 | From 9a8d6b634d4f714fc63125be5e23228c565d1aaf Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Wed, 29 Sep 2021 11:08:49 +0800 | 3 | Date: Wed, 29 Sep 2021 11:08:49 +0800 |
4 | Subject: [PATCH] refpolicy-minimum: make xdg module optional | 4 | Subject: [PATCH] refpolicy-minimum: make xdg module optional |
@@ -15,10 +15,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
15 | 1 file changed, 6 insertions(+), 2 deletions(-) | 15 | 1 file changed, 6 insertions(+), 2 deletions(-) |
16 | 16 | ||
17 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | 17 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te |
18 | index 8cea6baa1..218834495 100644 | 18 | index 7b717d3ba..3b07b368d 100644 |
19 | --- a/policy/modules/system/systemd.te | 19 | --- a/policy/modules/system/systemd.te |
20 | +++ b/policy/modules/system/systemd.te | 20 | +++ b/policy/modules/system/systemd.te |
21 | @@ -276,10 +276,14 @@ files_type(systemd_update_run_t) | 21 | @@ -298,10 +298,14 @@ init_unit_file(systemd_user_manager_unit_t) |
22 | 22 | ||
23 | type systemd_conf_home_t; | 23 | type systemd_conf_home_t; |
24 | init_unit_file(systemd_conf_home_t) | 24 | init_unit_file(systemd_conf_home_t) |
@@ -36,5 +36,5 @@ index 8cea6baa1..218834495 100644 | |||
36 | type systemd_user_runtime_notify_t; | 36 | type systemd_user_runtime_notify_t; |
37 | userdom_user_runtime_content(systemd_user_runtime_notify_t) | 37 | userdom_user_runtime_content(systemd_user_runtime_notify_t) |
38 | -- | 38 | -- |
39 | 2.17.1 | 39 | 2.25.1 |
40 | 40 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0002-refpolicy-targeted-add-capability2-bpf-and-perfmon-f.patch b/recipes-security/refpolicy/refpolicy/0002-refpolicy-targeted-add-capability2-bpf-and-perfmon-f.patch deleted file mode 100644 index e4c081d..0000000 --- a/recipes-security/refpolicy/refpolicy/0002-refpolicy-targeted-add-capability2-bpf-and-perfmon-f.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From b46903aaf7e52f9c4c51a2fa7fe7a85190da98b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Wed, 29 Sep 2021 16:43:54 +0800 | ||
4 | Subject: [PATCH] refpolicy-targeted: add capability2 bpf and perfmon for | ||
5 | unconfined_t | ||
6 | |||
7 | Fixes: | ||
8 | avc: denied { bpf } for pid=433 comm="systemd" capability=39 | ||
9 | scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 | ||
10 | tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 | ||
11 | tclass=capability2 permissive=0 | ||
12 | |||
13 | avc: denied { perfmon } for pid=433 comm="systemd" capability=38 | ||
14 | scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 | ||
15 | tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 | ||
16 | tclass=capability2 permissive=0 | ||
17 | |||
18 | type=USER_AVC msg=audit(1632901631.693:86): pid=433 uid=0 auid=0 ses=3 | ||
19 | subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='avc: | ||
20 | denied { reload } for auid=n/a uid=0 gid=0 cmdline="" | ||
21 | scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 | ||
22 | tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 | ||
23 | tclass=system permissive=0 exe="/lib/systemd/systemd" sauid=0 | ||
24 | hostname=? addr=? terminal=?'UID="root" AUID="root" AUID="root" | ||
25 | UID="root" GID="root" SAUID="root" | ||
26 | |||
27 | Upstream-Status: Inappropriate [embedded specific] | ||
28 | |||
29 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
30 | --- | ||
31 | policy/modules/system/unconfined.if | 5 +++++ | ||
32 | 1 file changed, 5 insertions(+) | ||
33 | |||
34 | diff --git a/policy/modules/system/unconfined.if b/policy/modules/system/unconfined.if | ||
35 | index a139cfe78..807e959c3 100644 | ||
36 | --- a/policy/modules/system/unconfined.if | ||
37 | +++ b/policy/modules/system/unconfined.if | ||
38 | @@ -66,6 +66,11 @@ interface(`unconfined_domain_noaudit',` | ||
39 | files_start_etc_service($1) | ||
40 | files_stop_etc_service($1) | ||
41 | |||
42 | + ifdef(`init_systemd',` | ||
43 | + allow $1 self:capability2 { bpf perfmon }; | ||
44 | + allow $1 self:system reload; | ||
45 | + ') | ||
46 | + | ||
47 | tunable_policy(`allow_execheap',` | ||
48 | # Allow making the stack executable via mprotect. | ||
49 | allow $1 self:process execheap; | ||
50 | -- | ||
51 | 2.17.1 | ||
52 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0003-fc-hostname-apply-policy-to-common-yocto-hostname-al.patch b/recipes-security/refpolicy/refpolicy/0003-fc-hostname-apply-policy-to-common-yocto-hostname-al.patch index 6596e76..94ac31b 100644 --- a/recipes-security/refpolicy/refpolicy/0003-fc-hostname-apply-policy-to-common-yocto-hostname-al.patch +++ b/recipes-security/refpolicy/refpolicy/0003-fc-hostname-apply-policy-to-common-yocto-hostname-al.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 9c6f3c5acc01607a67277f69faa67e34dc98232b Mon Sep 17 00:00:00 2001 | 1 | From 5a0bbd1920205f488b6a4565f7217b9d0825067b Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 | 3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 |
4 | Subject: [PATCH] fc/hostname: apply policy to common yocto hostname | 4 | Subject: [PATCH] fc/hostname: apply policy to common yocto hostname |
@@ -22,5 +22,5 @@ index 83ddeb573..cf523bc4c 100644 | |||
22 | +/usr/bin/hostname\.net-tools -- gen_context(system_u:object_r:hostname_exec_t,s0) | 22 | +/usr/bin/hostname\.net-tools -- gen_context(system_u:object_r:hostname_exec_t,s0) |
23 | +/usr/bin/hostname\.coreutils -- gen_context(system_u:object_r:hostname_exec_t,s0) | 23 | +/usr/bin/hostname\.coreutils -- gen_context(system_u:object_r:hostname_exec_t,s0) |
24 | -- | 24 | -- |
25 | 2.17.1 | 25 | 2.25.1 |
26 | 26 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0003-refpolicy-minimum-enable-nscd_use_shm.patch b/recipes-security/refpolicy/refpolicy/0003-refpolicy-minimum-enable-nscd_use_shm.patch deleted file mode 100644 index edf9caa..0000000 --- a/recipes-security/refpolicy/refpolicy/0003-refpolicy-minimum-enable-nscd_use_shm.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 5f992b59a74cc6cde8fd20162a11065dc30fd7ab Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Fri, 26 Feb 2021 09:13:23 +0800 | ||
4 | Subject: [PATCH] refpolicy-minimum: enable nscd_use_shm | ||
5 | |||
6 | Fixes: | ||
7 | avc: denied { listen } for pid=199 comm="systemd-resolve" | ||
8 | path="/run/systemd/resolve/io.systemd.Resolve" | ||
9 | scontext=system_u:system_r:systemd_resolved_t:s0 | ||
10 | tcontext=system_u:system_r:systemd_resolved_t:s0 | ||
11 | tclass=unix_stream_socket permissive=0 | ||
12 | |||
13 | Upstream-Status: Inappropriate [embedded specific] | ||
14 | |||
15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
16 | --- | ||
17 | policy/modules/services/nscd.te | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/policy/modules/services/nscd.te b/policy/modules/services/nscd.te | ||
21 | index ada67edb1..9801fc228 100644 | ||
22 | --- a/policy/modules/services/nscd.te | ||
23 | +++ b/policy/modules/services/nscd.te | ||
24 | @@ -15,7 +15,7 @@ gen_require(` | ||
25 | ## can use nscd shared memory. | ||
26 | ## </p> | ||
27 | ## </desc> | ||
28 | -gen_tunable(nscd_use_shm, false) | ||
29 | +gen_tunable(nscd_use_shm, true) | ||
30 | |||
31 | attribute_role nscd_roles; | ||
32 | |||
33 | -- | ||
34 | 2.17.1 | ||
35 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0003-refpolicy-minimum-make-dbus-module-optional.patch b/recipes-security/refpolicy/refpolicy/0003-refpolicy-minimum-make-dbus-module-optional.patch new file mode 100644 index 0000000..d545d2a --- /dev/null +++ b/recipes-security/refpolicy/refpolicy/0003-refpolicy-minimum-make-dbus-module-optional.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From e28807393f105a16528cb5304283bde0b771fc4e Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Wed, 9 Nov 2022 10:53:26 +0800 | ||
4 | Subject: [PATCH] refpolicy-minimum: make dbus module optional | ||
5 | |||
6 | The mount module invokes interface | ||
7 | dbus_dontaudit_write_system_bus_runtime_named_sockets which is from dbus | ||
8 | module. Since dbus is not a core moudle in sysvinit system, we could | ||
9 | make this interface optional in mount module by optional_policy. Then we | ||
10 | could make the minimum policy without dbus module. | ||
11 | |||
12 | Upstream-Status: Inappropriate [embedded specific] | ||
13 | |||
14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
15 | --- | ||
16 | policy/modules/system/mount.te | 4 +++- | ||
17 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/policy/modules/system/mount.te b/policy/modules/system/mount.te | ||
20 | index 97f49e58e..b59529a01 100644 | ||
21 | --- a/policy/modules/system/mount.te | ||
22 | +++ b/policy/modules/system/mount.te | ||
23 | @@ -146,7 +146,9 @@ selinux_getattr_fs(mount_t) | ||
24 | |||
25 | userdom_use_all_users_fds(mount_t) | ||
26 | |||
27 | -dbus_dontaudit_write_system_bus_runtime_named_sockets(mount_t) | ||
28 | +optional_policy(` | ||
29 | + dbus_dontaudit_write_system_bus_runtime_named_sockets(mount_t) | ||
30 | +') | ||
31 | |||
32 | ifdef(`distro_redhat',` | ||
33 | optional_policy(` | ||
34 | -- | ||
35 | 2.25.1 | ||
36 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0004-fc-bash-apply-usr-bin-bash-context-to-bin-bash.bash.patch b/recipes-security/refpolicy/refpolicy/0004-fc-bash-apply-usr-bin-bash-context-to-bin-bash.bash.patch index cf333f1..eff0255 100644 --- a/recipes-security/refpolicy/refpolicy/0004-fc-bash-apply-usr-bin-bash-context-to-bin-bash.bash.patch +++ b/recipes-security/refpolicy/refpolicy/0004-fc-bash-apply-usr-bin-bash-context-to-bin-bash.bash.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From bbc8b58fe5fe709dfadbffc86e17ebd2d76a257c Mon Sep 17 00:00:00 2001 | 1 | From c9219d2f7be1e641b3866b770a9b570c12333b93 Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Thu, 28 Mar 2019 21:37:32 -0400 | 3 | Date: Thu, 28 Mar 2019 21:37:32 -0400 |
4 | Subject: [PATCH] fc/bash: apply /usr/bin/bash context to /bin/bash.bash | 4 | Subject: [PATCH] fc/bash: apply /usr/bin/bash context to /bin/bash.bash |
@@ -15,7 +15,7 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
15 | 1 file changed, 1 insertion(+) | 15 | 1 file changed, 1 insertion(+) |
16 | 16 | ||
17 | diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc | 17 | diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc |
18 | index 4c18154ce..9187e50af 100644 | 18 | index 0c05c693d..b70940928 100644 |
19 | --- a/policy/modules/kernel/corecommands.fc | 19 | --- a/policy/modules/kernel/corecommands.fc |
20 | +++ b/policy/modules/kernel/corecommands.fc | 20 | +++ b/policy/modules/kernel/corecommands.fc |
21 | @@ -142,6 +142,7 @@ ifdef(`distro_gentoo',` | 21 | @@ -142,6 +142,7 @@ ifdef(`distro_gentoo',` |
@@ -27,5 +27,5 @@ index 4c18154ce..9187e50af 100644 | |||
27 | /usr/bin/fish -- gen_context(system_u:object_r:shell_exec_t,s0) | 27 | /usr/bin/fish -- gen_context(system_u:object_r:shell_exec_t,s0) |
28 | /usr/bin/git-shell -- gen_context(system_u:object_r:shell_exec_t,s0) | 28 | /usr/bin/git-shell -- gen_context(system_u:object_r:shell_exec_t,s0) |
29 | -- | 29 | -- |
30 | 2.17.1 | 30 | 2.25.1 |
31 | 31 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0005-fc-resolv.conf-label-resolv.conf-in-var-run-properly.patch b/recipes-security/refpolicy/refpolicy/0005-fc-resolv.conf-label-resolv.conf-in-var-run-properly.patch index 078c246..06c8087 100644 --- a/recipes-security/refpolicy/refpolicy/0005-fc-resolv.conf-label-resolv.conf-in-var-run-properly.patch +++ b/recipes-security/refpolicy/refpolicy/0005-fc-resolv.conf-label-resolv.conf-in-var-run-properly.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 3cccdec2aaa273ca09100ca957f4968a25f4f3a3 Mon Sep 17 00:00:00 2001 | 1 | From 51631a7eaaea1fab4b36a2488497cf725317ce6e Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Thu, 4 Apr 2019 10:45:03 -0400 | 3 | Date: Thu, 4 Apr 2019 10:45:03 -0400 |
4 | Subject: [PATCH] fc/resolv.conf: label resolv.conf in var/run/ properly | 4 | Subject: [PATCH] fc/resolv.conf: label resolv.conf in var/run/ properly |
@@ -25,5 +25,5 @@ index 14505efe9..c9ec4e5ab 100644 | |||
25 | ifdef(`distro_gentoo',` | 25 | ifdef(`distro_gentoo',` |
26 | /var/lib/dhcpc(/.*)? gen_context(system_u:object_r:dhcpc_state_t,s0) | 26 | /var/lib/dhcpc(/.*)? gen_context(system_u:object_r:dhcpc_state_t,s0) |
27 | -- | 27 | -- |
28 | 2.17.1 | 28 | 2.25.1 |
29 | 29 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0006-fc-login-apply-login-context-to-login.shadow.patch b/recipes-security/refpolicy/refpolicy/0006-fc-login-apply-login-context-to-login.shadow.patch index b4747f7..70c5566 100644 --- a/recipes-security/refpolicy/refpolicy/0006-fc-login-apply-login-context-to-login.shadow.patch +++ b/recipes-security/refpolicy/refpolicy/0006-fc-login-apply-login-context-to-login.shadow.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 9a1e1c7b65cb3f5ab97ce05463ca02a3eaa57d86 Mon Sep 17 00:00:00 2001 | 1 | From 1c61b10d21a22d4110bc880b23477295f6cd9efb Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Thu, 28 Mar 2019 21:43:53 -0400 | 3 | Date: Thu, 28 Mar 2019 21:43:53 -0400 |
4 | Subject: [PATCH] fc/login: apply login context to login.shadow | 4 | Subject: [PATCH] fc/login: apply login context to login.shadow |
@@ -24,5 +24,5 @@ index 50efcff7b..5cb48882c 100644 | |||
24 | /usr/bin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0) | 24 | /usr/bin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0) |
25 | /usr/bin/tcb_convert -- gen_context(system_u:object_r:updpwd_exec_t,s0) | 25 | /usr/bin/tcb_convert -- gen_context(system_u:object_r:updpwd_exec_t,s0) |
26 | -- | 26 | -- |
27 | 2.17.1 | 27 | 2.25.1 |
28 | 28 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0007-fc-hwclock-add-hwclock-alternatives.patch b/recipes-security/refpolicy/refpolicy/0007-fc-hwclock-add-hwclock-alternatives.patch index 33f6a10..2f9f703 100644 --- a/recipes-security/refpolicy/refpolicy/0007-fc-hwclock-add-hwclock-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0007-fc-hwclock-add-hwclock-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 73716015ab28a9474912902e9467f2d2a864ecd0 Mon Sep 17 00:00:00 2001 | 1 | From e4d7d9fb1cb157bf205874e1a81d5719017866a1 Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Thu, 28 Mar 2019 21:59:18 -0400 | 3 | Date: Thu, 28 Mar 2019 21:59:18 -0400 |
4 | Subject: [PATCH] fc/hwclock: add hwclock alternatives | 4 | Subject: [PATCH] fc/hwclock: add hwclock alternatives |
@@ -21,5 +21,5 @@ index 301965892..139485835 100644 | |||
21 | /usr/sbin/hwclock -- gen_context(system_u:object_r:hwclock_exec_t,s0) | 21 | /usr/sbin/hwclock -- gen_context(system_u:object_r:hwclock_exec_t,s0) |
22 | +/usr/sbin/hwclock\.util-linux -- gen_context(system_u:object_r:hwclock_exec_t,s0) | 22 | +/usr/sbin/hwclock\.util-linux -- gen_context(system_u:object_r:hwclock_exec_t,s0) |
23 | -- | 23 | -- |
24 | 2.17.1 | 24 | 2.25.1 |
25 | 25 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0008-fc-dmesg-apply-policy-to-dmesg-alternatives.patch b/recipes-security/refpolicy/refpolicy/0008-fc-dmesg-apply-policy-to-dmesg-alternatives.patch index 5f2ffdf..6e576a8 100644 --- a/recipes-security/refpolicy/refpolicy/0008-fc-dmesg-apply-policy-to-dmesg-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0008-fc-dmesg-apply-policy-to-dmesg-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 504e8429500ab0984adfd52bb09a3e993b87f2f1 Mon Sep 17 00:00:00 2001 | 1 | From ac6536f04674ccc051744e6eb3644e68fe38da33 Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Fri, 29 Mar 2019 08:26:55 -0400 | 3 | Date: Fri, 29 Mar 2019 08:26:55 -0400 |
4 | Subject: [PATCH] fc/dmesg: apply policy to dmesg alternatives | 4 | Subject: [PATCH] fc/dmesg: apply policy to dmesg alternatives |
@@ -19,5 +19,5 @@ index e52fdfcf8..526b92ed2 100644 | |||
19 | /usr/bin/dmesg -- gen_context(system_u:object_r:dmesg_exec_t,s0) | 19 | /usr/bin/dmesg -- gen_context(system_u:object_r:dmesg_exec_t,s0) |
20 | +/usr/bin/dmesg\.util-linux -- gen_context(system_u:object_r:dmesg_exec_t,s0) | 20 | +/usr/bin/dmesg\.util-linux -- gen_context(system_u:object_r:dmesg_exec_t,s0) |
21 | -- | 21 | -- |
22 | 2.17.1 | 22 | 2.25.1 |
23 | 23 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0009-fc-ssh-apply-policy-to-ssh-alternatives.patch b/recipes-security/refpolicy/refpolicy/0009-fc-ssh-apply-policy-to-ssh-alternatives.patch index 585850b..611c0d3 100644 --- a/recipes-security/refpolicy/refpolicy/0009-fc-ssh-apply-policy-to-ssh-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0009-fc-ssh-apply-policy-to-ssh-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 8ad451ceff2ba4ea26290a7ba9918406a90bb10f Mon Sep 17 00:00:00 2001 | 1 | From a56887ca448b60ad6715348b2cfe533e8109a040 Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Fri, 29 Mar 2019 09:20:58 -0400 | 3 | Date: Fri, 29 Mar 2019 09:20:58 -0400 |
4 | Subject: [PATCH] fc/ssh: apply policy to ssh alternatives | 4 | Subject: [PATCH] fc/ssh: apply policy to ssh alternatives |
@@ -12,11 +12,11 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
12 | 1 file changed, 1 insertion(+) | 12 | 1 file changed, 1 insertion(+) |
13 | 13 | ||
14 | diff --git a/policy/modules/services/ssh.fc b/policy/modules/services/ssh.fc | 14 | diff --git a/policy/modules/services/ssh.fc b/policy/modules/services/ssh.fc |
15 | index 60060c35c..518043a9b 100644 | 15 | index 5c512e972..0448c1877 100644 |
16 | --- a/policy/modules/services/ssh.fc | 16 | --- a/policy/modules/services/ssh.fc |
17 | +++ b/policy/modules/services/ssh.fc | 17 | +++ b/policy/modules/services/ssh.fc |
18 | @@ -4,6 +4,7 @@ HOME_DIR/\.ssh(/.*)? gen_context(system_u:object_r:ssh_home_t,s0) | 18 | @@ -4,6 +4,7 @@ HOME_DIR/\.ssh(/.*)? gen_context(system_u:object_r:ssh_home_t,s0) |
19 | /etc/ssh/ssh_host.*_key -- gen_context(system_u:object_r:sshd_key_t,s0) | 19 | /etc/ssh/ssh_host.*_key(\.pub)? -- gen_context(system_u:object_r:sshd_key_t,s0) |
20 | 20 | ||
21 | /usr/bin/ssh -- gen_context(system_u:object_r:ssh_exec_t,s0) | 21 | /usr/bin/ssh -- gen_context(system_u:object_r:ssh_exec_t,s0) |
22 | +/usr/bin/ssh\.openssh -- gen_context(system_u:object_r:ssh_exec_t,s0) | 22 | +/usr/bin/ssh\.openssh -- gen_context(system_u:object_r:ssh_exec_t,s0) |
@@ -24,5 +24,5 @@ index 60060c35c..518043a9b 100644 | |||
24 | /usr/bin/ssh-keygen -- gen_context(system_u:object_r:ssh_keygen_exec_t,s0) | 24 | /usr/bin/ssh-keygen -- gen_context(system_u:object_r:ssh_keygen_exec_t,s0) |
25 | /usr/bin/sshd -- gen_context(system_u:object_r:sshd_exec_t,s0) | 25 | /usr/bin/sshd -- gen_context(system_u:object_r:sshd_exec_t,s0) |
26 | -- | 26 | -- |
27 | 2.17.1 | 27 | 2.25.1 |
28 | 28 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0010-fc-sysnetwork-apply-policy-to-network-commands-alter.patch b/recipes-security/refpolicy/refpolicy/0010-fc-sysnetwork-apply-policy-to-network-commands-alter.patch index 0621923..7af147d 100644 --- a/recipes-security/refpolicy/refpolicy/0010-fc-sysnetwork-apply-policy-to-network-commands-alter.patch +++ b/recipes-security/refpolicy/refpolicy/0010-fc-sysnetwork-apply-policy-to-network-commands-alter.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c85fd7d9c45770b31de44bb35521e2251882df10 Mon Sep 17 00:00:00 2001 | 1 | From 47a5e9a0bd4960534998798ab1a5ab62e77b2b61 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Tue, 9 Jun 2015 21:22:52 +0530 | 3 | Date: Tue, 9 Jun 2015 21:22:52 +0530 |
4 | Subject: [PATCH] fc/sysnetwork: apply policy to network commands alternatives | 4 | Subject: [PATCH] fc/sysnetwork: apply policy to network commands alternatives |
@@ -43,5 +43,5 @@ index c9ec4e5ab..4ca151524 100644 | |||
43 | /usr/sbin/tc -- gen_context(system_u:object_r:ifconfig_exec_t,s0) | 43 | /usr/sbin/tc -- gen_context(system_u:object_r:ifconfig_exec_t,s0) |
44 | 44 | ||
45 | -- | 45 | -- |
46 | 2.17.1 | 46 | 2.25.1 |
47 | 47 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0011-fc-udev-apply-policy-to-udevadm-in-libexec.patch b/recipes-security/refpolicy/refpolicy/0011-fc-udev-apply-policy-to-udevadm-in-libexec.patch index cc3e529..434fc1d 100644 --- a/recipes-security/refpolicy/refpolicy/0011-fc-udev-apply-policy-to-udevadm-in-libexec.patch +++ b/recipes-security/refpolicy/refpolicy/0011-fc-udev-apply-policy-to-udevadm-in-libexec.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From aa2635a54f9c36205ebc469f799a56ece01ac610 Mon Sep 17 00:00:00 2001 | 1 | From bbc6eb20e9509a61236051df7a5fa552a8f2654d Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Fri, 29 Mar 2019 09:36:08 -0400 | 3 | Date: Fri, 29 Mar 2019 09:36:08 -0400 |
4 | Subject: [PATCH] fc/udev: apply policy to udevadm in libexec | 4 | Subject: [PATCH] fc/udev: apply policy to udevadm in libexec |
@@ -25,5 +25,5 @@ index 7898ff01c..bc717e60c 100644 | |||
25 | /usr/sbin/start_udev -- gen_context(system_u:object_r:udev_exec_t,s0) | 25 | /usr/sbin/start_udev -- gen_context(system_u:object_r:udev_exec_t,s0) |
26 | ') | 26 | ') |
27 | -- | 27 | -- |
28 | 2.17.1 | 28 | 2.25.1 |
29 | 29 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0012-fc-rpm-apply-rpm_exec-policy-to-cpio-binaries.patch b/recipes-security/refpolicy/refpolicy/0012-fc-rpm-apply-rpm_exec-policy-to-cpio-binaries.patch index b039f53..bf562d6 100644 --- a/recipes-security/refpolicy/refpolicy/0012-fc-rpm-apply-rpm_exec-policy-to-cpio-binaries.patch +++ b/recipes-security/refpolicy/refpolicy/0012-fc-rpm-apply-rpm_exec-policy-to-cpio-binaries.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From faf757c732c9a022499b584cea64ce1fcc78e118 Mon Sep 17 00:00:00 2001 | 1 | From 00533fded8e2264f8bdc68c8ed79644a10e4e2ad Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Fri, 29 Mar 2019 09:54:07 -0400 | 3 | Date: Fri, 29 Mar 2019 09:54:07 -0400 |
4 | Subject: [PATCH] fc/rpm: apply rpm_exec policy to cpio binaries | 4 | Subject: [PATCH] fc/rpm: apply rpm_exec policy to cpio binaries |
@@ -12,10 +12,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
12 | 1 file changed, 2 insertions(+) | 12 | 1 file changed, 2 insertions(+) |
13 | 13 | ||
14 | diff --git a/policy/modules/admin/rpm.fc b/policy/modules/admin/rpm.fc | 14 | diff --git a/policy/modules/admin/rpm.fc b/policy/modules/admin/rpm.fc |
15 | index aaf530c2b..618b18cec 100644 | 15 | index 3f842f942..12973ac8b 100644 |
16 | --- a/policy/modules/admin/rpm.fc | 16 | --- a/policy/modules/admin/rpm.fc |
17 | +++ b/policy/modules/admin/rpm.fc | 17 | +++ b/policy/modules/admin/rpm.fc |
18 | @@ -66,4 +66,6 @@ ifdef(`distro_redhat',` | 18 | @@ -71,4 +71,6 @@ ifdef(`distro_redhat',` |
19 | 19 | ||
20 | ifdef(`enable_mls',` | 20 | ifdef(`enable_mls',` |
21 | /usr/sbin/cpio -- gen_context(system_u:object_r:rpm_exec_t,s0) | 21 | /usr/sbin/cpio -- gen_context(system_u:object_r:rpm_exec_t,s0) |
@@ -23,5 +23,5 @@ index aaf530c2b..618b18cec 100644 | |||
23 | +/usr/bin/cpio\.cpio -- gen_context(system_u:object_r:rpm_exec_t,s0) | 23 | +/usr/bin/cpio\.cpio -- gen_context(system_u:object_r:rpm_exec_t,s0) |
24 | ') | 24 | ') |
25 | -- | 25 | -- |
26 | 2.17.1 | 26 | 2.25.1 |
27 | 27 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0013-fc-su-apply-policy-to-su-alternatives.patch b/recipes-security/refpolicy/refpolicy/0013-fc-su-apply-policy-to-su-alternatives.patch index 14c7d5b..32d38f1 100644 --- a/recipes-security/refpolicy/refpolicy/0013-fc-su-apply-policy-to-su-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0013-fc-su-apply-policy-to-su-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 52853ae9ee13038c5ffae8616858c442d412a2b8 Mon Sep 17 00:00:00 2001 | 1 | From 4b202554e646a60000c1acad7bbdfae1078bdc10 Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Thu, 13 Feb 2014 00:33:07 -0500 | 3 | Date: Thu, 13 Feb 2014 00:33:07 -0500 |
4 | Subject: [PATCH] fc/su: apply policy to su alternatives | 4 | Subject: [PATCH] fc/su: apply policy to su alternatives |
@@ -23,5 +23,5 @@ index 3375c9692..a9868cd58 100644 | |||
23 | +/usr/bin/su\.shadow -- gen_context(system_u:object_r:su_exec_t,s0) | 23 | +/usr/bin/su\.shadow -- gen_context(system_u:object_r:su_exec_t,s0) |
24 | +/usr/bin/su\.util-linux -- gen_context(system_u:object_r:su_exec_t,s0) | 24 | +/usr/bin/su\.util-linux -- gen_context(system_u:object_r:su_exec_t,s0) |
25 | -- | 25 | -- |
26 | 2.17.1 | 26 | 2.25.1 |
27 | 27 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0014-fc-fstools-fix-real-path-for-fstools.patch b/recipes-security/refpolicy/refpolicy/0014-fc-fstools-fix-real-path-for-fstools.patch index c2e0ca8..de0aad7 100644 --- a/recipes-security/refpolicy/refpolicy/0014-fc-fstools-fix-real-path-for-fstools.patch +++ b/recipes-security/refpolicy/refpolicy/0014-fc-fstools-fix-real-path-for-fstools.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4f3a637c0385204c0b87806d158e106fb9f88972 Mon Sep 17 00:00:00 2001 | 1 | From f64a5d6a2f2e72ae6c5122220eb759117b6384c8 Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Mon, 27 Jan 2014 03:54:01 -0500 | 3 | Date: Mon, 27 Jan 2014 03:54:01 -0500 |
4 | Subject: [PATCH] fc/fstools: fix real path for fstools | 4 | Subject: [PATCH] fc/fstools: fix real path for fstools |
@@ -10,14 +10,14 @@ Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com> | |||
10 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> | 10 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> |
11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
12 | --- | 12 | --- |
13 | policy/modules/system/fstools.fc | 10 ++++++++++ | 13 | policy/modules/system/fstools.fc | 11 +++++++++++ |
14 | 1 file changed, 10 insertions(+) | 14 | 1 file changed, 11 insertions(+) |
15 | 15 | ||
16 | diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc | 16 | diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc |
17 | index d871294e8..bef711850 100644 | 17 | index 8fbd5ce44..2842afbcc 100644 |
18 | --- a/policy/modules/system/fstools.fc | 18 | --- a/policy/modules/system/fstools.fc |
19 | +++ b/policy/modules/system/fstools.fc | 19 | +++ b/policy/modules/system/fstools.fc |
20 | @@ -59,7 +59,9 @@ | 20 | @@ -58,7 +58,9 @@ |
21 | /usr/sbin/addpart -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 21 | /usr/sbin/addpart -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
22 | /usr/sbin/badblocks -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 22 | /usr/sbin/badblocks -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
23 | /usr/sbin/blkid -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 23 | /usr/sbin/blkid -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
@@ -27,12 +27,13 @@ index d871294e8..bef711850 100644 | |||
27 | /usr/sbin/cfdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 27 | /usr/sbin/cfdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
28 | /usr/sbin/clubufflush -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 28 | /usr/sbin/clubufflush -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
29 | /usr/sbin/delpart -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 29 | /usr/sbin/delpart -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
30 | @@ -73,10 +75,12 @@ | 30 | @@ -72,10 +74,13 @@ |
31 | /usr/sbin/efibootmgr -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 31 | /usr/sbin/efibootmgr -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
32 | /usr/sbin/fatsort -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 32 | /usr/sbin/fatsort -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
33 | /usr/sbin/fdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 33 | /usr/sbin/fdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
34 | +/usr/sbin/fdisk\.util-linux -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 34 | +/usr/sbin/fdisk\.util-linux -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
35 | /usr/sbin/findfs -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 35 | /usr/sbin/findfs -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
36 | +/usr/sbin/findfs\.util-linux -- gen_context(system_u:object_r:fsadm_exec_t,s0) | ||
36 | /usr/sbin/fsck.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 37 | /usr/sbin/fsck.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
37 | /usr/sbin/gdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 38 | /usr/sbin/gdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
38 | /usr/sbin/hdparm -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 39 | /usr/sbin/hdparm -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
@@ -40,7 +41,7 @@ index d871294e8..bef711850 100644 | |||
40 | /usr/sbin/install-mbr -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 41 | /usr/sbin/install-mbr -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
41 | /usr/sbin/jfs_.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 42 | /usr/sbin/jfs_.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
42 | /usr/sbin/losetup.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 43 | /usr/sbin/losetup.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
43 | @@ -84,24 +88,30 @@ | 44 | @@ -83,24 +88,30 @@ |
44 | /usr/sbin/make_reiser4 -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 45 | /usr/sbin/make_reiser4 -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
45 | /usr/sbin/mkdosfs -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 46 | /usr/sbin/mkdosfs -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
46 | /usr/sbin/mke2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 47 | /usr/sbin/mke2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
@@ -72,5 +73,5 @@ index d871294e8..bef711850 100644 | |||
72 | /usr/sbin/zhack -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 73 | /usr/sbin/zhack -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
73 | /usr/sbin/zinject -- gen_context(system_u:object_r:fsadm_exec_t,s0) | 74 | /usr/sbin/zinject -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
74 | -- | 75 | -- |
75 | 2.17.1 | 76 | 2.25.1 |
76 | 77 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0015-fc-init-fix-update-alternatives-for-sysvinit.patch b/recipes-security/refpolicy/refpolicy/0015-fc-init-fix-update-alternatives-for-sysvinit.patch index b3ab0cc..5e9c197 100644 --- a/recipes-security/refpolicy/refpolicy/0015-fc-init-fix-update-alternatives-for-sysvinit.patch +++ b/recipes-security/refpolicy/refpolicy/0015-fc-init-fix-update-alternatives-for-sysvinit.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e1439aa43af6ef15b35eac3cdbf0cea561768362 Mon Sep 17 00:00:00 2001 | 1 | From 6d2a96abd1e292d0c34ff77501e618cfc193655f Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 | 3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 |
4 | Subject: [PATCH] fc/init: fix update-alternatives for sysvinit | 4 | Subject: [PATCH] fc/init: fix update-alternatives for sysvinit |
@@ -26,7 +26,7 @@ index bf51c103f..91ed72be0 100644 | |||
26 | 26 | ||
27 | /run/shutdown\.pid -- gen_context(system_u:object_r:shutdown_runtime_t,s0) | 27 | /run/shutdown\.pid -- gen_context(system_u:object_r:shutdown_runtime_t,s0) |
28 | diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc | 28 | diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc |
29 | index 9187e50af..0ecabe34e 100644 | 29 | index b70940928..e6077fd5b 100644 |
30 | --- a/policy/modules/kernel/corecommands.fc | 30 | --- a/policy/modules/kernel/corecommands.fc |
31 | +++ b/policy/modules/kernel/corecommands.fc | 31 | +++ b/policy/modules/kernel/corecommands.fc |
32 | @@ -151,6 +151,8 @@ ifdef(`distro_gentoo',` | 32 | @@ -151,6 +151,8 @@ ifdef(`distro_gentoo',` |
@@ -39,10 +39,10 @@ index 9187e50af..0ecabe34e 100644 | |||
39 | /usr/bin/sash -- gen_context(system_u:object_r:shell_exec_t,s0) | 39 | /usr/bin/sash -- gen_context(system_u:object_r:shell_exec_t,s0) |
40 | /usr/bin/sesh -- gen_context(system_u:object_r:shell_exec_t,s0) | 40 | /usr/bin/sesh -- gen_context(system_u:object_r:shell_exec_t,s0) |
41 | diff --git a/policy/modules/system/init.fc b/policy/modules/system/init.fc | 41 | diff --git a/policy/modules/system/init.fc b/policy/modules/system/init.fc |
42 | index 63cf195e6..5268bddb2 100644 | 42 | index 1a99e5824..7f0b7c699 100644 |
43 | --- a/policy/modules/system/init.fc | 43 | --- a/policy/modules/system/init.fc |
44 | +++ b/policy/modules/system/init.fc | 44 | +++ b/policy/modules/system/init.fc |
45 | @@ -40,6 +40,7 @@ ifdef(`distro_gentoo',` | 45 | @@ -41,6 +41,7 @@ ifdef(`distro_gentoo',` |
46 | /usr/libexec/dcc/stop-.* -- gen_context(system_u:object_r:initrc_exec_t,s0) | 46 | /usr/libexec/dcc/stop-.* -- gen_context(system_u:object_r:initrc_exec_t,s0) |
47 | 47 | ||
48 | /usr/sbin/init(ng)? -- gen_context(system_u:object_r:init_exec_t,s0) | 48 | /usr/sbin/init(ng)? -- gen_context(system_u:object_r:init_exec_t,s0) |
@@ -51,5 +51,5 @@ index 63cf195e6..5268bddb2 100644 | |||
51 | /usr/sbin/upstart -- gen_context(system_u:object_r:init_exec_t,s0) | 51 | /usr/sbin/upstart -- gen_context(system_u:object_r:init_exec_t,s0) |
52 | 52 | ||
53 | -- | 53 | -- |
54 | 2.17.1 | 54 | 2.25.1 |
55 | 55 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0016-fc-brctl-apply-policy-to-brctl-alternatives.patch b/recipes-security/refpolicy/refpolicy/0016-fc-brctl-apply-policy-to-brctl-alternatives.patch index b9812b7..b0ba609 100644 --- a/recipes-security/refpolicy/refpolicy/0016-fc-brctl-apply-policy-to-brctl-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0016-fc-brctl-apply-policy-to-brctl-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 274066b3397b53d63134aee94a0148d9c7d1886d Mon Sep 17 00:00:00 2001 | 1 | From 2e9c22ee83b7d4fea7b177ca8111c06e69338db9 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 10:19:54 +0800 | 3 | Date: Fri, 15 Nov 2019 10:19:54 +0800 |
4 | Subject: [PATCH] fc/brctl: apply policy to brctl alternatives | 4 | Subject: [PATCH] fc/brctl: apply policy to brctl alternatives |
@@ -20,5 +20,5 @@ index ed472f095..2a852b0fd 100644 | |||
20 | /usr/sbin/brctl -- gen_context(system_u:object_r:brctl_exec_t,s0) | 20 | /usr/sbin/brctl -- gen_context(system_u:object_r:brctl_exec_t,s0) |
21 | +/usr/sbin/brctl\.bridge-utils -- gen_context(system_u:object_r:brctl_exec_t,s0) | 21 | +/usr/sbin/brctl\.bridge-utils -- gen_context(system_u:object_r:brctl_exec_t,s0) |
22 | -- | 22 | -- |
23 | 2.17.1 | 23 | 2.25.1 |
24 | 24 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0017-fc-corecommands-apply-policy-to-nologin-alternatives.patch b/recipes-security/refpolicy/refpolicy/0017-fc-corecommands-apply-policy-to-nologin-alternatives.patch index e0ddc5e..58ac463 100644 --- a/recipes-security/refpolicy/refpolicy/0017-fc-corecommands-apply-policy-to-nologin-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0017-fc-corecommands-apply-policy-to-nologin-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From ab0267f77e38bcda797cfe00ba6fa49ba89e334a Mon Sep 17 00:00:00 2001 | 1 | From c43f2d7ddf1d0c2185796e0297dd9f85b9663aaf Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 10:21:51 +0800 | 3 | Date: Fri, 15 Nov 2019 10:21:51 +0800 |
4 | Subject: [PATCH] fc/corecommands: apply policy to nologin alternatives | 4 | Subject: [PATCH] fc/corecommands: apply policy to nologin alternatives |
@@ -11,10 +11,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
11 | 1 file changed, 2 insertions(+) | 11 | 1 file changed, 2 insertions(+) |
12 | 12 | ||
13 | diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc | 13 | diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc |
14 | index 0ecabe34e..e27e701ef 100644 | 14 | index e6077fd5b..0df59e837 100644 |
15 | --- a/policy/modules/kernel/corecommands.fc | 15 | --- a/policy/modules/kernel/corecommands.fc |
16 | +++ b/policy/modules/kernel/corecommands.fc | 16 | +++ b/policy/modules/kernel/corecommands.fc |
17 | @@ -304,6 +304,8 @@ ifdef(`distro_debian',` | 17 | @@ -306,6 +306,8 @@ ifdef(`distro_debian',` |
18 | /usr/sbin/insmod_ksymoops_clean -- gen_context(system_u:object_r:bin_t,s0) | 18 | /usr/sbin/insmod_ksymoops_clean -- gen_context(system_u:object_r:bin_t,s0) |
19 | /usr/sbin/mkfs\.cramfs -- gen_context(system_u:object_r:bin_t,s0) | 19 | /usr/sbin/mkfs\.cramfs -- gen_context(system_u:object_r:bin_t,s0) |
20 | /usr/sbin/nologin -- gen_context(system_u:object_r:shell_exec_t,s0) | 20 | /usr/sbin/nologin -- gen_context(system_u:object_r:shell_exec_t,s0) |
@@ -24,5 +24,5 @@ index 0ecabe34e..e27e701ef 100644 | |||
24 | /usr/sbin/sesh -- gen_context(system_u:object_r:shell_exec_t,s0) | 24 | /usr/sbin/sesh -- gen_context(system_u:object_r:shell_exec_t,s0) |
25 | /usr/sbin/smrsh -- gen_context(system_u:object_r:shell_exec_t,s0) | 25 | /usr/sbin/smrsh -- gen_context(system_u:object_r:shell_exec_t,s0) |
26 | -- | 26 | -- |
27 | 2.17.1 | 27 | 2.25.1 |
28 | 28 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0018-fc-locallogin-apply-policy-to-sulogin-alternatives.patch b/recipes-security/refpolicy/refpolicy/0018-fc-locallogin-apply-policy-to-sulogin-alternatives.patch index 2fe3740..3c43254 100644 --- a/recipes-security/refpolicy/refpolicy/0018-fc-locallogin-apply-policy-to-sulogin-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0018-fc-locallogin-apply-policy-to-sulogin-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From cfb86acce9fe9da9b88c853c0b22d48d99602fbb Mon Sep 17 00:00:00 2001 | 1 | From 11c95928e325aea7e4c41a9cdf969f9bdd306611 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 10:43:28 +0800 | 3 | Date: Fri, 15 Nov 2019 10:43:28 +0800 |
4 | Subject: [PATCH] fc/locallogin: apply policy to sulogin alternatives | 4 | Subject: [PATCH] fc/locallogin: apply policy to sulogin alternatives |
@@ -21,5 +21,5 @@ index fc8d58507..59e6e9601 100644 | |||
21 | +/usr/sbin/sulogin\.util-linux -- gen_context(system_u:object_r:sulogin_exec_t,s0) | 21 | +/usr/sbin/sulogin\.util-linux -- gen_context(system_u:object_r:sulogin_exec_t,s0) |
22 | /usr/sbin/sushell -- gen_context(system_u:object_r:sulogin_exec_t,s0) | 22 | /usr/sbin/sushell -- gen_context(system_u:object_r:sulogin_exec_t,s0) |
23 | -- | 23 | -- |
24 | 2.17.1 | 24 | 2.25.1 |
25 | 25 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0019-fc-ntp-apply-policy-to-ntpd-alternatives.patch b/recipes-security/refpolicy/refpolicy/0019-fc-ntp-apply-policy-to-ntpd-alternatives.patch index 4b046ce..cbae4c5 100644 --- a/recipes-security/refpolicy/refpolicy/0019-fc-ntp-apply-policy-to-ntpd-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0019-fc-ntp-apply-policy-to-ntpd-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e159e70b533b500390337ec666d678c7424afb90 Mon Sep 17 00:00:00 2001 | 1 | From 5841a5bd25e6017b6ccff4f56628ad6e950eadad Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 10:45:23 +0800 | 3 | Date: Fri, 15 Nov 2019 10:45:23 +0800 |
4 | Subject: [PATCH] fc/ntp: apply policy to ntpd alternatives | 4 | Subject: [PATCH] fc/ntp: apply policy to ntpd alternatives |
@@ -23,5 +23,5 @@ index cd69ea5d5..49ffe6f68 100644 | |||
23 | /usr/sbin/sntp -- gen_context(system_u:object_r:ntpdate_exec_t,s0) | 23 | /usr/sbin/sntp -- gen_context(system_u:object_r:ntpdate_exec_t,s0) |
24 | 24 | ||
25 | -- | 25 | -- |
26 | 2.17.1 | 26 | 2.25.1 |
27 | 27 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0020-fc-kerberos-apply-policy-to-kerberos-alternatives.patch b/recipes-security/refpolicy/refpolicy/0020-fc-kerberos-apply-policy-to-kerberos-alternatives.patch index 9d2e6fa..76e7fe9 100644 --- a/recipes-security/refpolicy/refpolicy/0020-fc-kerberos-apply-policy-to-kerberos-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0020-fc-kerberos-apply-policy-to-kerberos-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 95797c20fb68558b9f37ded3f1cc9a4ef09717f9 Mon Sep 17 00:00:00 2001 | 1 | From 8126ec521e5a0f72da098f5d90b5b5b392006b7c Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 10:55:05 +0800 | 3 | Date: Fri, 15 Nov 2019 10:55:05 +0800 |
4 | Subject: [PATCH] fc/kerberos: apply policy to kerberos alternatives | 4 | Subject: [PATCH] fc/kerberos: apply policy to kerberos alternatives |
@@ -46,5 +46,5 @@ index df21fcc78..ce0166edd 100644 | |||
46 | /var/log/kadmin\.log.* -- gen_context(system_u:object_r:kadmind_log_t,s0) | 46 | /var/log/kadmin\.log.* -- gen_context(system_u:object_r:kadmind_log_t,s0) |
47 | /var/log/kadmind\.log.* -- gen_context(system_u:object_r:kadmind_log_t,s0) | 47 | /var/log/kadmind\.log.* -- gen_context(system_u:object_r:kadmind_log_t,s0) |
48 | -- | 48 | -- |
49 | 2.17.1 | 49 | 2.25.1 |
50 | 50 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0021-fc-ldap-apply-policy-to-ldap-alternatives.patch b/recipes-security/refpolicy/refpolicy/0021-fc-ldap-apply-policy-to-ldap-alternatives.patch index e0b7b9e..a46c9c9 100644 --- a/recipes-security/refpolicy/refpolicy/0021-fc-ldap-apply-policy-to-ldap-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0021-fc-ldap-apply-policy-to-ldap-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6b43af067ec45bce1b7059fc549e246f53311d3a Mon Sep 17 00:00:00 2001 | 1 | From c71ea08245069001b56aadd7bb0af28e019f45e4 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 11:06:13 +0800 | 3 | Date: Fri, 15 Nov 2019 11:06:13 +0800 |
4 | Subject: [PATCH] fc/ldap: apply policy to ldap alternatives | 4 | Subject: [PATCH] fc/ldap: apply policy to ldap alternatives |
@@ -36,5 +36,5 @@ index 0a1d08d0f..65b202962 100644 | |||
36 | /run/openldap(/.*)? gen_context(system_u:object_r:slapd_runtime_t,s0) | 36 | /run/openldap(/.*)? gen_context(system_u:object_r:slapd_runtime_t,s0) |
37 | /run/slapd.* -s gen_context(system_u:object_r:slapd_runtime_t,s0) | 37 | /run/slapd.* -s gen_context(system_u:object_r:slapd_runtime_t,s0) |
38 | -- | 38 | -- |
39 | 2.17.1 | 39 | 2.25.1 |
40 | 40 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0022-fc-postgresql-apply-policy-to-postgresql-alternative.patch b/recipes-security/refpolicy/refpolicy/0022-fc-postgresql-apply-policy-to-postgresql-alternative.patch index 4a1a2dc..0a0464f 100644 --- a/recipes-security/refpolicy/refpolicy/0022-fc-postgresql-apply-policy-to-postgresql-alternative.patch +++ b/recipes-security/refpolicy/refpolicy/0022-fc-postgresql-apply-policy-to-postgresql-alternative.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5f664c3a38853129fa1703032822c203dbeaf0a6 Mon Sep 17 00:00:00 2001 | 1 | From 72726c1bc51628e6eb56e758f1e334f9b9a0f17e Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 11:13:16 +0800 | 3 | Date: Fri, 15 Nov 2019 11:13:16 +0800 |
4 | Subject: [PATCH] fc/postgresql: apply policy to postgresql alternatives | 4 | Subject: [PATCH] fc/postgresql: apply policy to postgresql alternatives |
@@ -33,5 +33,5 @@ index f31a52cf8..f9bf46870 100644 | |||
33 | /usr/share/jonas/pgsql(/.*)? gen_context(system_u:object_r:postgresql_db_t,s0) | 33 | /usr/share/jonas/pgsql(/.*)? gen_context(system_u:object_r:postgresql_db_t,s0) |
34 | ') | 34 | ') |
35 | -- | 35 | -- |
36 | 2.17.1 | 36 | 2.25.1 |
37 | 37 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0023-fc-screen-apply-policy-to-screen-alternatives.patch b/recipes-security/refpolicy/refpolicy/0023-fc-screen-apply-policy-to-screen-alternatives.patch index 9ae9435..e95cb3c 100644 --- a/recipes-security/refpolicy/refpolicy/0023-fc-screen-apply-policy-to-screen-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0023-fc-screen-apply-policy-to-screen-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 2d1634127f8f5c9ec98f866711b8d15b7df815d1 Mon Sep 17 00:00:00 2001 | 1 | From 003a22f73563ef7b8b4ab6a6a0cb4a920a43570f Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 11:15:33 +0800 | 3 | Date: Fri, 15 Nov 2019 11:15:33 +0800 |
4 | Subject: [PATCH] fc/screen: apply policy to screen alternatives | 4 | Subject: [PATCH] fc/screen: apply policy to screen alternatives |
@@ -21,5 +21,5 @@ index e51e01d97..238dc263e 100644 | |||
21 | +/usr/bin/screen-.* -- gen_context(system_u:object_r:screen_exec_t,s0) | 21 | +/usr/bin/screen-.* -- gen_context(system_u:object_r:screen_exec_t,s0) |
22 | /usr/bin/tmux -- gen_context(system_u:object_r:screen_exec_t,s0) | 22 | /usr/bin/tmux -- gen_context(system_u:object_r:screen_exec_t,s0) |
23 | -- | 23 | -- |
24 | 2.17.1 | 24 | 2.25.1 |
25 | 25 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0024-fc-usermanage-apply-policy-to-usermanage-alternative.patch b/recipes-security/refpolicy/refpolicy/0024-fc-usermanage-apply-policy-to-usermanage-alternative.patch index 2dbdcf4..a92b809 100644 --- a/recipes-security/refpolicy/refpolicy/0024-fc-usermanage-apply-policy-to-usermanage-alternative.patch +++ b/recipes-security/refpolicy/refpolicy/0024-fc-usermanage-apply-policy-to-usermanage-alternative.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 2323a6ab69c4a74ab127c16e38f14616a289b3d1 Mon Sep 17 00:00:00 2001 | 1 | From fdf7c2d27b6ecf08c88bb98e52a7d8284ac828af Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 11:25:34 +0800 | 3 | Date: Fri, 15 Nov 2019 11:25:34 +0800 |
4 | Subject: [PATCH] fc/usermanage: apply policy to usermanage alternatives | 4 | Subject: [PATCH] fc/usermanage: apply policy to usermanage alternatives |
@@ -7,26 +7,28 @@ Upstream-Status: Inappropriate [embedded specific] | |||
7 | 7 | ||
8 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 8 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
9 | --- | 9 | --- |
10 | policy/modules/admin/usermanage.fc | 6 ++++++ | 10 | policy/modules/admin/usermanage.fc | 8 ++++++++ |
11 | 1 file changed, 6 insertions(+) | 11 | 1 file changed, 8 insertions(+) |
12 | 12 | ||
13 | diff --git a/policy/modules/admin/usermanage.fc b/policy/modules/admin/usermanage.fc | 13 | diff --git a/policy/modules/admin/usermanage.fc b/policy/modules/admin/usermanage.fc |
14 | index 620eefc6f..bf1ff09ab 100644 | 14 | index 7209a8dd0..c9dc1f000 100644 |
15 | --- a/policy/modules/admin/usermanage.fc | 15 | --- a/policy/modules/admin/usermanage.fc |
16 | +++ b/policy/modules/admin/usermanage.fc | 16 | +++ b/policy/modules/admin/usermanage.fc |
17 | @@ -4,7 +4,11 @@ ifdef(`distro_debian',` | 17 | @@ -4,8 +4,13 @@ ifdef(`distro_debian',` |
18 | 18 | ||
19 | /usr/bin/chage -- gen_context(system_u:object_r:passwd_exec_t,s0) | 19 | /usr/bin/chage -- gen_context(system_u:object_r:passwd_exec_t,s0) |
20 | /usr/bin/chfn -- gen_context(system_u:object_r:chfn_exec_t,s0) | 20 | /usr/bin/chfn -- gen_context(system_u:object_r:chfn_exec_t,s0) |
21 | +/usr/bin/chfn\.shadow -- gen_context(system_u:object_r:chfn_exec_t,s0) | 21 | +/usr/bin/chfn\.shadow -- gen_context(system_u:object_r:chfn_exec_t,s0) |
22 | +/usr/bin/chfn\.util-linux -- gen_context(system_u:object_r:chfn_exec_t,s0) | 22 | +/usr/bin/chfn\.util-linux -- gen_context(system_u:object_r:chfn_exec_t,s0) |
23 | /usr/bin/chpasswd -- gen_context(system_u:object_r:passwd_exec_t,s0) | ||
24 | +/usr/bin/chpasswd\.shadow -- gen_context(system_u:object_r:passwd_exec_t,s0) | ||
23 | /usr/bin/chsh -- gen_context(system_u:object_r:chfn_exec_t,s0) | 25 | /usr/bin/chsh -- gen_context(system_u:object_r:chfn_exec_t,s0) |
24 | +/usr/bin/chsh\.shadow -- gen_context(system_u:object_r:chfn_exec_t,s0) | 26 | +/usr/bin/chsh\.shadow -- gen_context(system_u:object_r:chfn_exec_t,s0) |
25 | +/usr/bin/chsh\.util-linux -- gen_context(system_u:object_r:chfn_exec_t,s0) | 27 | +/usr/bin/chsh\.util-linux -- gen_context(system_u:object_r:chfn_exec_t,s0) |
26 | /usr/bin/crack_[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0) | 28 | /usr/bin/crack_[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0) |
27 | /usr/bin/cracklib-[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0) | 29 | /usr/bin/cracklib-[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0) |
28 | /usr/bin/gpasswd -- gen_context(system_u:object_r:groupadd_exec_t,s0) | 30 | /usr/bin/gpasswd -- gen_context(system_u:object_r:groupadd_exec_t,s0) |
29 | @@ -14,6 +18,7 @@ ifdef(`distro_debian',` | 31 | @@ -15,6 +20,7 @@ ifdef(`distro_debian',` |
30 | /usr/bin/grpconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) | 32 | /usr/bin/grpconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) |
31 | /usr/bin/grpunconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) | 33 | /usr/bin/grpunconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) |
32 | /usr/bin/passwd -- gen_context(system_u:object_r:passwd_exec_t,s0) | 34 | /usr/bin/passwd -- gen_context(system_u:object_r:passwd_exec_t,s0) |
@@ -34,7 +36,15 @@ index 620eefc6f..bf1ff09ab 100644 | |||
34 | /usr/bin/pwconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) | 36 | /usr/bin/pwconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) |
35 | /usr/bin/pwunconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) | 37 | /usr/bin/pwunconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) |
36 | /usr/bin/useradd -- gen_context(system_u:object_r:useradd_exec_t,s0) | 38 | /usr/bin/useradd -- gen_context(system_u:object_r:useradd_exec_t,s0) |
37 | @@ -39,6 +44,7 @@ ifdef(`distro_debian',` | 39 | @@ -26,6 +32,7 @@ ifdef(`distro_debian',` |
40 | /usr/lib/cracklib_dict.* -- gen_context(system_u:object_r:crack_db_t,s0) | ||
41 | |||
42 | /usr/sbin/chpasswd -- gen_context(system_u:object_r:passwd_exec_t,s0) | ||
43 | +/usr/sbin/chpasswd\.shadow -- gen_context(system_u:object_r:passwd_exec_t,s0) | ||
44 | /usr/sbin/crack_[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0) | ||
45 | /usr/sbin/cracklib-[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0) | ||
46 | /usr/sbin/gpasswd -- gen_context(system_u:object_r:groupadd_exec_t,s0) | ||
47 | @@ -41,6 +48,7 @@ ifdef(`distro_debian',` | ||
38 | /usr/sbin/usermod -- gen_context(system_u:object_r:useradd_exec_t,s0) | 48 | /usr/sbin/usermod -- gen_context(system_u:object_r:useradd_exec_t,s0) |
39 | /usr/sbin/vigr -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) | 49 | /usr/sbin/vigr -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) |
40 | /usr/sbin/vipw -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) | 50 | /usr/sbin/vipw -- gen_context(system_u:object_r:admin_passwd_exec_t,s0) |
@@ -43,5 +53,5 @@ index 620eefc6f..bf1ff09ab 100644 | |||
43 | /usr/share/cracklib(/.*)? gen_context(system_u:object_r:crack_db_t,s0) | 53 | /usr/share/cracklib(/.*)? gen_context(system_u:object_r:crack_db_t,s0) |
44 | 54 | ||
45 | -- | 55 | -- |
46 | 2.17.1 | 56 | 2.25.1 |
47 | 57 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0025-fc-getty-add-file-context-to-start_getty.patch b/recipes-security/refpolicy/refpolicy/0025-fc-getty-add-file-context-to-start_getty.patch index c0d9cf4..f6fa8a0 100644 --- a/recipes-security/refpolicy/refpolicy/0025-fc-getty-add-file-context-to-start_getty.patch +++ b/recipes-security/refpolicy/refpolicy/0025-fc-getty-add-file-context-to-start_getty.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From dbd399143d6fbda828cfc9f2546bc730e0da584c Mon Sep 17 00:00:00 2001 | 1 | From 863ece4fd9815997486c04ce89180707435669e4 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Fri, 15 Nov 2019 16:07:30 +0800 | 3 | Date: Fri, 15 Nov 2019 16:07:30 +0800 |
4 | Subject: [PATCH] fc/getty: add file context to start_getty | 4 | Subject: [PATCH] fc/getty: add file context to start_getty |
@@ -23,5 +23,5 @@ index 116ea6421..53ff6137b 100644 | |||
23 | /usr/sbin/.*getty -- gen_context(system_u:object_r:getty_exec_t,s0) | 23 | /usr/sbin/.*getty -- gen_context(system_u:object_r:getty_exec_t,s0) |
24 | 24 | ||
25 | -- | 25 | -- |
26 | 2.17.1 | 26 | 2.25.1 |
27 | 27 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0026-fc-vlock-apply-policy-to-vlock-alternatives.patch b/recipes-security/refpolicy/refpolicy/0026-fc-vlock-apply-policy-to-vlock-alternatives.patch index 71521e8..7f63b14 100644 --- a/recipes-security/refpolicy/refpolicy/0026-fc-vlock-apply-policy-to-vlock-alternatives.patch +++ b/recipes-security/refpolicy/refpolicy/0026-fc-vlock-apply-policy-to-vlock-alternatives.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0280f05e2c9665f094d7098cd03e11d75908bcdb Mon Sep 17 00:00:00 2001 | 1 | From 5bb33b7d9d7915399cca7d8c6fbdd9c0e27c1cd8 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Wed, 18 Dec 2019 15:04:41 +0800 | 3 | Date: Wed, 18 Dec 2019 15:04:41 +0800 |
4 | Subject: [PATCH] fc/vlock: apply policy to vlock alternatives | 4 | Subject: [PATCH] fc/vlock: apply policy to vlock alternatives |
@@ -21,5 +21,5 @@ index f668cde9c..c4bc50984 100644 | |||
21 | 21 | ||
22 | /usr/sbin/vlock-main -- gen_context(system_u:object_r:vlock_exec_t,s0) | 22 | /usr/sbin/vlock-main -- gen_context(system_u:object_r:vlock_exec_t,s0) |
23 | -- | 23 | -- |
24 | 2.17.1 | 24 | 2.25.1 |
25 | 25 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0027-fc-add-fcontext-for-init-scripts-and-systemd-service.patch b/recipes-security/refpolicy/refpolicy/0027-fc-add-fcontext-for-init-scripts-and-systemd-service.patch index ca9b644..cfb2fd5 100644 --- a/recipes-security/refpolicy/refpolicy/0027-fc-add-fcontext-for-init-scripts-and-systemd-service.patch +++ b/recipes-security/refpolicy/refpolicy/0027-fc-add-fcontext-for-init-scripts-and-systemd-service.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 7f8b07b7af0c3cd8bbec49082b42011ac433df45 Mon Sep 17 00:00:00 2001 | 1 | From 574df1810c8f32bbf24b223f72f6622b0df7e82c Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Tue, 30 Jun 2020 10:45:57 +0800 | 3 | Date: Tue, 30 Jun 2020 10:45:57 +0800 |
4 | Subject: [PATCH] fc: add fcontext for init scripts and systemd service files | 4 | Subject: [PATCH] fc: add fcontext for init scripts and systemd service files |
@@ -34,7 +34,7 @@ index 382c067f9..0ecc5acc4 100644 | |||
34 | /usr/bin/rngd -- gen_context(system_u:object_r:rngd_exec_t,s0) | 34 | /usr/bin/rngd -- gen_context(system_u:object_r:rngd_exec_t,s0) |
35 | 35 | ||
36 | diff --git a/policy/modules/services/rpc.fc b/policy/modules/services/rpc.fc | 36 | diff --git a/policy/modules/services/rpc.fc b/policy/modules/services/rpc.fc |
37 | index 88d2acaf0..d9c0a4aa7 100644 | 37 | index 75c2f0617..fa881ba2e 100644 |
38 | --- a/policy/modules/services/rpc.fc | 38 | --- a/policy/modules/services/rpc.fc |
39 | +++ b/policy/modules/services/rpc.fc | 39 | +++ b/policy/modules/services/rpc.fc |
40 | @@ -1,7 +1,9 @@ | 40 | @@ -1,7 +1,9 @@ |
@@ -46,7 +46,7 @@ index 88d2acaf0..d9c0a4aa7 100644 | |||
46 | +/etc/rc\.d/init\.d/nfscommon -- gen_context(system_u:object_r:rpcd_initrc_exec_t,s0) | 46 | +/etc/rc\.d/init\.d/nfscommon -- gen_context(system_u:object_r:rpcd_initrc_exec_t,s0) |
47 | /etc/rc\.d/init\.d/rpcidmapd -- gen_context(system_u:object_r:rpcd_initrc_exec_t,s0) | 47 | /etc/rc\.d/init\.d/rpcidmapd -- gen_context(system_u:object_r:rpcd_initrc_exec_t,s0) |
48 | 48 | ||
49 | /usr/bin/rpc\..* -- gen_context(system_u:object_r:rpcd_exec_t,s0) | 49 | /usr/bin/nfsdcld -- gen_context(system_u:object_r:rpcd_exec_t,s0) |
50 | diff --git a/policy/modules/system/logging.fc b/policy/modules/system/logging.fc | 50 | diff --git a/policy/modules/system/logging.fc b/policy/modules/system/logging.fc |
51 | index 5681acb51..4ff5f990a 100644 | 51 | index 5681acb51..4ff5f990a 100644 |
52 | --- a/policy/modules/system/logging.fc | 52 | --- a/policy/modules/system/logging.fc |
@@ -60,5 +60,5 @@ index 5681acb51..4ff5f990a 100644 | |||
60 | /usr/lib/systemd/systemd-kmsg-syslogd -- gen_context(system_u:object_r:syslogd_exec_t,s0) | 60 | /usr/lib/systemd/systemd-kmsg-syslogd -- gen_context(system_u:object_r:syslogd_exec_t,s0) |
61 | 61 | ||
62 | -- | 62 | -- |
63 | 2.17.1 | 63 | 2.25.1 |
64 | 64 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0028-file_contexts.subs_dist-set-aliase-for-root-director.patch b/recipes-security/refpolicy/refpolicy/0028-file_contexts.subs_dist-set-aliase-for-root-director.patch index dc10350..82b4708 100644 --- a/recipes-security/refpolicy/refpolicy/0028-file_contexts.subs_dist-set-aliase-for-root-director.patch +++ b/recipes-security/refpolicy/refpolicy/0028-file_contexts.subs_dist-set-aliase-for-root-director.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0bb081084a2d12f9041bfae195481d898b5a0ba1 Mon Sep 17 00:00:00 2001 | 1 | From 01f57c996e09fb68daf3d97805c46c27a6d34304 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Sun, 5 Apr 2020 22:03:45 +0800 | 3 | Date: Sun, 5 Apr 2020 22:03:45 +0800 |
4 | Subject: [PATCH] file_contexts.subs_dist: set aliase for /root directory | 4 | Subject: [PATCH] file_contexts.subs_dist: set aliase for /root directory |
@@ -26,5 +26,5 @@ index 690007f22..f80499ebf 100644 | |||
26 | +# Add an aliase for it | 26 | +# Add an aliase for it |
27 | +/root /home/root | 27 | +/root /home/root |
28 | -- | 28 | -- |
29 | 2.17.1 | 29 | 2.25.1 |
30 | 30 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0029-policy-modules-system-logging-add-rules-for-the-syml.patch b/recipes-security/refpolicy/refpolicy/0029-policy-modules-system-logging-add-rules-for-the-syml.patch index f8a4cec..06b792a 100644 --- a/recipes-security/refpolicy/refpolicy/0029-policy-modules-system-logging-add-rules-for-the-syml.patch +++ b/recipes-security/refpolicy/refpolicy/0029-policy-modules-system-logging-add-rules-for-the-syml.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 9c676fe5ff2a14206f25bf8ed932c305f13dcfdc Mon Sep 17 00:00:00 2001 | 1 | From 2e9b42143ccb92f04d8d57430b3ae1e9f55eb00e Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 | 3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 |
4 | Subject: [PATCH] policy/modules/system/logging: add rules for the symlink of | 4 | Subject: [PATCH] policy/modules/system/logging: add rules for the symlink of |
@@ -30,7 +30,7 @@ index 4ff5f990a..dee26a9f4 100644 | |||
30 | /var/log/dmesg -- gen_context(system_u:object_r:var_log_t,s0) | 30 | /var/log/dmesg -- gen_context(system_u:object_r:var_log_t,s0) |
31 | /var/log/syslog -- gen_context(system_u:object_r:var_log_t,s0) | 31 | /var/log/syslog -- gen_context(system_u:object_r:var_log_t,s0) |
32 | diff --git a/policy/modules/system/logging.if b/policy/modules/system/logging.if | 32 | diff --git a/policy/modules/system/logging.if b/policy/modules/system/logging.if |
33 | index 341763730..30d402c75 100644 | 33 | index cf7ef1721..b627cacb8 100644 |
34 | --- a/policy/modules/system/logging.if | 34 | --- a/policy/modules/system/logging.if |
35 | +++ b/policy/modules/system/logging.if | 35 | +++ b/policy/modules/system/logging.if |
36 | @@ -1086,10 +1086,12 @@ interface(`logging_append_all_inherited_logs',` | 36 | @@ -1086,10 +1086,12 @@ interface(`logging_append_all_inherited_logs',` |
@@ -100,5 +100,5 @@ index 341763730..30d402c75 100644 | |||
100 | 100 | ||
101 | ######################################## | 101 | ######################################## |
102 | -- | 102 | -- |
103 | 2.17.1 | 103 | 2.25.1 |
104 | 104 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0030-policy-modules-system-logging-add-rules-for-syslogd-.patch b/recipes-security/refpolicy/refpolicy/0030-policy-modules-system-logging-add-rules-for-syslogd-.patch index a06b3f4..ecfc018 100644 --- a/recipes-security/refpolicy/refpolicy/0030-policy-modules-system-logging-add-rules-for-syslogd-.patch +++ b/recipes-security/refpolicy/refpolicy/0030-policy-modules-system-logging-add-rules-for-syslogd-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c9759b1024873819cf594fe7ac3bf06bcf0d959d Mon Sep 17 00:00:00 2001 | 1 | From 26dc5529db7664ae248eba4dbc5d17915c371137 Mon Sep 17 00:00:00 2001 |
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | 2 | From: Joe MacDonald <joe_macdonald@mentor.com> |
3 | Date: Fri, 29 Mar 2019 10:33:18 -0400 | 3 | Date: Fri, 29 Mar 2019 10:33:18 -0400 |
4 | Subject: [PATCH] policy/modules/system/logging: add rules for syslogd symlink | 4 | Subject: [PATCH] policy/modules/system/logging: add rules for syslogd symlink |
@@ -18,10 +18,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
18 | 1 file changed, 1 insertion(+) | 18 | 1 file changed, 1 insertion(+) |
19 | 19 | ||
20 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te | 20 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te |
21 | index 21e3285a9..abee7df9c 100644 | 21 | index abd61e6bd..90d8ccd31 100644 |
22 | --- a/policy/modules/system/logging.te | 22 | --- a/policy/modules/system/logging.te |
23 | +++ b/policy/modules/system/logging.te | 23 | +++ b/policy/modules/system/logging.te |
24 | @@ -411,6 +411,7 @@ files_search_spool(syslogd_t) | 24 | @@ -420,6 +420,7 @@ files_search_spool(syslogd_t) |
25 | 25 | ||
26 | # Allow access for syslog-ng | 26 | # Allow access for syslog-ng |
27 | allow syslogd_t var_log_t:dir { create setattr }; | 27 | allow syslogd_t var_log_t:dir { create setattr }; |
@@ -30,5 +30,5 @@ index 21e3285a9..abee7df9c 100644 | |||
30 | # for systemd but can not be conditional | 30 | # for systemd but can not be conditional |
31 | files_runtime_filetrans(syslogd_t, syslogd_tmp_t, dir, "log") | 31 | files_runtime_filetrans(syslogd_t, syslogd_tmp_t, dir, "log") |
32 | -- | 32 | -- |
33 | 2.17.1 | 33 | 2.25.1 |
34 | 34 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch b/recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch index ffa78ac..48e8acf 100644 --- a/recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch +++ b/recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From fd55f9f292617c7475c62c07ed6c478b4bd9eda5 Mon Sep 17 00:00:00 2001 | 1 | From 9052089dfc4f7466fcf304ab282c2e32933a5881 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 | 3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 |
4 | Subject: [PATCH] policy/modules/kernel/files: add rules for the symlink of | 4 | Subject: [PATCH] policy/modules/kernel/files: add rules for the symlink of |
@@ -18,10 +18,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
18 | 2 files changed, 9 insertions(+) | 18 | 2 files changed, 9 insertions(+) |
19 | 19 | ||
20 | diff --git a/policy/modules/kernel/files.fc b/policy/modules/kernel/files.fc | 20 | diff --git a/policy/modules/kernel/files.fc b/policy/modules/kernel/files.fc |
21 | index 826722f4e..677ae96c3 100644 | 21 | index f6ff6b079..279df3d3c 100644 |
22 | --- a/policy/modules/kernel/files.fc | 22 | --- a/policy/modules/kernel/files.fc |
23 | +++ b/policy/modules/kernel/files.fc | 23 | +++ b/policy/modules/kernel/files.fc |
24 | @@ -172,6 +172,7 @@ HOME_ROOT/lost\+found/.* <<none>> | 24 | @@ -170,6 +170,7 @@ HOME_ROOT/lost\+found/.* <<none>> |
25 | # /tmp | 25 | # /tmp |
26 | # | 26 | # |
27 | /tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh) | 27 | /tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh) |
@@ -30,10 +30,10 @@ index 826722f4e..677ae96c3 100644 | |||
30 | /tmp/\.journal <<none>> | 30 | /tmp/\.journal <<none>> |
31 | 31 | ||
32 | diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if | 32 | diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if |
33 | index 495cbe2f4..b308eefd9 100644 | 33 | index f7217b226..451f302af 100644 |
34 | --- a/policy/modules/kernel/files.if | 34 | --- a/policy/modules/kernel/files.if |
35 | +++ b/policy/modules/kernel/files.if | 35 | +++ b/policy/modules/kernel/files.if |
36 | @@ -4555,6 +4555,7 @@ interface(`files_search_tmp',` | 36 | @@ -4750,6 +4750,7 @@ interface(`files_search_tmp',` |
37 | ') | 37 | ') |
38 | 38 | ||
39 | allow $1 tmp_t:dir search_dir_perms; | 39 | allow $1 tmp_t:dir search_dir_perms; |
@@ -41,7 +41,7 @@ index 495cbe2f4..b308eefd9 100644 | |||
41 | ') | 41 | ') |
42 | 42 | ||
43 | ######################################## | 43 | ######################################## |
44 | @@ -4591,6 +4592,7 @@ interface(`files_list_tmp',` | 44 | @@ -4786,6 +4787,7 @@ interface(`files_list_tmp',` |
45 | ') | 45 | ') |
46 | 46 | ||
47 | allow $1 tmp_t:dir list_dir_perms; | 47 | allow $1 tmp_t:dir list_dir_perms; |
@@ -49,7 +49,7 @@ index 495cbe2f4..b308eefd9 100644 | |||
49 | ') | 49 | ') |
50 | 50 | ||
51 | ######################################## | 51 | ######################################## |
52 | @@ -4627,6 +4629,7 @@ interface(`files_delete_tmp_dir_entry',` | 52 | @@ -4822,6 +4824,7 @@ interface(`files_delete_tmp_dir_entry',` |
53 | ') | 53 | ') |
54 | 54 | ||
55 | allow $1 tmp_t:dir del_entry_dir_perms; | 55 | allow $1 tmp_t:dir del_entry_dir_perms; |
@@ -57,7 +57,7 @@ index 495cbe2f4..b308eefd9 100644 | |||
57 | ') | 57 | ') |
58 | 58 | ||
59 | ######################################## | 59 | ######################################## |
60 | @@ -4645,6 +4648,7 @@ interface(`files_read_generic_tmp_files',` | 60 | @@ -4840,6 +4843,7 @@ interface(`files_read_generic_tmp_files',` |
61 | ') | 61 | ') |
62 | 62 | ||
63 | read_files_pattern($1, tmp_t, tmp_t) | 63 | read_files_pattern($1, tmp_t, tmp_t) |
@@ -65,7 +65,7 @@ index 495cbe2f4..b308eefd9 100644 | |||
65 | ') | 65 | ') |
66 | 66 | ||
67 | ######################################## | 67 | ######################################## |
68 | @@ -4663,6 +4667,7 @@ interface(`files_manage_generic_tmp_dirs',` | 68 | @@ -4858,6 +4862,7 @@ interface(`files_manage_generic_tmp_dirs',` |
69 | ') | 69 | ') |
70 | 70 | ||
71 | manage_dirs_pattern($1, tmp_t, tmp_t) | 71 | manage_dirs_pattern($1, tmp_t, tmp_t) |
@@ -73,7 +73,7 @@ index 495cbe2f4..b308eefd9 100644 | |||
73 | ') | 73 | ') |
74 | 74 | ||
75 | ######################################## | 75 | ######################################## |
76 | @@ -4699,6 +4704,7 @@ interface(`files_manage_generic_tmp_files',` | 76 | @@ -4894,6 +4899,7 @@ interface(`files_manage_generic_tmp_files',` |
77 | ') | 77 | ') |
78 | 78 | ||
79 | manage_files_pattern($1, tmp_t, tmp_t) | 79 | manage_files_pattern($1, tmp_t, tmp_t) |
@@ -81,7 +81,7 @@ index 495cbe2f4..b308eefd9 100644 | |||
81 | ') | 81 | ') |
82 | 82 | ||
83 | ######################################## | 83 | ######################################## |
84 | @@ -4735,6 +4741,7 @@ interface(`files_rw_generic_tmp_sockets',` | 84 | @@ -4930,6 +4936,7 @@ interface(`files_rw_generic_tmp_sockets',` |
85 | ') | 85 | ') |
86 | 86 | ||
87 | rw_sock_files_pattern($1, tmp_t, tmp_t) | 87 | rw_sock_files_pattern($1, tmp_t, tmp_t) |
@@ -89,7 +89,7 @@ index 495cbe2f4..b308eefd9 100644 | |||
89 | ') | 89 | ') |
90 | 90 | ||
91 | ######################################## | 91 | ######################################## |
92 | @@ -4942,6 +4949,7 @@ interface(`files_tmp_filetrans',` | 92 | @@ -5137,6 +5144,7 @@ interface(`files_tmp_filetrans',` |
93 | ') | 93 | ') |
94 | 94 | ||
95 | filetrans_pattern($1, tmp_t, $2, $3, $4) | 95 | filetrans_pattern($1, tmp_t, $2, $3, $4) |
@@ -98,5 +98,5 @@ index 495cbe2f4..b308eefd9 100644 | |||
98 | 98 | ||
99 | ######################################## | 99 | ######################################## |
100 | -- | 100 | -- |
101 | 2.17.1 | 101 | 2.25.1 |
102 | 102 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0032-policy-modules-system-logging-fix-auditd-startup-fai.patch b/recipes-security/refpolicy/refpolicy/0032-policy-modules-system-logging-fix-auditd-startup-fai.patch index 3f10d06..22ce8f2 100644 --- a/recipes-security/refpolicy/refpolicy/0032-policy-modules-system-logging-fix-auditd-startup-fai.patch +++ b/recipes-security/refpolicy/refpolicy/0032-policy-modules-system-logging-fix-auditd-startup-fai.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a196ae5e13b3f8e0d2e7ff27c8d481c9376b18e9 Mon Sep 17 00:00:00 2001 | 1 | From eed095029b270bbc49dc67d6b7b6b2fe9c3bca07 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 | 3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 |
4 | Subject: [PATCH] policy/modules/system/logging: fix auditd startup failures | 4 | Subject: [PATCH] policy/modules/system/logging: fix auditd startup failures |
@@ -17,10 +17,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
17 | 1 file changed, 2 insertions(+) | 17 | 1 file changed, 2 insertions(+) |
18 | 18 | ||
19 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te | 19 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te |
20 | index abee7df9c..cc530a2be 100644 | 20 | index 90d8ccd31..d3b06db7d 100644 |
21 | --- a/policy/modules/system/logging.te | 21 | --- a/policy/modules/system/logging.te |
22 | +++ b/policy/modules/system/logging.te | 22 | +++ b/policy/modules/system/logging.te |
23 | @@ -161,6 +161,7 @@ dontaudit auditd_t auditd_etc_t:file map; | 23 | @@ -169,6 +169,7 @@ dontaudit auditd_t auditd_etc_t:file map; |
24 | manage_files_pattern(auditd_t, auditd_log_t, auditd_log_t) | 24 | manage_files_pattern(auditd_t, auditd_log_t, auditd_log_t) |
25 | allow auditd_t auditd_log_t:dir setattr; | 25 | allow auditd_t auditd_log_t:dir setattr; |
26 | manage_lnk_files_pattern(auditd_t, auditd_log_t, auditd_log_t) | 26 | manage_lnk_files_pattern(auditd_t, auditd_log_t, auditd_log_t) |
@@ -28,7 +28,7 @@ index abee7df9c..cc530a2be 100644 | |||
28 | allow auditd_t var_log_t:dir search_dir_perms; | 28 | allow auditd_t var_log_t:dir search_dir_perms; |
29 | 29 | ||
30 | manage_files_pattern(auditd_t, auditd_runtime_t, auditd_runtime_t) | 30 | manage_files_pattern(auditd_t, auditd_runtime_t, auditd_runtime_t) |
31 | @@ -290,6 +291,7 @@ optional_policy(` | 31 | @@ -298,6 +299,7 @@ optional_policy(` |
32 | allow audisp_remote_t self:capability { setpcap setuid }; | 32 | allow audisp_remote_t self:capability { setpcap setuid }; |
33 | allow audisp_remote_t self:process { getcap setcap }; | 33 | allow audisp_remote_t self:process { getcap setcap }; |
34 | allow audisp_remote_t self:tcp_socket create_socket_perms; | 34 | allow audisp_remote_t self:tcp_socket create_socket_perms; |
@@ -37,5 +37,5 @@ index abee7df9c..cc530a2be 100644 | |||
37 | 37 | ||
38 | manage_dirs_pattern(audisp_remote_t, audit_spool_t, audit_spool_t) | 38 | manage_dirs_pattern(audisp_remote_t, audit_spool_t, audit_spool_t) |
39 | -- | 39 | -- |
40 | 2.17.1 | 40 | 2.25.1 |
41 | 41 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0033-policy-modules-kernel-terminal-don-t-audit-tty_devic.patch b/recipes-security/refpolicy/refpolicy/0033-policy-modules-kernel-terminal-don-t-audit-tty_devic.patch index 3421a43..f62db74 100644 --- a/recipes-security/refpolicy/refpolicy/0033-policy-modules-kernel-terminal-don-t-audit-tty_devic.patch +++ b/recipes-security/refpolicy/refpolicy/0033-policy-modules-kernel-terminal-don-t-audit-tty_devic.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From bfcb86c9c9ad6a9f10a8556320443d8c96adedc9 Mon Sep 17 00:00:00 2001 | 1 | From 3f24b88886fcd1a17248d8d674a02d01061d937a Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 | 3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 |
4 | Subject: [PATCH] policy/modules/kernel/terminal: don't audit tty_device_t in | 4 | Subject: [PATCH] policy/modules/kernel/terminal: don't audit tty_device_t in |
@@ -17,7 +17,7 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
17 | 1 file changed, 3 insertions(+) | 17 | 1 file changed, 3 insertions(+) |
18 | 18 | ||
19 | diff --git a/policy/modules/kernel/terminal.if b/policy/modules/kernel/terminal.if | 19 | diff --git a/policy/modules/kernel/terminal.if b/policy/modules/kernel/terminal.if |
20 | index 55c18dffb..e8c0735eb 100644 | 20 | index e5645c7c5..6e9f654ac 100644 |
21 | --- a/policy/modules/kernel/terminal.if | 21 | --- a/policy/modules/kernel/terminal.if |
22 | +++ b/policy/modules/kernel/terminal.if | 22 | +++ b/policy/modules/kernel/terminal.if |
23 | @@ -335,9 +335,12 @@ interface(`term_use_console',` | 23 | @@ -335,9 +335,12 @@ interface(`term_use_console',` |
@@ -34,5 +34,5 @@ index 55c18dffb..e8c0735eb 100644 | |||
34 | 34 | ||
35 | ######################################## | 35 | ######################################## |
36 | -- | 36 | -- |
37 | 2.17.1 | 37 | 2.25.1 |
38 | 38 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0036-policy-modules-services-rpcbind-allow-rpcbind_t-to-c.patch b/recipes-security/refpolicy/refpolicy/0034-policy-modules-services-rpcbind-allow-rpcbind_t-to-c.patch index f9aa158..0b00f5a 100644 --- a/recipes-security/refpolicy/refpolicy/0036-policy-modules-services-rpcbind-allow-rpcbind_t-to-c.patch +++ b/recipes-security/refpolicy/refpolicy/0034-policy-modules-services-rpcbind-allow-rpcbind_t-to-c.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d1352b688603b16eb6da7a30198d8b7abfc55d1e Mon Sep 17 00:00:00 2001 | 1 | From 9c84425bbcaef5913fb6e309b8811639134714ed Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Wed, 1 Jul 2020 08:44:07 +0800 | 3 | Date: Wed, 1 Jul 2020 08:44:07 +0800 |
4 | Subject: [PATCH] policy/modules/services/rpcbind: allow rpcbind_t to create | 4 | Subject: [PATCH] policy/modules/services/rpcbind: allow rpcbind_t to create |
@@ -13,14 +13,14 @@ Upstream-Status: Inappropriate [embedded specific] | |||
13 | 13 | ||
14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
15 | --- | 15 | --- |
16 | policy/modules/services/rpcbind.te | 5 +++-- | 16 | policy/modules/services/rpcbind.te | 2 +- |
17 | 1 file changed, 3 insertions(+), 2 deletions(-) | 17 | 1 file changed, 1 insertion(+), 1 deletion(-) |
18 | 18 | ||
19 | diff --git a/policy/modules/services/rpcbind.te b/policy/modules/services/rpcbind.te | 19 | diff --git a/policy/modules/services/rpcbind.te b/policy/modules/services/rpcbind.te |
20 | index 168c28ca3..e1eb7d5fc 100644 | 20 | index 137c21ece..2a712192b 100644 |
21 | --- a/policy/modules/services/rpcbind.te | 21 | --- a/policy/modules/services/rpcbind.te |
22 | +++ b/policy/modules/services/rpcbind.te | 22 | +++ b/policy/modules/services/rpcbind.te |
23 | @@ -25,16 +25,17 @@ files_type(rpcbind_var_lib_t) | 23 | @@ -25,7 +25,7 @@ files_type(rpcbind_var_lib_t) |
24 | # Local policy | 24 | # Local policy |
25 | # | 25 | # |
26 | 26 | ||
@@ -29,17 +29,6 @@ index 168c28ca3..e1eb7d5fc 100644 | |||
29 | # net_admin is for SO_SNDBUFFORCE | 29 | # net_admin is for SO_SNDBUFFORCE |
30 | dontaudit rpcbind_t self:capability net_admin; | 30 | dontaudit rpcbind_t self:capability net_admin; |
31 | allow rpcbind_t self:fifo_file rw_fifo_file_perms; | 31 | allow rpcbind_t self:fifo_file rw_fifo_file_perms; |
32 | allow rpcbind_t self:unix_stream_socket { accept listen }; | ||
33 | allow rpcbind_t self:tcp_socket { accept listen }; | ||
34 | |||
35 | +manage_dirs_pattern(rpcbind_t, rpcbind_runtime_t, rpcbind_runtime_t) | ||
36 | manage_files_pattern(rpcbind_t, rpcbind_runtime_t, rpcbind_runtime_t) | ||
37 | manage_sock_files_pattern(rpcbind_t, rpcbind_runtime_t, rpcbind_runtime_t) | ||
38 | -files_runtime_filetrans(rpcbind_t, rpcbind_runtime_t, { file sock_file }) | ||
39 | +files_runtime_filetrans(rpcbind_t, rpcbind_runtime_t, { file sock_file dir }) | ||
40 | |||
41 | manage_dirs_pattern(rpcbind_t, rpcbind_var_lib_t, rpcbind_var_lib_t) | ||
42 | manage_files_pattern(rpcbind_t, rpcbind_var_lib_t, rpcbind_var_lib_t) | ||
43 | -- | 32 | -- |
44 | 2.17.1 | 33 | 2.25.1 |
45 | 34 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0034-policy-modules-system-modutils-allow-mod_t-to-access.patch b/recipes-security/refpolicy/refpolicy/0034-policy-modules-system-modutils-allow-mod_t-to-access.patch deleted file mode 100644 index e7ce388..0000000 --- a/recipes-security/refpolicy/refpolicy/0034-policy-modules-system-modutils-allow-mod_t-to-access.patch +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | From b3ff2e8572cd929c419775e57b547f309ba9d8fb Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Mon, 24 Aug 2020 11:29:09 +0800 | ||
4 | Subject: [PATCH] policy/modules/system/modutils: allow mod_t to access | ||
5 | confidentiality of class lockdown | ||
6 | |||
7 | The SELinux lockdown implementation was introduced since kernel 5.6 by | ||
8 | commit 59438b46471ae6cdfb761afc8c9beaf1e428a331. We need to allow mod_t | ||
9 | and udev_t to access confidentiality of class lockdown to mount tracefs. | ||
10 | |||
11 | Fixes: | ||
12 | kernel: Could not create tracefs 'iwlwifi_data/filter' entry | ||
13 | kernel: Could not create tracefs 'enable' entry | ||
14 | kernel: Could not create tracefs 'id' entry | ||
15 | kernel: Could not create tracefs 'filter' entry | ||
16 | kernel: Could not create tracefs 'trigger' entry | ||
17 | kernel: Could not create tracefs 'format' entry | ||
18 | |||
19 | audit[170]: AVC avc: denied { confidentiality } for pid=170 | ||
20 | comm="modprobe" lockdown_reason="use of tracefs" | ||
21 | scontext=system_u:system_r:kmod_t:s15:c0.c1023 | ||
22 | tcontext=system_u:system_r:kmod_t:s15:c0.c1023 tclass=lockdown | ||
23 | permissive=0 | ||
24 | |||
25 | audit[190]: AVC avc: denied { confidentiality } for pid=190 | ||
26 | comm="systemd-udevd" lockdown_reason="use of tracefs" | ||
27 | scontext=system_u:system_r:udev_t:s0-s15:c0.c1023 | ||
28 | tcontext=system_u:system_r:udev_t:s0-s15:c0.c1023 tclass=lockdown | ||
29 | permissive=0 | ||
30 | |||
31 | Upstream-Status: Inappropriate [embedded specific] | ||
32 | |||
33 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
34 | --- | ||
35 | policy/modules/system/modutils.te | 2 ++ | ||
36 | policy/modules/system/udev.te | 2 ++ | ||
37 | 2 files changed, 4 insertions(+) | ||
38 | |||
39 | diff --git a/policy/modules/system/modutils.te b/policy/modules/system/modutils.te | ||
40 | index b0a419dc1..5b4f0aca1 100644 | ||
41 | --- a/policy/modules/system/modutils.te | ||
42 | +++ b/policy/modules/system/modutils.te | ||
43 | @@ -41,6 +41,8 @@ dontaudit kmod_t self:capability sys_admin; | ||
44 | allow kmod_t self:udp_socket create_socket_perms; | ||
45 | allow kmod_t self:rawip_socket create_socket_perms; | ||
46 | |||
47 | +allow kmod_t self:lockdown confidentiality; | ||
48 | + | ||
49 | # Read module config and dependency information | ||
50 | list_dirs_pattern(kmod_t, modules_conf_t, modules_conf_t) | ||
51 | read_files_pattern(kmod_t, modules_conf_t, modules_conf_t) | ||
52 | diff --git a/policy/modules/system/udev.te b/policy/modules/system/udev.te | ||
53 | index c50ff68c1..4c5a690fb 100644 | ||
54 | --- a/policy/modules/system/udev.te | ||
55 | +++ b/policy/modules/system/udev.te | ||
56 | @@ -67,6 +67,8 @@ ifdef(`init_systemd',` | ||
57 | # for systemd-udevd to rename interfaces | ||
58 | allow udev_t self:netlink_route_socket nlmsg_write; | ||
59 | |||
60 | +allow udev_t self:lockdown confidentiality; | ||
61 | + | ||
62 | can_exec(udev_t, udev_exec_t) | ||
63 | |||
64 | allow udev_t udev_helper_exec_t:dir list_dir_perms; | ||
65 | -- | ||
66 | 2.17.1 | ||
67 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0035-policy-modules-system-getty-allow-getty_t-to-search-.patch b/recipes-security/refpolicy/refpolicy/0035-policy-modules-system-getty-allow-getty_t-to-search-.patch deleted file mode 100644 index 0dfe0ee..0000000 --- a/recipes-security/refpolicy/refpolicy/0035-policy-modules-system-getty-allow-getty_t-to-search-.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 175b493e7fe69de274388a7f251e74ec9cd56c41 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Tue, 23 Jun 2020 08:39:44 +0800 | ||
4 | Subject: [PATCH] policy/modules/system/getty: allow getty_t to search tmpfs | ||
5 | |||
6 | Fixes: | ||
7 | avc: denied { search } for pid=211 comm="agetty" name="/" dev="tmpfs" | ||
8 | ino=1 scontext=system_u:system_r:getty_t | ||
9 | tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=0 | ||
10 | |||
11 | Upstream-Status: Inappropriate [embedded specific] | ||
12 | |||
13 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
14 | --- | ||
15 | policy/modules/system/getty.te | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | diff --git a/policy/modules/system/getty.te b/policy/modules/system/getty.te | ||
19 | index e6e76a93b..c704ddb82 100644 | ||
20 | --- a/policy/modules/system/getty.te | ||
21 | +++ b/policy/modules/system/getty.te | ||
22 | @@ -68,6 +68,7 @@ files_read_etc_runtime_files(getty_t) | ||
23 | files_read_etc_files(getty_t) | ||
24 | files_search_spool(getty_t) | ||
25 | files_dontaudit_search_var_lib(getty_t) | ||
26 | +fs_search_tmpfs(getty_t) | ||
27 | |||
28 | fs_search_auto_mountpoints(getty_t) | ||
29 | # for error condition handling | ||
30 | -- | ||
31 | 2.17.1 | ||
32 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0038-policy-modules-system-systemd-enable-support-for-sys.patch b/recipes-security/refpolicy/refpolicy/0035-policy-modules-system-systemd-enable-support-for-sys.patch index cc29c7b..43b2f4d 100644 --- a/recipes-security/refpolicy/refpolicy/0038-policy-modules-system-systemd-enable-support-for-sys.patch +++ b/recipes-security/refpolicy/refpolicy/0035-policy-modules-system-systemd-enable-support-for-sys.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 93d4f198bd469a8728f5ce0cc51ff18f8a58b23b Mon Sep 17 00:00:00 2001 | 1 | From 6465e39b6dfe8daa88cab321e3cf44ccc9f1441d Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Thu, 4 Feb 2016 06:03:19 -0500 | 3 | Date: Thu, 4 Feb 2016 06:03:19 -0500 |
4 | Subject: [PATCH] policy/modules/system/systemd: enable support for | 4 | Subject: [PATCH] policy/modules/system/systemd: enable support for |
@@ -36,10 +36,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
36 | 1 file changed, 5 insertions(+), 1 deletion(-) | 36 | 1 file changed, 5 insertions(+), 1 deletion(-) |
37 | 37 | ||
38 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | 38 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te |
39 | index 3d9198342..31d28a0e3 100644 | 39 | index ef25974ac..362248d17 100644 |
40 | --- a/policy/modules/system/systemd.te | 40 | --- a/policy/modules/system/systemd.te |
41 | +++ b/policy/modules/system/systemd.te | 41 | +++ b/policy/modules/system/systemd.te |
42 | @@ -10,7 +10,7 @@ policy_module(systemd, 1.12.6) | 42 | @@ -10,7 +10,7 @@ policy_module(systemd) |
43 | ## Enable support for systemd-tmpfiles to manage all non-security files. | 43 | ## Enable support for systemd-tmpfiles to manage all non-security files. |
44 | ## </p> | 44 | ## </p> |
45 | ## </desc> | 45 | ## </desc> |
@@ -48,7 +48,7 @@ index 3d9198342..31d28a0e3 100644 | |||
48 | 48 | ||
49 | ## <desc> | 49 | ## <desc> |
50 | ## <p> | 50 | ## <p> |
51 | @@ -1396,6 +1396,10 @@ files_relabelfrom_home(systemd_tmpfiles_t) | 51 | @@ -1640,6 +1640,10 @@ files_relabelfrom_home(systemd_tmpfiles_t) |
52 | files_relabelto_home(systemd_tmpfiles_t) | 52 | files_relabelto_home(systemd_tmpfiles_t) |
53 | files_relabelto_etc_dirs(systemd_tmpfiles_t) | 53 | files_relabelto_etc_dirs(systemd_tmpfiles_t) |
54 | files_setattr_lock_dirs(systemd_tmpfiles_t) | 54 | files_setattr_lock_dirs(systemd_tmpfiles_t) |
@@ -60,5 +60,5 @@ index 3d9198342..31d28a0e3 100644 | |||
60 | files_manage_etc_symlinks(systemd_tmpfiles_t) | 60 | files_manage_etc_symlinks(systemd_tmpfiles_t) |
61 | 61 | ||
62 | -- | 62 | -- |
63 | 2.17.1 | 63 | 2.25.1 |
64 | 64 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0045-policy-modules-system-systemd-allow-systemd_logind_t.patch b/recipes-security/refpolicy/refpolicy/0036-policy-modules-system-systemd-allow-systemd_logind_t.patch index 49aa7a6..56b6119 100644 --- a/recipes-security/refpolicy/refpolicy/0045-policy-modules-system-systemd-allow-systemd_logind_t.patch +++ b/recipes-security/refpolicy/refpolicy/0036-policy-modules-system-systemd-allow-systemd_logind_t.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4e2df7ca542b6c94e74345daaecb33efc82d749a Mon Sep 17 00:00:00 2001 | 1 | From 2acb5ddbd04c578a420418e3bcb572bbd2dfbae6 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Sat, 18 Dec 2021 09:26:43 +0800 | 3 | Date: Sat, 18 Dec 2021 09:26:43 +0800 |
4 | Subject: [PATCH] policy/modules/system/systemd: allow systemd_logind_t to read | 4 | Subject: [PATCH] policy/modules/system/systemd: allow systemd_logind_t to read |
@@ -27,10 +27,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
27 | 1 file changed, 1 insertion(+) | 27 | 1 file changed, 1 insertion(+) |
28 | 28 | ||
29 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | 29 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te |
30 | index 847895e63..1a83148c1 100644 | 30 | index 362248d17..4a1e06640 100644 |
31 | --- a/policy/modules/system/systemd.te | 31 | --- a/policy/modules/system/systemd.te |
32 | +++ b/policy/modules/system/systemd.te | 32 | +++ b/policy/modules/system/systemd.te |
33 | @@ -721,6 +721,7 @@ userdom_relabelfrom_user_runtime_dirs(systemd_logind_t) | 33 | @@ -920,6 +920,7 @@ userdom_relabelfrom_user_runtime_dirs(systemd_logind_t) |
34 | userdom_relabelto_user_runtime_dirs(systemd_logind_t) | 34 | userdom_relabelto_user_runtime_dirs(systemd_logind_t) |
35 | userdom_setattr_user_ttys(systemd_logind_t) | 35 | userdom_setattr_user_ttys(systemd_logind_t) |
36 | userdom_use_user_ttys(systemd_logind_t) | 36 | userdom_use_user_ttys(systemd_logind_t) |
@@ -39,5 +39,5 @@ index 847895e63..1a83148c1 100644 | |||
39 | # Needed to work around patch not yet merged into the systemd-logind supported on RHEL 7.x | 39 | # Needed to work around patch not yet merged into the systemd-logind supported on RHEL 7.x |
40 | # The change in systemd by Nicolas Iooss on 02-Feb-2016 with hash 4b51966cf6c06250036e428608da92f8640beb96 | 40 | # The change in systemd by Nicolas Iooss on 02-Feb-2016 with hash 4b51966cf6c06250036e428608da92f8640beb96 |
41 | -- | 41 | -- |
42 | 2.17.1 | 42 | 2.25.1 |
43 | 43 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0037-policy-modules-admin-usermanage-allow-useradd-to-rel.patch b/recipes-security/refpolicy/refpolicy/0037-policy-modules-admin-usermanage-allow-useradd-to-rel.patch deleted file mode 100644 index 9465a3e..0000000 --- a/recipes-security/refpolicy/refpolicy/0037-policy-modules-admin-usermanage-allow-useradd-to-rel.patch +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | From 07866ad826b299194c1bfd7978e5077dde72a68e Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Mon, 11 Oct 2021 10:10:10 +0800 | ||
4 | Subject: [PATCH] policy/modules/admin/usermanage: allow useradd to relabel | ||
5 | user home files | ||
6 | |||
7 | Fixes: | ||
8 | avc: denied { relabelfrom } for pid=491 comm="useradd" name=".bashrc" | ||
9 | dev="vda" ino=12641 scontext=root:sysadm_r:useradd_t | ||
10 | tcontext=user_u:object_r:user_home_t tclass=file permissive=0 | ||
11 | |||
12 | Upstream-Status: Inappropriate [embedded specific] | ||
13 | |||
14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
15 | --- | ||
16 | policy/modules/admin/usermanage.te | 2 ++ | ||
17 | policy/modules/system/userdomain.if | 18 ++++++++++++++++++ | ||
18 | 2 files changed, 20 insertions(+) | ||
19 | |||
20 | diff --git a/policy/modules/admin/usermanage.te b/policy/modules/admin/usermanage.te | ||
21 | index 98646b4b4..50c479498 100644 | ||
22 | --- a/policy/modules/admin/usermanage.te | ||
23 | +++ b/policy/modules/admin/usermanage.te | ||
24 | @@ -496,6 +496,7 @@ files_read_etc_runtime_files(useradd_t) | ||
25 | |||
26 | fs_search_auto_mountpoints(useradd_t) | ||
27 | fs_getattr_xattr_fs(useradd_t) | ||
28 | +fs_search_tmpfs(useradd_t) | ||
29 | |||
30 | mls_file_upgrade(useradd_t) | ||
31 | |||
32 | @@ -541,6 +542,7 @@ userdom_home_filetrans_user_home_dir(useradd_t) | ||
33 | userdom_manage_user_home_content_dirs(useradd_t) | ||
34 | userdom_manage_user_home_content_files(useradd_t) | ||
35 | userdom_user_home_dir_filetrans_user_home_content(useradd_t, notdevfile_class_set) | ||
36 | +userdom_relabel_user_home_content_files(useradd_t) | ||
37 | |||
38 | optional_policy(` | ||
39 | mta_manage_spool(useradd_t) | ||
40 | diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if | ||
41 | index 22b3c1bf7..ec625170d 100644 | ||
42 | --- a/policy/modules/system/userdomain.if | ||
43 | +++ b/policy/modules/system/userdomain.if | ||
44 | @@ -2362,6 +2362,24 @@ interface(`userdom_dontaudit_relabel_user_home_content_files',` | ||
45 | dontaudit $1 user_home_t:file relabel_file_perms; | ||
46 | ') | ||
47 | |||
48 | +######################################## | ||
49 | +## <summary> | ||
50 | +## Relabel user home files. | ||
51 | +## </summary> | ||
52 | +## <param name="domain"> | ||
53 | +## <summary> | ||
54 | +## Domain allowed access. | ||
55 | +## </summary> | ||
56 | +## </param> | ||
57 | +# | ||
58 | +interface(`userdom_relabel_user_home_content_files',` | ||
59 | + gen_require(` | ||
60 | + type user_home_t; | ||
61 | + ') | ||
62 | + | ||
63 | + allow $1 user_home_t:file relabel_file_perms; | ||
64 | +') | ||
65 | + | ||
66 | ######################################## | ||
67 | ## <summary> | ||
68 | ## Read user home subdirectory symbolic links. | ||
69 | -- | ||
70 | 2.17.1 | ||
71 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0037-policy-modules-roles-sysadm-allow-sysadm-to-use-init.patch b/recipes-security/refpolicy/refpolicy/0037-policy-modules-roles-sysadm-allow-sysadm-to-use-init.patch new file mode 100644 index 0000000..78c4dc8 --- /dev/null +++ b/recipes-security/refpolicy/refpolicy/0037-policy-modules-roles-sysadm-allow-sysadm-to-use-init.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 51a7f8058fee569322c1a0597fccd36c318ad943 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Fri, 28 Oct 2022 11:56:09 +0800 | ||
4 | Subject: [PATCH] policy/modules/roles/sysadm: allow sysadm to use init file | ||
5 | descriptors | ||
6 | |||
7 | Root can not login via console without this. | ||
8 | |||
9 | Fixes: | ||
10 | avc: denied { use } for pid=323 comm="sh" path="/dev/tty1" | ||
11 | dev="devtmpfs" ino=21 scontext=root:sysadm_r:sysadm_t | ||
12 | tcontext=system_u:system_r:init_t tclass=fd permissive=0 | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
17 | --- | ||
18 | policy/modules/roles/sysadm.te | 2 ++ | ||
19 | 1 file changed, 2 insertions(+) | ||
20 | |||
21 | diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te | ||
22 | index bb715a847..088c954f5 100644 | ||
23 | --- a/policy/modules/roles/sysadm.te | ||
24 | +++ b/policy/modules/roles/sysadm.te | ||
25 | @@ -86,6 +86,8 @@ ifdef(`init_systemd',` | ||
26 | # LookupDynamicUserByUID on org.freedesktop.systemd1. | ||
27 | init_dbus_chat(sysadm_t) | ||
28 | |||
29 | + init_use_fds(sysadm_t) | ||
30 | + | ||
31 | # Allow sysadm to get the status of and set properties of other users, | ||
32 | # sessions, and seats on the system. | ||
33 | systemd_dbus_chat_logind(sysadm_t) | ||
34 | -- | ||
35 | 2.25.1 | ||
36 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0038-policy-modules-system-systemd-systemd-user-fixes.patch b/recipes-security/refpolicy/refpolicy/0038-policy-modules-system-systemd-systemd-user-fixes.patch new file mode 100644 index 0000000..85bb82b --- /dev/null +++ b/recipes-security/refpolicy/refpolicy/0038-policy-modules-system-systemd-systemd-user-fixes.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | From 5b6f3fcb1ddabd0a66541959306e7b0adfe2b2b0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Thu, 4 Feb 2021 10:48:54 +0800 | ||
4 | Subject: [PATCH] policy/modules/system/systemd: systemd --user fixes | ||
5 | |||
6 | Fixes: | ||
7 | systemctl[277]: Failed to connect to bus: No medium found | ||
8 | |||
9 | avc: denied { mknod } for pid=297 comm="systemd" capability=27 | ||
10 | scontext=root:sysadm_r:sysadm_systemd_t | ||
11 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=capability permissive=0 | ||
12 | |||
13 | avc: denied { bpf } for pid=297 comm="systemd" capability=39 | ||
14 | scontext=root:sysadm_r:sysadm_systemd_t | ||
15 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=capability2 permissive=0 | ||
16 | |||
17 | avc: denied { sys_admin } for pid=297 comm="systemd" capability=21 | ||
18 | scontext=root:sysadm_r:sysadm_systemd_t | ||
19 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=capability permissive=0 | ||
20 | |||
21 | avc: denied { perfmon } for pid=297 comm="systemd" capability=38 | ||
22 | scontext=root:sysadm_r:sysadm_systemd_t | ||
23 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=capability2 permissive=0 | ||
24 | |||
25 | Upstream-Status: Inappropriate [embedded specific] | ||
26 | |||
27 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
28 | --- | ||
29 | policy/modules/roles/sysadm.te | 2 ++ | ||
30 | policy/modules/system/systemd.if | 21 ++++++++++++++++++++- | ||
31 | 2 files changed, 22 insertions(+), 1 deletion(-) | ||
32 | |||
33 | diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te | ||
34 | index 088c954f5..92f50fd5a 100644 | ||
35 | --- a/policy/modules/roles/sysadm.te | ||
36 | +++ b/policy/modules/roles/sysadm.te | ||
37 | @@ -98,6 +98,8 @@ ifdef(`init_systemd',` | ||
38 | |||
39 | # Allow sysadm to follow logs in the journal, i.e. with podman logs -f | ||
40 | systemd_watch_journal_dirs(sysadm_t) | ||
41 | + | ||
42 | + systemd_sysadm_user(sysadm_t) | ||
43 | ') | ||
44 | |||
45 | tunable_policy(`allow_ptrace',` | ||
46 | diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if | ||
47 | index 9dc91fbb7..325ca548b 100644 | ||
48 | --- a/policy/modules/system/systemd.if | ||
49 | +++ b/policy/modules/system/systemd.if | ||
50 | @@ -58,7 +58,7 @@ template(`systemd_role_template',` | ||
51 | allow $1_systemd_t self:process { getsched signal }; | ||
52 | allow $1_systemd_t self:netlink_kobject_uevent_socket create_socket_perms; | ||
53 | allow $1_systemd_t self:unix_stream_socket create_stream_socket_perms; | ||
54 | - allow $1_systemd_t $3:process { setsched rlimitinh signal_perms }; | ||
55 | + allow $1_systemd_t $3:process { setsched rlimitinh signal_perms noatsecure }; | ||
56 | corecmd_shell_domtrans($1_systemd_t, $3) | ||
57 | corecmd_bin_domtrans($1_systemd_t, $3) | ||
58 | |||
59 | @@ -2613,3 +2613,22 @@ interface(`systemd_use_inherited_machined_ptys', ` | ||
60 | allow $1 systemd_machined_t:fd use; | ||
61 | allow $1 systemd_machined_devpts_t:chr_file rw_inherited_term_perms; | ||
62 | ') | ||
63 | + | ||
64 | +######################################### | ||
65 | +## <summary> | ||
66 | +## sysadm user for systemd --user | ||
67 | +## </summary> | ||
68 | +## <param name="role"> | ||
69 | +## <summary> | ||
70 | +## Role allowed access. | ||
71 | +## </summary> | ||
72 | +## </param> | ||
73 | +# | ||
74 | +interface(`systemd_sysadm_user',` | ||
75 | + gen_require(` | ||
76 | + type sysadm_systemd_t; | ||
77 | + ') | ||
78 | + | ||
79 | + allow sysadm_systemd_t self:capability { mknod sys_admin }; | ||
80 | + allow sysadm_systemd_t self:capability2 { bpf perfmon }; | ||
81 | +') | ||
82 | -- | ||
83 | 2.25.1 | ||
84 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0046-policy-modules-system-mount-make-mount_t-domain-MLS-.patch b/recipes-security/refpolicy/refpolicy/0039-policy-modules-system-mount-make-mount_t-domain-MLS-.patch index 4cae8c6..c3b4b55 100644 --- a/recipes-security/refpolicy/refpolicy/0046-policy-modules-system-mount-make-mount_t-domain-MLS-.patch +++ b/recipes-security/refpolicy/refpolicy/0039-policy-modules-system-mount-make-mount_t-domain-MLS-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 705008ba8ef960cf2e4813b4b8c5a87b919d545f Mon Sep 17 00:00:00 2001 | 1 | From ccdd22cc2776b695f96faffc88699aa2b182e085 Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Sat, 15 Feb 2014 04:22:47 -0500 | 3 | Date: Sat, 15 Feb 2014 04:22:47 -0500 |
4 | Subject: [PATCH] policy/modules/system/mount: make mount_t domain MLS trusted | 4 | Subject: [PATCH] policy/modules/system/mount: make mount_t domain MLS trusted |
@@ -19,10 +19,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
19 | 1 file changed, 1 insertion(+) | 19 | 1 file changed, 1 insertion(+) |
20 | 20 | ||
21 | diff --git a/policy/modules/system/mount.te b/policy/modules/system/mount.te | 21 | diff --git a/policy/modules/system/mount.te b/policy/modules/system/mount.te |
22 | index e39ab41a8..3481f9294 100644 | 22 | index d028723ce..97f49e58e 100644 |
23 | --- a/policy/modules/system/mount.te | 23 | --- a/policy/modules/system/mount.te |
24 | +++ b/policy/modules/system/mount.te | 24 | +++ b/policy/modules/system/mount.te |
25 | @@ -116,6 +116,7 @@ fs_dontaudit_write_all_image_files(mount_t) | 25 | @@ -112,6 +112,7 @@ fs_dontaudit_write_all_image_files(mount_t) |
26 | 26 | ||
27 | mls_file_read_all_levels(mount_t) | 27 | mls_file_read_all_levels(mount_t) |
28 | mls_file_write_all_levels(mount_t) | 28 | mls_file_write_all_levels(mount_t) |
@@ -31,5 +31,5 @@ index e39ab41a8..3481f9294 100644 | |||
31 | selinux_get_enforce_mode(mount_t) | 31 | selinux_get_enforce_mode(mount_t) |
32 | 32 | ||
33 | -- | 33 | -- |
34 | 2.17.1 | 34 | 2.25.1 |
35 | 35 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0039-policy-modules-system-systemd-fix-systemd-resolved-s.patch b/recipes-security/refpolicy/refpolicy/0039-policy-modules-system-systemd-fix-systemd-resolved-s.patch deleted file mode 100644 index ea8af31..0000000 --- a/recipes-security/refpolicy/refpolicy/0039-policy-modules-system-systemd-fix-systemd-resolved-s.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 99139408a7919282e97e1b2fcd5da33248386d73 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Mon, 25 Jan 2021 14:14:59 +0800 | ||
4 | Subject: [PATCH] policy/modules/system/systemd: fix systemd-resolved startup | ||
5 | failures | ||
6 | |||
7 | * Allow systemd_resolved_t to manage systemd_resolved_runtime_t link | ||
8 | files | ||
9 | * Allow systemd_resolved_t to send and recevie messages from dhcpc over | ||
10 | dbus | ||
11 | |||
12 | Fixes: | ||
13 | avc: denied { create } for pid=329 comm="systemd-resolve" | ||
14 | name=".#stub-resolv.conf53cb7f9d1e3aa72b" | ||
15 | scontext=system_u:system_r:systemd_resolved_t:s0-s15:c0.c1023 | ||
16 | tcontext=system_u:object_r:systemd_resolved_runtime_t:s0 tclass=lnk_file | ||
17 | permissive=0 | ||
18 | |||
19 | avc: denied { send_msg } for msgtype=method_call | ||
20 | interface=org.freedesktop.resolve1.Manager member=RevertLink | ||
21 | dest=org.freedesktop.resolve1 spid=340 tpid=345 | ||
22 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
23 | tcontext=system_u:system_r:systemd_resolved_t:s0-s15:c0.c1023 | ||
24 | tclass=dbus permissive=0 | ||
25 | |||
26 | avc: denied { send_msg } for msgtype=method_return dest=:1.6 spid=345 | ||
27 | tpid=340 scontext=system_u:system_r:systemd_resolved_t:s0-s15:c0.c1023 | ||
28 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tclass=dbus | ||
29 | permissive=0 | ||
30 | |||
31 | Upstream-Status: Inappropriate [embedded specific] | ||
32 | |||
33 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
34 | --- | ||
35 | policy/modules/system/systemd.te | 2 ++ | ||
36 | 1 file changed, 2 insertions(+) | ||
37 | |||
38 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | ||
39 | index 31d28a0e3..448905ff7 100644 | ||
40 | --- a/policy/modules/system/systemd.te | ||
41 | +++ b/policy/modules/system/systemd.te | ||
42 | @@ -1199,6 +1199,7 @@ allow systemd_resolved_t systemd_networkd_runtime_t:dir watch; | ||
43 | |||
44 | manage_dirs_pattern(systemd_resolved_t, systemd_resolved_runtime_t, systemd_resolved_runtime_t) | ||
45 | manage_files_pattern(systemd_resolved_t, systemd_resolved_runtime_t, systemd_resolved_runtime_t) | ||
46 | +manage_lnk_files_pattern(systemd_resolved_t, systemd_resolved_runtime_t, systemd_resolved_runtime_t) | ||
47 | manage_sock_files_pattern(systemd_resolved_t, systemd_resolved_runtime_t, systemd_resolved_runtime_t) | ||
48 | init_runtime_filetrans(systemd_resolved_t, systemd_resolved_runtime_t, dir) | ||
49 | |||
50 | @@ -1236,6 +1237,7 @@ optional_policy(` | ||
51 | dbus_system_bus_client(systemd_resolved_t) | ||
52 | dbus_watch_system_bus_runtime_dirs(systemd_resolved_t) | ||
53 | dbus_watch_system_bus_runtime_named_sockets(systemd_resolved_t) | ||
54 | + sysnet_dbus_chat_dhcpc(systemd_resolved_t) | ||
55 | ') | ||
56 | |||
57 | ######################################### | ||
58 | -- | ||
59 | 2.17.1 | ||
60 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0047-policy-modules-roles-sysadm-MLS-sysadm-rw-to-clearan.patch b/recipes-security/refpolicy/refpolicy/0040-policy-modules-roles-sysadm-MLS-sysadm-rw-to-clearan.patch index 86317b3..d711612 100644 --- a/recipes-security/refpolicy/refpolicy/0047-policy-modules-roles-sysadm-MLS-sysadm-rw-to-clearan.patch +++ b/recipes-security/refpolicy/refpolicy/0040-policy-modules-roles-sysadm-MLS-sysadm-rw-to-clearan.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From ef2b9196f3a51745a3644489d316bda7cd67f72d Mon Sep 17 00:00:00 2001 | 1 | From 64498d6cd30a0a65a24e3e7ab22cca5921c2db89 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Mon, 28 Jan 2019 14:05:18 +0800 | 3 | Date: Mon, 28 Jan 2019 14:05:18 +0800 |
4 | Subject: [PATCH] policy/modules/roles/sysadm: MLS - sysadm rw to clearance | 4 | Subject: [PATCH] policy/modules/roles/sysadm: MLS - sysadm rw to clearance |
@@ -7,7 +7,7 @@ The two new rules make sysadm_t domain MLS trusted for: | |||
7 | - reading from files at all levels. | 7 | - reading from files at all levels. |
8 | - writing to processes up to its clearance(s0-s15). | 8 | - writing to processes up to its clearance(s0-s15). |
9 | 9 | ||
10 | With default MLS policy, root user would login in as sysadm_t:s0 by | 10 | With default MLS policy, root user would login as sysadm_t:s0 by |
11 | default. Most processes will run in sysadm_t:s0 because no | 11 | default. Most processes will run in sysadm_t:s0 because no |
12 | domtrans/rangetrans rules, as a result, even root could not access | 12 | domtrans/rangetrans rules, as a result, even root could not access |
13 | high level files/processes. | 13 | high level files/processes. |
@@ -23,10 +23,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
23 | 1 file changed, 2 insertions(+) | 23 | 1 file changed, 2 insertions(+) |
24 | 24 | ||
25 | diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te | 25 | diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te |
26 | index e1933a5bd..0682ed31a 100644 | 26 | index 92f50fd5a..8c154d474 100644 |
27 | --- a/policy/modules/roles/sysadm.te | 27 | --- a/policy/modules/roles/sysadm.te |
28 | +++ b/policy/modules/roles/sysadm.te | 28 | +++ b/policy/modules/roles/sysadm.te |
29 | @@ -44,6 +44,8 @@ logging_watch_all_logs(sysadm_t) | 29 | @@ -45,6 +45,8 @@ logging_watch_all_logs(sysadm_t) |
30 | logging_watch_audit_log(sysadm_t) | 30 | logging_watch_audit_log(sysadm_t) |
31 | 31 | ||
32 | mls_process_read_all_levels(sysadm_t) | 32 | mls_process_read_all_levels(sysadm_t) |
@@ -36,5 +36,5 @@ index e1933a5bd..0682ed31a 100644 | |||
36 | selinux_read_policy(sysadm_t) | 36 | selinux_read_policy(sysadm_t) |
37 | 37 | ||
38 | -- | 38 | -- |
39 | 2.17.1 | 39 | 2.25.1 |
40 | 40 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0040-policy-modules-system-systemd-allow-systemd_-_t-to-g.patch b/recipes-security/refpolicy/refpolicy/0040-policy-modules-system-systemd-allow-systemd_-_t-to-g.patch deleted file mode 100644 index 91588f1..0000000 --- a/recipes-security/refpolicy/refpolicy/0040-policy-modules-system-systemd-allow-systemd_-_t-to-g.patch +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | From 81e63f86d6d030eaf0204796e32011c08e7b5e52 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Tue, 28 Sep 2021 10:03:04 +0800 | ||
4 | Subject: [PATCH] policy/modules/system/systemd: allow systemd_*_t to get the | ||
5 | attributes of tmpfs and cgroups | ||
6 | |||
7 | Fixes: | ||
8 | avc: denied { getattr } for pid=245 comm="systemd-network" name="/" | ||
9 | dev="tmpfs" ino=1 scontext=system_u:system_r:systemd_networkd_t | ||
10 | tcontext=system_u:object_r:tmpfs_t tclass=filesystem permissive=0 | ||
11 | |||
12 | avc: denied { getattr } for pid=252 comm="systemd-resolve" name="/" | ||
13 | dev="tmpfs" ino=1 scontext=system_u:system_r:systemd_resolved_t | ||
14 | tcontext=system_u:object_r:tmpfs_t tclass=filesystem permissive=0 | ||
15 | |||
16 | avc: denied { getattr } for pid=260 comm="systemd-user-se" name="/" | ||
17 | dev="tmpfs" ino=1 scontext=system_u:system_r:systemd_sessions_t | ||
18 | tcontext=system_u:object_r:tmpfs_t tclass=filesystem permissive=0 | ||
19 | |||
20 | avc: denied { search } for pid=293 comm="systemd-user-ru" name="/" | ||
21 | dev="tmpfs" ino=1 scontext=system_u:system_r:systemd_user_runtime_dir_t | ||
22 | tcontext=system_u:object_r:cgroup_t tclass=dir permissive=0 | ||
23 | |||
24 | Upstream-Status: Inappropriate [embedded specific] | ||
25 | |||
26 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
27 | --- | ||
28 | policy/modules/system/systemd.te | 35 ++++++++++++++++++++++++++++++++ | ||
29 | 1 file changed, 35 insertions(+) | ||
30 | |||
31 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | ||
32 | index 448905ff7..847895e63 100644 | ||
33 | --- a/policy/modules/system/systemd.te | ||
34 | +++ b/policy/modules/system/systemd.te | ||
35 | @@ -337,6 +337,10 @@ udev_read_runtime_files(systemd_backlight_t) | ||
36 | |||
37 | files_search_var_lib(systemd_backlight_t) | ||
38 | |||
39 | +fs_getattr_tmpfs(systemd_backlight_t) | ||
40 | +fs_search_cgroup_dirs(systemd_backlight_t) | ||
41 | +fs_getattr_cgroup(systemd_backlight_t) | ||
42 | + | ||
43 | ####################################### | ||
44 | # | ||
45 | # Binfmt local policy | ||
46 | @@ -447,6 +451,7 @@ files_list_usr(systemd_generator_t) | ||
47 | fs_list_efivars(systemd_generator_t) | ||
48 | fs_getattr_cgroup(systemd_generator_t) | ||
49 | fs_getattr_xattr_fs(systemd_generator_t) | ||
50 | +fs_getattr_tmpfs(systemd_generator_t) | ||
51 | |||
52 | init_create_runtime_files(systemd_generator_t) | ||
53 | init_manage_runtime_dirs(systemd_generator_t) | ||
54 | @@ -515,6 +520,10 @@ systemd_log_parse_environment(systemd_hostnamed_t) | ||
55 | # Allow reading /run/udev/data/+dmi:id | ||
56 | udev_read_runtime_files(systemd_hostnamed_t) | ||
57 | |||
58 | +fs_getattr_tmpfs(systemd_hostnamed_t) | ||
59 | +fs_search_cgroup_dirs(systemd_hostnamed_t) | ||
60 | +fs_getattr_cgroup(systemd_hostnamed_t) | ||
61 | + | ||
62 | optional_policy(` | ||
63 | dbus_connect_system_bus(systemd_hostnamed_t) | ||
64 | dbus_system_bus_client(systemd_hostnamed_t) | ||
65 | @@ -835,6 +844,10 @@ dev_read_sysfs(systemd_modules_load_t) | ||
66 | files_mmap_read_kernel_modules(systemd_modules_load_t) | ||
67 | files_read_etc_files(systemd_modules_load_t) | ||
68 | |||
69 | +fs_getattr_tmpfs(systemd_modules_load_t) | ||
70 | +fs_search_cgroup_dirs(systemd_modules_load_t) | ||
71 | +fs_getattr_cgroup(systemd_modules_load_t) | ||
72 | + | ||
73 | modutils_read_module_config(systemd_modules_load_t) | ||
74 | modutils_read_module_deps(systemd_modules_load_t) | ||
75 | |||
76 | @@ -885,6 +898,7 @@ files_watch_runtime_dirs(systemd_networkd_t) | ||
77 | files_watch_root_dirs(systemd_networkd_t) | ||
78 | files_list_runtime(systemd_networkd_t) | ||
79 | fs_getattr_xattr_fs(systemd_networkd_t) | ||
80 | +fs_getattr_tmpfs(systemd_networkd_t) | ||
81 | fs_getattr_cgroup(systemd_networkd_t) | ||
82 | fs_search_cgroup_dirs(systemd_networkd_t) | ||
83 | fs_read_nsfs_files(systemd_networkd_t) | ||
84 | @@ -1185,6 +1199,10 @@ udev_read_runtime_files(systemd_rfkill_t) | ||
85 | |||
86 | systemd_log_parse_environment(systemd_rfkill_t) | ||
87 | |||
88 | +fs_getattr_tmpfs(systemd_rfkill_t) | ||
89 | +fs_search_cgroup_dirs(systemd_rfkill_t) | ||
90 | +fs_getattr_cgroup(systemd_rfkill_t) | ||
91 | + | ||
92 | ######################################### | ||
93 | # | ||
94 | # Resolved local policy | ||
95 | @@ -1224,6 +1242,9 @@ auth_use_nsswitch(systemd_resolved_t) | ||
96 | files_watch_root_dirs(systemd_resolved_t) | ||
97 | files_watch_runtime_dirs(systemd_resolved_t) | ||
98 | files_list_runtime(systemd_resolved_t) | ||
99 | +fs_getattr_tmpfs(systemd_resolved_t) | ||
100 | +fs_search_cgroup_dirs(systemd_resolved_t) | ||
101 | +fs_getattr_cgroup(systemd_resolved_t) | ||
102 | |||
103 | init_dgram_send(systemd_resolved_t) | ||
104 | |||
105 | @@ -1288,6 +1309,10 @@ seutil_read_file_contexts(systemd_sessions_t) | ||
106 | |||
107 | systemd_log_parse_environment(systemd_sessions_t) | ||
108 | |||
109 | +fs_getattr_tmpfs(systemd_sessions_t) | ||
110 | +fs_search_cgroup_dirs(systemd_sessions_t) | ||
111 | +fs_getattr_cgroup(systemd_sessions_t) | ||
112 | + | ||
113 | ######################################## | ||
114 | # | ||
115 | # sysctl local policy | ||
116 | @@ -1304,6 +1329,9 @@ kernel_rw_all_sysctls(systemd_sysctl_t) | ||
117 | kernel_dontaudit_getattr_proc(systemd_sysctl_t) | ||
118 | |||
119 | files_read_etc_files(systemd_sysctl_t) | ||
120 | +fs_getattr_tmpfs(systemd_sysctl_t) | ||
121 | +fs_search_cgroup_dirs(systemd_sysctl_t) | ||
122 | +fs_getattr_cgroup(systemd_sysctl_t) | ||
123 | |||
124 | systemd_log_parse_environment(systemd_sysctl_t) | ||
125 | |||
126 | @@ -1409,6 +1437,8 @@ fs_getattr_tmpfs(systemd_tmpfiles_t) | ||
127 | fs_getattr_xattr_fs(systemd_tmpfiles_t) | ||
128 | fs_list_tmpfs(systemd_tmpfiles_t) | ||
129 | fs_relabelfrom_tmpfs_dirs(systemd_tmpfiles_t) | ||
130 | +fs_search_cgroup_dirs(systemd_tmpfiles_t) | ||
131 | +fs_getattr_cgroup(systemd_tmpfiles_t) | ||
132 | |||
133 | selinux_get_fs_mount(systemd_tmpfiles_t) | ||
134 | selinux_use_status_page(systemd_tmpfiles_t) | ||
135 | @@ -1497,6 +1527,10 @@ allow systemd_update_done_t systemd_update_run_t:file manage_file_perms; | ||
136 | files_etc_filetrans(systemd_update_done_t, systemd_update_run_t, file) | ||
137 | files_var_filetrans(systemd_update_done_t, systemd_update_run_t, file) | ||
138 | |||
139 | +fs_getattr_tmpfs(systemd_update_done_t) | ||
140 | +fs_search_cgroup_dirs(systemd_update_done_t) | ||
141 | +fs_getattr_cgroup(systemd_update_done_t) | ||
142 | + | ||
143 | kernel_read_kernel_sysctls(systemd_update_done_t) | ||
144 | |||
145 | selinux_use_status_page(systemd_update_done_t) | ||
146 | @@ -1601,6 +1635,7 @@ fs_unmount_tmpfs(systemd_user_runtime_dir_t) | ||
147 | fs_relabelfrom_tmpfs_dirs(systemd_user_runtime_dir_t) | ||
148 | fs_read_cgroup_files(systemd_user_runtime_dir_t) | ||
149 | fs_getattr_cgroup(systemd_user_runtime_dir_t) | ||
150 | +fs_search_cgroup_dirs(systemd_user_runtime_dir_t) | ||
151 | |||
152 | kernel_read_kernel_sysctls(systemd_user_runtime_dir_t) | ||
153 | kernel_dontaudit_getattr_proc(systemd_user_runtime_dir_t) | ||
154 | -- | ||
155 | 2.17.1 | ||
156 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0048-policy-modules-services-rpc-make-nfsd_t-domain-MLS-t.patch b/recipes-security/refpolicy/refpolicy/0041-policy-modules-services-rpc-make-nfsd_t-domain-MLS-t.patch index f659e7e..d22dacf 100644 --- a/recipes-security/refpolicy/refpolicy/0048-policy-modules-services-rpc-make-nfsd_t-domain-MLS-t.patch +++ b/recipes-security/refpolicy/refpolicy/0041-policy-modules-services-rpc-make-nfsd_t-domain-MLS-t.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 18ad027229a06fdcb833482dff0c2ae637d08e78 Mon Sep 17 00:00:00 2001 | 1 | From e82c43e60ef52ba00e8f2af5b46b2a6d49331209 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Fri, 23 Aug 2013 12:01:53 +0800 | 3 | Date: Fri, 23 Aug 2013 12:01:53 +0800 |
4 | Subject: [PATCH] policy/modules/services/rpc: make nfsd_t domain MLS trusted | 4 | Subject: [PATCH] policy/modules/services/rpc: make nfsd_t domain MLS trusted |
@@ -15,10 +15,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
15 | 2 files changed, 7 insertions(+) | 15 | 2 files changed, 7 insertions(+) |
16 | 16 | ||
17 | diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te | 17 | diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te |
18 | index ca951cb44..a32c59eb1 100644 | 18 | index 5124ae016..a40db8507 100644 |
19 | --- a/policy/modules/kernel/kernel.te | 19 | --- a/policy/modules/kernel/kernel.te |
20 | +++ b/policy/modules/kernel/kernel.te | 20 | +++ b/policy/modules/kernel/kernel.te |
21 | @@ -356,6 +356,8 @@ mls_process_read_all_levels(kernel_t) | 21 | @@ -368,6 +368,8 @@ mls_process_read_all_levels(kernel_t) |
22 | mls_process_write_all_levels(kernel_t) | 22 | mls_process_write_all_levels(kernel_t) |
23 | mls_file_write_all_levels(kernel_t) | 23 | mls_file_write_all_levels(kernel_t) |
24 | mls_file_read_all_levels(kernel_t) | 24 | mls_file_read_all_levels(kernel_t) |
@@ -28,7 +28,7 @@ index ca951cb44..a32c59eb1 100644 | |||
28 | ifdef(`distro_redhat',` | 28 | ifdef(`distro_redhat',` |
29 | # Bugzilla 222337 | 29 | # Bugzilla 222337 |
30 | diff --git a/policy/modules/services/rpcbind.te b/policy/modules/services/rpcbind.te | 30 | diff --git a/policy/modules/services/rpcbind.te b/policy/modules/services/rpcbind.te |
31 | index e1eb7d5fc..da0994749 100644 | 31 | index 2a712192b..923e48db7 100644 |
32 | --- a/policy/modules/services/rpcbind.te | 32 | --- a/policy/modules/services/rpcbind.te |
33 | +++ b/policy/modules/services/rpcbind.te | 33 | +++ b/policy/modules/services/rpcbind.te |
34 | @@ -73,6 +73,11 @@ logging_send_syslog_msg(rpcbind_t) | 34 | @@ -73,6 +73,11 @@ logging_send_syslog_msg(rpcbind_t) |
@@ -36,7 +36,7 @@ index e1eb7d5fc..da0994749 100644 | |||
36 | miscfiles_read_localization(rpcbind_t) | 36 | miscfiles_read_localization(rpcbind_t) |
37 | 37 | ||
38 | +# nfsd_t would not be allowed to send unix_stream_socket to rpcbind_t, | 38 | +# nfsd_t would not be allowed to send unix_stream_socket to rpcbind_t, |
39 | +# because the are running in different level. So add rules to allow this. | 39 | +# because they are running in different level. So add rules to allow this. |
40 | +mls_socket_read_all_levels(rpcbind_t) | 40 | +mls_socket_read_all_levels(rpcbind_t) |
41 | +mls_socket_write_all_levels(rpcbind_t) | 41 | +mls_socket_write_all_levels(rpcbind_t) |
42 | + | 42 | + |
@@ -44,5 +44,5 @@ index e1eb7d5fc..da0994749 100644 | |||
44 | term_dontaudit_use_unallocated_ttys(rpcbind_t) | 44 | term_dontaudit_use_unallocated_ttys(rpcbind_t) |
45 | ') | 45 | ') |
46 | -- | 46 | -- |
47 | 2.17.1 | 47 | 2.25.1 |
48 | 48 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0041-policy-modules-system-logging-fix-syslogd-failures-f.patch b/recipes-security/refpolicy/refpolicy/0041-policy-modules-system-logging-fix-syslogd-failures-f.patch deleted file mode 100644 index 2232d48..0000000 --- a/recipes-security/refpolicy/refpolicy/0041-policy-modules-system-logging-fix-syslogd-failures-f.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From dc2c9c91219311f6c4d985169dff6c5931a465d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Thu, 4 Feb 2016 02:10:15 -0500 | ||
4 | Subject: [PATCH] policy/modules/system/logging: fix syslogd failures for | ||
5 | systemd | ||
6 | |||
7 | Fixes: | ||
8 | syslogd[243]: Error opening log file: /var/log/auth.log: Permission denied | ||
9 | syslogd[243]: Error opening log file: /var/log/syslog: Permission denied | ||
10 | syslogd[243]: Error opening log file: /var/log/kern.log: Permission denied | ||
11 | syslogd[243]: Error opening log file: /var/log/mail.log: Permission denied | ||
12 | syslogd[243]: Error opening log file: /var/log/mail.err: Permission denied | ||
13 | syslogd[243]: Error opening log file: /var/log/messages: Permission denied | ||
14 | |||
15 | avc: denied { search } for pid=243 comm="syslogd" name="/" | ||
16 | dev="tmpfs" ino=1 scontext=system_u:system_r:syslogd_t | ||
17 | tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=0 | ||
18 | |||
19 | avc: denied { write } for pid=162 comm="systemd-journal" | ||
20 | name="syslog" dev="tmpfs" ino=515 scontext=system_u:system_r:syslogd_t | ||
21 | tcontext=system_u:object_r:syslogd_runtime_t tclass=sock_file | ||
22 | permissive=0 | ||
23 | |||
24 | Upstream-Status: Inappropriate [embedded specific] | ||
25 | |||
26 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
27 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
28 | --- | ||
29 | policy/modules/system/logging.te | 3 ++- | ||
30 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te | ||
33 | index cc530a2be..5b4b5ec5d 100644 | ||
34 | --- a/policy/modules/system/logging.te | ||
35 | +++ b/policy/modules/system/logging.te | ||
36 | @@ -431,7 +431,7 @@ files_search_var_lib(syslogd_t) | ||
37 | |||
38 | # manage runtime files | ||
39 | allow syslogd_t syslogd_runtime_t:dir create_dir_perms; | ||
40 | -allow syslogd_t syslogd_runtime_t:sock_file { create setattr unlink }; | ||
41 | +allow syslogd_t syslogd_runtime_t:sock_file { create setattr unlink write }; | ||
42 | allow syslogd_t syslogd_runtime_t:file map; | ||
43 | manage_files_pattern(syslogd_t, syslogd_runtime_t, syslogd_runtime_t) | ||
44 | files_runtime_filetrans(syslogd_t, syslogd_runtime_t, file) | ||
45 | @@ -495,6 +495,7 @@ files_var_lib_filetrans(syslogd_t, syslogd_var_lib_t, { file dir }) | ||
46 | |||
47 | fs_getattr_all_fs(syslogd_t) | ||
48 | fs_search_auto_mountpoints(syslogd_t) | ||
49 | +fs_search_tmpfs(syslogd_t) | ||
50 | |||
51 | mls_file_write_all_levels(syslogd_t) # Need to be able to write to /var/run/ and /var/log directories | ||
52 | |||
53 | -- | ||
54 | 2.17.1 | ||
55 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0049-policy-modules-admin-dmesg-make-dmesg_t-MLS-trusted-.patch b/recipes-security/refpolicy/refpolicy/0042-policy-modules-admin-dmesg-make-dmesg_t-MLS-trusted-.patch index ace056a..30c84f6 100644 --- a/recipes-security/refpolicy/refpolicy/0049-policy-modules-admin-dmesg-make-dmesg_t-MLS-trusted-.patch +++ b/recipes-security/refpolicy/refpolicy/0042-policy-modules-admin-dmesg-make-dmesg_t-MLS-trusted-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From b41a910654f5c5fe198b1695df18b6f6a1af7904 Mon Sep 17 00:00:00 2001 | 1 | From 9343914c0486b5aa6ff7cceeb8f6c399115e5fb3 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Tue, 30 Jun 2020 10:18:20 +0800 | 3 | Date: Tue, 30 Jun 2020 10:18:20 +0800 |
4 | Subject: [PATCH] policy/modules/admin/dmesg: make dmesg_t MLS trusted reading | 4 | Subject: [PATCH] policy/modules/admin/dmesg: make dmesg_t MLS trusted reading |
@@ -19,7 +19,7 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
19 | 1 file changed, 2 insertions(+) | 19 | 1 file changed, 2 insertions(+) |
20 | 20 | ||
21 | diff --git a/policy/modules/admin/dmesg.te b/policy/modules/admin/dmesg.te | 21 | diff --git a/policy/modules/admin/dmesg.te b/policy/modules/admin/dmesg.te |
22 | index f3421fdbb..d87ee5583 100644 | 22 | index f1da315a9..89478c38e 100644 |
23 | --- a/policy/modules/admin/dmesg.te | 23 | --- a/policy/modules/admin/dmesg.te |
24 | +++ b/policy/modules/admin/dmesg.te | 24 | +++ b/policy/modules/admin/dmesg.te |
25 | @@ -52,6 +52,8 @@ miscfiles_read_localization(dmesg_t) | 25 | @@ -52,6 +52,8 @@ miscfiles_read_localization(dmesg_t) |
@@ -32,5 +32,5 @@ index f3421fdbb..d87ee5583 100644 | |||
32 | seutil_sigchld_newrole(dmesg_t) | 32 | seutil_sigchld_newrole(dmesg_t) |
33 | ') | 33 | ') |
34 | -- | 34 | -- |
35 | 2.17.1 | 35 | 2.25.1 |
36 | 36 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0042-policy-modules-system-systemd-systemd-user-fixes.patch b/recipes-security/refpolicy/refpolicy/0042-policy-modules-system-systemd-systemd-user-fixes.patch deleted file mode 100644 index 108f62f..0000000 --- a/recipes-security/refpolicy/refpolicy/0042-policy-modules-system-systemd-systemd-user-fixes.patch +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | From 20b2608718064a92f9255adb459a97d95fdbc22e Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Thu, 4 Feb 2021 10:48:54 +0800 | ||
4 | Subject: [PATCH] policy/modules/system/systemd: systemd --user fixes | ||
5 | |||
6 | Fixes: | ||
7 | systemctl[1598]: Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and | ||
8 | $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host | ||
9 | --user to connect to bus of other user) | ||
10 | |||
11 | avc: denied { connectto } for pid=293 comm="login" | ||
12 | path="/run/systemd/userdb/io.systemd.Multiplexer" | ||
13 | scontext=system_u:system_r:local_login_t | ||
14 | tcontext=system_u:system_r:initrc_t tclass=unix_stream_socket | ||
15 | permissive=0 | ||
16 | |||
17 | avc: denied { read } for pid=293 comm="login" name="io.systemd.DropIn" | ||
18 | dev="tmpfs" ino=44 scontext=system_u:system_r:local_login_t | ||
19 | tcontext=system_u:object_r:systemd_userdb_runtime_t tclass=lnk_file | ||
20 | permissive=0 | ||
21 | |||
22 | avc: denied { read } for pid=293 comm="login" | ||
23 | name="io.systemd.NameServiceSwitch" dev="tmpfs" ino=43 | ||
24 | scontext=system_u:system_r:local_login_t | ||
25 | tcontext=system_u:object_r:systemd_userdb_runtime_t tclass=lnk_file | ||
26 | permissive=0 | ||
27 | |||
28 | avc: denied { connectto } for pid=244 comm="systemd-logind" | ||
29 | path="/run/systemd/userdb/io.systemd.Multiplexer" | ||
30 | scontext=system_u:system_r:systemd_logind_t | ||
31 | tcontext=system_u:system_r:initrc_t tclass=unix_stream_socket | ||
32 | permissive=0 | ||
33 | |||
34 | avc: denied { read } for pid=244 comm="systemd-logind" | ||
35 | name="io.systemd.DropIn" dev="tmpfs" ino=44 | ||
36 | scontext=system_u:system_r:systemd_logind_t | ||
37 | tcontext=system_u:object_r:systemd_userdb_runtime_t tclass=lnk_file | ||
38 | permissive=0 | ||
39 | |||
40 | avc: denied { read } for pid=244 comm="systemd-logind" | ||
41 | name="io.systemd.NameServiceSwitch" dev="tmpfs" ino=43 | ||
42 | scontext=system_u:system_r:systemd_logind_t | ||
43 | tcontext=system_u:object_r:systemd_userdb_runtime_t tclass=lnk_file | ||
44 | permissive=0 | ||
45 | |||
46 | avc: denied { mknod } for pid=297 comm="systemd" capability=27 | ||
47 | scontext=root:sysadm_r:sysadm_systemd_t | ||
48 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=capability permissive=0 | ||
49 | |||
50 | avc: denied { setrlimit } for pid=297 comm="systemd" | ||
51 | scontext=root:sysadm_r:sysadm_systemd_t | ||
52 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=process permissive=0 | ||
53 | |||
54 | avc: denied { bpf } for pid=297 comm="systemd" capability=39 | ||
55 | scontext=root:sysadm_r:sysadm_systemd_t | ||
56 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=capability2 permissive=0 | ||
57 | |||
58 | avc: denied { sys_admin } for pid=297 comm="systemd" capability=21 | ||
59 | scontext=root:sysadm_r:sysadm_systemd_t | ||
60 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=capability permissive=0 | ||
61 | |||
62 | avc: denied { perfmon } for pid=297 comm="systemd" capability=38 | ||
63 | scontext=root:sysadm_r:sysadm_systemd_t | ||
64 | tcontext=root:sysadm_r:sysadm_systemd_t tclass=capability2 permissive=0 | ||
65 | |||
66 | avc: denied { watch } for pid=297 comm="systemd" path="/etc" dev="vda" | ||
67 | ino=173 scontext=root:sysadm_r:sysadm_systemd_t | ||
68 | tcontext=system_u:object_r:etc_t tclass=dir permissive=0 | ||
69 | |||
70 | avc: denied { getattr } for pid=297 comm="systemd" name="/" dev="vda" | ||
71 | ino=2 scontext=root:sysadm_r:sysadm_systemd_t | ||
72 | tcontext=system_u:object_r:fs_t tclass=filesystem permissive=0 | ||
73 | |||
74 | avc: denied { read } for pid=297 comm="systemd" name="unix" dev="proc" | ||
75 | ino=4026532057 scontext=root:sysadm_r:sysadm_systemd_t | ||
76 | tcontext=system_u:object_r:proc_net_t tclass=file permissive=0 | ||
77 | |||
78 | Upstream-Status: Inappropriate [embedded specific] | ||
79 | |||
80 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
81 | --- | ||
82 | policy/modules/roles/sysadm.te | 2 ++ | ||
83 | policy/modules/system/init.if | 1 + | ||
84 | policy/modules/system/systemd.if | 27 ++++++++++++++++++++++++++- | ||
85 | 3 files changed, 29 insertions(+), 1 deletion(-) | ||
86 | |||
87 | diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te | ||
88 | index 46d3e2f0b..e1933a5bd 100644 | ||
89 | --- a/policy/modules/roles/sysadm.te | ||
90 | +++ b/policy/modules/roles/sysadm.te | ||
91 | @@ -92,6 +92,8 @@ ifdef(`init_systemd',` | ||
92 | # Allow sysadm to query and set networking settings on the system. | ||
93 | systemd_dbus_chat_networkd(sysadm_t) | ||
94 | fs_read_nsfs_files(sysadm_t) | ||
95 | + | ||
96 | + systemd_sysadm_user(sysadm_t) | ||
97 | ') | ||
98 | |||
99 | tunable_policy(`allow_ptrace',` | ||
100 | diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if | ||
101 | index 0171ee299..8ca29f654 100644 | ||
102 | --- a/policy/modules/system/init.if | ||
103 | +++ b/policy/modules/system/init.if | ||
104 | @@ -959,6 +959,7 @@ interface(`init_unix_stream_socket_connectto',` | ||
105 | ') | ||
106 | |||
107 | allow $1 init_t:unix_stream_socket connectto; | ||
108 | + allow $1 initrc_t:unix_stream_socket connectto; | ||
109 | ') | ||
110 | |||
111 | ######################################## | ||
112 | diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if | ||
113 | index 38adf050c..5c44d8d8a 100644 | ||
114 | --- a/policy/modules/system/systemd.if | ||
115 | +++ b/policy/modules/system/systemd.if | ||
116 | @@ -57,7 +57,7 @@ template(`systemd_role_template',` | ||
117 | allow $1_systemd_t self:process { getsched signal }; | ||
118 | allow $1_systemd_t self:netlink_kobject_uevent_socket create_socket_perms; | ||
119 | allow $1_systemd_t self:unix_stream_socket create_stream_socket_perms; | ||
120 | - allow $1_systemd_t $3:process { setsched rlimitinh signal_perms }; | ||
121 | + allow $1_systemd_t $3:process { setsched rlimitinh signal_perms noatsecure }; | ||
122 | corecmd_shell_domtrans($1_systemd_t, $3) | ||
123 | corecmd_bin_domtrans($1_systemd_t, $3) | ||
124 | |||
125 | @@ -88,8 +88,11 @@ template(`systemd_role_template',` | ||
126 | |||
127 | fs_manage_cgroup_files($1_systemd_t) | ||
128 | fs_watch_cgroup_files($1_systemd_t) | ||
129 | + files_watch_etc_dirs($1_systemd_t) | ||
130 | + fs_getattr_xattr_fs($1_systemd_t) | ||
131 | |||
132 | kernel_dontaudit_getattr_proc($1_systemd_t) | ||
133 | + kernel_read_network_state($1_systemd_t) | ||
134 | |||
135 | selinux_use_status_page($1_systemd_t) | ||
136 | |||
137 | @@ -1052,6 +1055,7 @@ interface(`systemd_stream_connect_userdb', ` | ||
138 | init_search_runtime($1) | ||
139 | allow $1 systemd_userdb_runtime_t:dir list_dir_perms; | ||
140 | allow $1 systemd_userdb_runtime_t:sock_file write_sock_file_perms; | ||
141 | + allow $1 systemd_userdb_runtime_t:lnk_file read_lnk_file_perms; | ||
142 | init_unix_stream_socket_connectto($1) | ||
143 | ') | ||
144 | |||
145 | @@ -2003,3 +2007,24 @@ interface(`systemd_use_inherited_machined_ptys', ` | ||
146 | allow $1 systemd_machined_t:fd use; | ||
147 | allow $1 systemd_machined_devpts_t:chr_file rw_inherited_term_perms; | ||
148 | ') | ||
149 | + | ||
150 | +######################################### | ||
151 | +## <summary> | ||
152 | +## sysadm user for systemd --user | ||
153 | +## </summary> | ||
154 | +## <param name="role"> | ||
155 | +## <summary> | ||
156 | +## Role allowed access. | ||
157 | +## </summary> | ||
158 | +## </param> | ||
159 | +# | ||
160 | +interface(`systemd_sysadm_user',` | ||
161 | + gen_require(` | ||
162 | + type sysadm_systemd_t; | ||
163 | + ') | ||
164 | + | ||
165 | + allow sysadm_systemd_t self:capability { mknod sys_admin }; | ||
166 | + allow sysadm_systemd_t self:capability2 { bpf perfmon }; | ||
167 | + allow sysadm_systemd_t self:process setrlimit; | ||
168 | + allow $1 sysadm_systemd_t:system reload; | ||
169 | +') | ||
170 | -- | ||
171 | 2.17.1 | ||
172 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0050-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch b/recipes-security/refpolicy/refpolicy/0043-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch index 8b9f98c..932047a 100644 --- a/recipes-security/refpolicy/refpolicy/0050-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch +++ b/recipes-security/refpolicy/refpolicy/0043-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c2e99e27acc1454d792b3e8d6f24d3a2a3be29e3 Mon Sep 17 00:00:00 2001 | 1 | From 057e4e6a6e2e87edcd6a93dd533620700b00b1c2 Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Fri, 13 Oct 2017 07:20:40 +0000 | 3 | Date: Fri, 13 Oct 2017 07:20:40 +0000 |
4 | Subject: [PATCH] policy/modules/kernel/kernel: make kernel_t MLS trusted for | 4 | Subject: [PATCH] policy/modules/kernel/kernel: make kernel_t MLS trusted for |
@@ -59,10 +59,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
59 | 1 file changed, 2 insertions(+) | 59 | 1 file changed, 2 insertions(+) |
60 | 60 | ||
61 | diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te | 61 | diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te |
62 | index a32c59eb1..1c53754ee 100644 | 62 | index a40db8507..40cd52825 100644 |
63 | --- a/policy/modules/kernel/kernel.te | 63 | --- a/policy/modules/kernel/kernel.te |
64 | +++ b/policy/modules/kernel/kernel.te | 64 | +++ b/policy/modules/kernel/kernel.te |
65 | @@ -358,6 +358,8 @@ mls_file_write_all_levels(kernel_t) | 65 | @@ -370,6 +370,8 @@ mls_file_write_all_levels(kernel_t) |
66 | mls_file_read_all_levels(kernel_t) | 66 | mls_file_read_all_levels(kernel_t) |
67 | mls_socket_write_all_levels(kernel_t) | 67 | mls_socket_write_all_levels(kernel_t) |
68 | mls_fd_use_all_levels(kernel_t) | 68 | mls_fd_use_all_levels(kernel_t) |
@@ -72,5 +72,5 @@ index a32c59eb1..1c53754ee 100644 | |||
72 | ifdef(`distro_redhat',` | 72 | ifdef(`distro_redhat',` |
73 | # Bugzilla 222337 | 73 | # Bugzilla 222337 |
74 | -- | 74 | -- |
75 | 2.17.1 | 75 | 2.25.1 |
76 | 76 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0043-policy-modules-system-sysnetwork-support-priviledge-.patch b/recipes-security/refpolicy/refpolicy/0043-policy-modules-system-sysnetwork-support-priviledge-.patch deleted file mode 100644 index 504e028..0000000 --- a/recipes-security/refpolicy/refpolicy/0043-policy-modules-system-sysnetwork-support-priviledge-.patch +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | From d1c159d4400722e783d12cc3684c1cf15004f7a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Thu, 24 Sep 2020 14:05:52 +0800 | ||
4 | Subject: [PATCH] policy/modules/system/sysnetwork: support priviledge | ||
5 | separation for dhcpcd | ||
6 | |||
7 | Fixes: | ||
8 | |||
9 | avc: denied { sys_chroot } for pid=332 comm="dhcpcd" capability=18 | ||
10 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
11 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tclass=capability | ||
12 | permissive=0 | ||
13 | |||
14 | avc: denied { setgid } for pid=332 comm="dhcpcd" capability=6 | ||
15 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
16 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tclass=capability | ||
17 | permissive=0 | ||
18 | |||
19 | avc: denied { setuid } for pid=332 comm="dhcpcd" capability=7 | ||
20 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
21 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tclass=capability | ||
22 | permissive=0 | ||
23 | |||
24 | avc: denied { setrlimit } for pid=332 comm="dhcpcd" | ||
25 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
26 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tclass=process | ||
27 | permissive=0 | ||
28 | |||
29 | avc: denied { create } for pid=330 comm="dhcpcd" | ||
30 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
31 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
32 | tclass=netlink_kobject_uevent_socket permissive=0 | ||
33 | |||
34 | avc: denied { setopt } for pid=330 comm="dhcpcd" | ||
35 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
36 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
37 | tclass=netlink_kobject_uevent_socket permissive=0 | ||
38 | |||
39 | avc: denied { bind } for pid=330 comm="dhcpcd" | ||
40 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
41 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
42 | tclass=netlink_kobject_uevent_socket permissive=0 | ||
43 | |||
44 | avc: denied { getattr } for pid=330 comm="dhcpcd" | ||
45 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
46 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
47 | tclass=netlink_kobject_uevent_socket permissive=0 | ||
48 | |||
49 | avc: denied { read } for pid=330 comm="dhcpcd" name="n1" dev="tmpfs" | ||
50 | ino=15616 scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
51 | tcontext=system_u:object_r:udev_runtime_t:s0 tclass=file permissive=0 | ||
52 | |||
53 | avc: denied { open } for pid=330 comm="dhcpcd" | ||
54 | path="/run/udev/data/n1" dev="tmpfs" ino=15616 | ||
55 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
56 | tcontext=system_u:object_r:udev_runtime_t:s0 tclass=file permissive=0 | ||
57 | |||
58 | avc: denied { getattr } for pid=330 comm="dhcpcd" | ||
59 | path="/run/udev/data/n1" dev="tmpfs" ino=15616 | ||
60 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
61 | tcontext=system_u:object_r:udev_runtime_t:s0 tclass=file permissive=0 | ||
62 | |||
63 | avc: denied { connectto } for pid=1600 comm="dhcpcd" | ||
64 | path="/run/dhcpcd/unpriv.sock" | ||
65 | scontext=root:sysadm_r:dhcpc_t:s0-s15:c0.c1023 | ||
66 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
67 | tclass=unix_stream_socket permissive=0 | ||
68 | |||
69 | avc: denied { kill } for pid=314 comm="dhcpcd" capability=5 | ||
70 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
71 | tcontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 tclass=capability | ||
72 | permissive=0 | ||
73 | |||
74 | avc: denied { getattr } for pid=300 comm="dhcpcd" | ||
75 | path="net:[4026532008]" dev="nsfs" ino=4026532008 | ||
76 | scontext=system_u:system_r:dhcpc_t:s0-s15:c0.c1023 | ||
77 | tcontext=system_u:object_r:nsfs_t:s0 tclass=file permissive=0 | ||
78 | |||
79 | Upstream-Status: Inappropriate [embedded specific] | ||
80 | |||
81 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
82 | --- | ||
83 | policy/modules/system/sysnetwork.te | 7 ++++++- | ||
84 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
85 | |||
86 | diff --git a/policy/modules/system/sysnetwork.te b/policy/modules/system/sysnetwork.te | ||
87 | index 4c317cc4c..05a9a52b8 100644 | ||
88 | --- a/policy/modules/system/sysnetwork.te | ||
89 | +++ b/policy/modules/system/sysnetwork.te | ||
90 | @@ -58,10 +58,11 @@ ifdef(`distro_debian',` | ||
91 | # DHCP client local policy | ||
92 | # | ||
93 | allow dhcpc_t self:capability { dac_override fsetid net_admin net_bind_service net_raw setpcap sys_nice sys_resource sys_tty_config }; | ||
94 | +allow dhcpc_t self:capability { setgid setuid sys_chroot kill }; | ||
95 | dontaudit dhcpc_t self:capability { sys_ptrace sys_tty_config }; | ||
96 | # for access("/etc/bashrc", X_OK) on Red Hat | ||
97 | dontaudit dhcpc_t self:capability { dac_read_search sys_module }; | ||
98 | -allow dhcpc_t self:process { getsched getcap setcap setfscreate ptrace signal_perms }; | ||
99 | +allow dhcpc_t self:process { getsched getcap setcap setfscreate ptrace signal_perms setrlimit }; | ||
100 | |||
101 | allow dhcpc_t self:fifo_file rw_fifo_file_perms; | ||
102 | allow dhcpc_t self:tcp_socket create_stream_socket_perms; | ||
103 | @@ -69,8 +70,10 @@ allow dhcpc_t self:udp_socket create_socket_perms; | ||
104 | allow dhcpc_t self:packet_socket create_socket_perms; | ||
105 | allow dhcpc_t self:netlink_generic_socket create_socket_perms; | ||
106 | allow dhcpc_t self:netlink_route_socket create_netlink_socket_perms; | ||
107 | +allow dhcpc_t self:netlink_kobject_uevent_socket create_socket_perms; | ||
108 | allow dhcpc_t self:rawip_socket create_socket_perms; | ||
109 | allow dhcpc_t self:unix_dgram_socket { create_socket_perms sendto }; | ||
110 | +allow dhcpc_t self:unix_stream_socket connectto; | ||
111 | |||
112 | allow dhcpc_t dhcp_etc_t:dir list_dir_perms; | ||
113 | read_lnk_files_pattern(dhcpc_t, dhcp_etc_t, dhcp_etc_t) | ||
114 | @@ -146,6 +149,7 @@ files_manage_var_files(dhcpc_t) | ||
115 | fs_getattr_all_fs(dhcpc_t) | ||
116 | fs_search_auto_mountpoints(dhcpc_t) | ||
117 | fs_search_cgroup_dirs(dhcpc_t) | ||
118 | +fs_read_nsfs_files(dhcpc_t) | ||
119 | |||
120 | term_dontaudit_use_all_ttys(dhcpc_t) | ||
121 | term_dontaudit_use_all_ptys(dhcpc_t) | ||
122 | @@ -181,6 +185,7 @@ ifdef(`init_systemd',` | ||
123 | init_stream_connect(dhcpc_t) | ||
124 | init_get_all_units_status(dhcpc_t) | ||
125 | init_search_units(dhcpc_t) | ||
126 | + udev_read_runtime_files(dhcpc_t) | ||
127 | ') | ||
128 | |||
129 | optional_policy(` | ||
130 | -- | ||
131 | 2.17.1 | ||
132 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0051-policy-modules-system-init-make-init_t-MLS-trusted-f.patch b/recipes-security/refpolicy/refpolicy/0044-policy-modules-system-init-make-init_t-MLS-trusted-f.patch index b4da47d..9e52b7f 100644 --- a/recipes-security/refpolicy/refpolicy/0051-policy-modules-system-init-make-init_t-MLS-trusted-f.patch +++ b/recipes-security/refpolicy/refpolicy/0044-policy-modules-system-init-make-init_t-MLS-trusted-f.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 7bcc117ea39532427df297299c10ca1d2948a70c Mon Sep 17 00:00:00 2001 | 1 | From c47e288e8950e7e92e3c90972ca7ef8ef9fc6a7f Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Fri, 15 Jan 2016 03:47:05 -0500 | 3 | Date: Fri, 15 Jan 2016 03:47:05 -0500 |
4 | Subject: [PATCH] policy/modules/system/init: make init_t MLS trusted for | 4 | Subject: [PATCH] policy/modules/system/init: make init_t MLS trusted for |
@@ -27,10 +27,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
27 | 1 file changed, 4 insertions(+) | 27 | 1 file changed, 4 insertions(+) |
28 | 28 | ||
29 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te | 29 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te |
30 | index 932d1f7b3..36becaa6e 100644 | 30 | index 97a75cf86..fee846cb5 100644 |
31 | --- a/policy/modules/system/init.te | 31 | --- a/policy/modules/system/init.te |
32 | +++ b/policy/modules/system/init.te | 32 | +++ b/policy/modules/system/init.te |
33 | @@ -219,6 +219,10 @@ mls_process_write_all_levels(init_t) | 33 | @@ -229,6 +229,10 @@ mls_process_write_all_levels(init_t) |
34 | mls_fd_use_all_levels(init_t) | 34 | mls_fd_use_all_levels(init_t) |
35 | mls_process_set_level(init_t) | 35 | mls_process_set_level(init_t) |
36 | 36 | ||
@@ -42,5 +42,5 @@ index 932d1f7b3..36becaa6e 100644 | |||
42 | # otherwise the call fails and sysvinit tries to load the policy | 42 | # otherwise the call fails and sysvinit tries to load the policy |
43 | # again when using the initramfs | 43 | # again when using the initramfs |
44 | -- | 44 | -- |
45 | 2.17.1 | 45 | 2.25.1 |
46 | 46 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0044-policy-modules-system-modutils-allow-kmod_t-to-write.patch b/recipes-security/refpolicy/refpolicy/0044-policy-modules-system-modutils-allow-kmod_t-to-write.patch deleted file mode 100644 index 2f94974..0000000 --- a/recipes-security/refpolicy/refpolicy/0044-policy-modules-system-modutils-allow-kmod_t-to-write.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 8343ff97a265836ba1e1e2f4159f888c21e5cabe Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Tue, 9 Feb 2021 17:31:55 +0800 | ||
4 | Subject: [PATCH] policy/modules/system/modutils: allow kmod_t to write keys | ||
5 | |||
6 | Fixes: | ||
7 | kernel: cfg80211: Problem loading in-kernel X.509 certificate (-13) | ||
8 | |||
9 | avc: denied { write } for pid=219 comm="modprobe" | ||
10 | scontext=system_u:system_r:kmod_t tcontext=system_u:system_r:kmod_t | ||
11 | tclass=key permissive=0 | ||
12 | |||
13 | Upstream-Status: Inappropriate [embedded specific] | ||
14 | |||
15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
16 | --- | ||
17 | policy/modules/system/modutils.te | 1 + | ||
18 | 1 file changed, 1 insertion(+) | ||
19 | |||
20 | diff --git a/policy/modules/system/modutils.te b/policy/modules/system/modutils.te | ||
21 | index 5b4f0aca1..008f286a8 100644 | ||
22 | --- a/policy/modules/system/modutils.te | ||
23 | +++ b/policy/modules/system/modutils.te | ||
24 | @@ -42,6 +42,7 @@ allow kmod_t self:udp_socket create_socket_perms; | ||
25 | allow kmod_t self:rawip_socket create_socket_perms; | ||
26 | |||
27 | allow kmod_t self:lockdown confidentiality; | ||
28 | +allow kmod_t self:key write; | ||
29 | |||
30 | # Read module config and dependency information | ||
31 | list_dirs_pattern(kmod_t, modules_conf_t, modules_conf_t) | ||
32 | -- | ||
33 | 2.17.1 | ||
34 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0052-policy-modules-system-systemd-make-systemd-tmpfiles_.patch b/recipes-security/refpolicy/refpolicy/0045-policy-modules-system-systemd-make-systemd-tmpfiles_.patch index 4b768e0..1bfbb16 100644 --- a/recipes-security/refpolicy/refpolicy/0052-policy-modules-system-systemd-make-systemd-tmpfiles_.patch +++ b/recipes-security/refpolicy/refpolicy/0045-policy-modules-system-systemd-make-systemd-tmpfiles_.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d965e6a02854a07c4783cf33e95bf3c7cf9f56f1 Mon Sep 17 00:00:00 2001 | 1 | From afd35f6c73551c674e5bfe7cc1832b6a0ea717a6 Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Thu, 4 Feb 2016 06:03:19 -0500 | 3 | Date: Thu, 4 Feb 2016 06:03:19 -0500 |
4 | Subject: [PATCH] policy/modules/system/systemd: make systemd-tmpfiles_t domain | 4 | Subject: [PATCH] policy/modules/system/systemd: make systemd-tmpfiles_t domain |
@@ -43,10 +43,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
43 | 1 file changed, 5 insertions(+) | 43 | 1 file changed, 5 insertions(+) |
44 | 44 | ||
45 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | 45 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te |
46 | index 1a83148c1..736107fad 100644 | 46 | index 4a1e06640..b44b9b2d7 100644 |
47 | --- a/policy/modules/system/systemd.te | 47 | --- a/policy/modules/system/systemd.te |
48 | +++ b/policy/modules/system/systemd.te | 48 | +++ b/policy/modules/system/systemd.te |
49 | @@ -1483,6 +1483,11 @@ sysnet_relabel_config(systemd_tmpfiles_t) | 49 | @@ -1694,6 +1694,11 @@ sysnet_relabel_config(systemd_tmpfiles_t) |
50 | 50 | ||
51 | systemd_log_parse_environment(systemd_tmpfiles_t) | 51 | systemd_log_parse_environment(systemd_tmpfiles_t) |
52 | 52 | ||
@@ -59,5 +59,5 @@ index 1a83148c1..736107fad 100644 | |||
59 | userdom_relabel_user_runtime_root_dirs(systemd_tmpfiles_t) | 59 | userdom_relabel_user_runtime_root_dirs(systemd_tmpfiles_t) |
60 | 60 | ||
61 | -- | 61 | -- |
62 | 2.17.1 | 62 | 2.25.1 |
63 | 63 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0053-policy-modules-system-systemd-systemd-make-systemd_-.patch b/recipes-security/refpolicy/refpolicy/0046-policy-modules-system-systemd-systemd-make-systemd_-.patch index 60f7dae..800439c 100644 --- a/recipes-security/refpolicy/refpolicy/0053-policy-modules-system-systemd-systemd-make-systemd_-.patch +++ b/recipes-security/refpolicy/refpolicy/0046-policy-modules-system-systemd-systemd-make-systemd_-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 71986d0c6775408a1c89415dd5d4e7ea03302248 Mon Sep 17 00:00:00 2001 | 1 | From 8aa70c13d63e093bff87ea938d35dcc76e5bdd56 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Thu, 18 Jun 2020 09:59:58 +0800 | 3 | Date: Thu, 18 Jun 2020 09:59:58 +0800 |
4 | Subject: [PATCH] policy/modules/system/systemd: systemd-*: make systemd_*_t | 4 | Subject: [PATCH] policy/modules/system/systemd: systemd-*: make systemd_*_t |
@@ -43,12 +43,12 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
43 | 1 file changed, 12 insertions(+) | 43 | 1 file changed, 12 insertions(+) |
44 | 44 | ||
45 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | 45 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te |
46 | index 736107fad..8cea6baa1 100644 | 46 | index b44b9b2d7..7b717d3ba 100644 |
47 | --- a/policy/modules/system/systemd.te | 47 | --- a/policy/modules/system/systemd.te |
48 | +++ b/policy/modules/system/systemd.te | 48 | +++ b/policy/modules/system/systemd.te |
49 | @@ -341,6 +341,9 @@ fs_getattr_tmpfs(systemd_backlight_t) | 49 | @@ -373,6 +373,9 @@ files_search_var_lib(systemd_backlight_t) |
50 | fs_getattr_all_fs(systemd_backlight_t) | ||
50 | fs_search_cgroup_dirs(systemd_backlight_t) | 51 | fs_search_cgroup_dirs(systemd_backlight_t) |
51 | fs_getattr_cgroup(systemd_backlight_t) | ||
52 | 52 | ||
53 | +mls_file_read_to_clearance(systemd_backlight_t) | 53 | +mls_file_read_to_clearance(systemd_backlight_t) |
54 | +mls_file_write_to_clearance(systemd_backlight_t) | 54 | +mls_file_write_to_clearance(systemd_backlight_t) |
@@ -56,9 +56,9 @@ index 736107fad..8cea6baa1 100644 | |||
56 | ####################################### | 56 | ####################################### |
57 | # | 57 | # |
58 | # Binfmt local policy | 58 | # Binfmt local policy |
59 | @@ -479,6 +482,9 @@ term_use_unallocated_ttys(systemd_generator_t) | 59 | @@ -528,6 +531,9 @@ term_use_unallocated_ttys(systemd_generator_t) |
60 | 60 | ||
61 | udev_search_runtime(systemd_generator_t) | 61 | udev_read_runtime_files(systemd_generator_t) |
62 | 62 | ||
63 | +mls_file_read_to_clearance(systemd_generator_t) | 63 | +mls_file_read_to_clearance(systemd_generator_t) |
64 | +mls_file_write_to_clearance(systemd_generator_t) | 64 | +mls_file_write_to_clearance(systemd_generator_t) |
@@ -66,19 +66,19 @@ index 736107fad..8cea6baa1 100644 | |||
66 | ifdef(`distro_gentoo',` | 66 | ifdef(`distro_gentoo',` |
67 | corecmd_shell_entry_type(systemd_generator_t) | 67 | corecmd_shell_entry_type(systemd_generator_t) |
68 | ') | 68 | ') |
69 | @@ -723,6 +729,9 @@ userdom_setattr_user_ttys(systemd_logind_t) | 69 | @@ -922,6 +928,9 @@ userdom_setattr_user_ttys(systemd_logind_t) |
70 | userdom_use_user_ttys(systemd_logind_t) | 70 | userdom_use_user_ttys(systemd_logind_t) |
71 | domain_read_all_domains_state(systemd_logind_t) | 71 | domain_read_all_domains_state(systemd_logind_t) |
72 | 72 | ||
73 | +mls_file_read_to_clearance(systemd_logind_t) | 73 | +mls_file_read_all_levels(systemd_logind_t) |
74 | +mls_file_write_to_clearance(systemd_logind_t) | 74 | +mls_file_write_all_levels(systemd_logind_t) |
75 | + | 75 | + |
76 | # Needed to work around patch not yet merged into the systemd-logind supported on RHEL 7.x | 76 | # Needed to work around patch not yet merged into the systemd-logind supported on RHEL 7.x |
77 | # The change in systemd by Nicolas Iooss on 02-Feb-2016 with hash 4b51966cf6c06250036e428608da92f8640beb96 | 77 | # The change in systemd by Nicolas Iooss on 02-Feb-2016 with hash 4b51966cf6c06250036e428608da92f8640beb96 |
78 | # should fix the problem where user directories in /run/user/$UID/ are not getting the proper context | 78 | # should fix the problem where user directories in /run/user/$UID/ are not getting the proper context |
79 | @@ -1204,6 +1213,9 @@ fs_getattr_tmpfs(systemd_rfkill_t) | 79 | @@ -1412,6 +1421,9 @@ udev_read_runtime_files(systemd_rfkill_t) |
80 | fs_search_cgroup_dirs(systemd_rfkill_t) | 80 | |
81 | fs_getattr_cgroup(systemd_rfkill_t) | 81 | systemd_log_parse_environment(systemd_rfkill_t) |
82 | 82 | ||
83 | +mls_file_read_to_clearance(systemd_rfkill_t) | 83 | +mls_file_read_to_clearance(systemd_rfkill_t) |
84 | +mls_file_write_to_clearance(systemd_rfkill_t) | 84 | +mls_file_write_to_clearance(systemd_rfkill_t) |
@@ -87,5 +87,5 @@ index 736107fad..8cea6baa1 100644 | |||
87 | # | 87 | # |
88 | # Resolved local policy | 88 | # Resolved local policy |
89 | -- | 89 | -- |
90 | 2.17.1 | 90 | 2.25.1 |
91 | 91 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0054-policy-modules-system-logging-add-the-syslogd_t-to-t.patch b/recipes-security/refpolicy/refpolicy/0047-policy-modules-system-logging-add-the-syslogd_t-to-t.patch index 75be11d..cb3894c 100644 --- a/recipes-security/refpolicy/refpolicy/0054-policy-modules-system-logging-add-the-syslogd_t-to-t.patch +++ b/recipes-security/refpolicy/refpolicy/0047-policy-modules-system-logging-add-the-syslogd_t-to-t.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 511f7fdad45a150f7ea3666eb51463573eabab0a Mon Sep 17 00:00:00 2001 | 1 | From 2afa5753f2ef8c7cee5ad0511c521d252bedf3e5 Mon Sep 17 00:00:00 2001 |
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | 2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> |
3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 | 3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 |
4 | Subject: [PATCH] policy/modules/system/logging: add the syslogd_t to trusted | 4 | Subject: [PATCH] policy/modules/system/logging: add the syslogd_t to trusted |
@@ -14,18 +14,17 @@ Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | |||
14 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> | 14 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> |
15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 15 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
16 | --- | 16 | --- |
17 | policy/modules/system/logging.te | 4 ++++ | 17 | policy/modules/system/logging.te | 3 +++ |
18 | 1 file changed, 4 insertions(+) | 18 | 1 file changed, 3 insertions(+) |
19 | 19 | ||
20 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te | 20 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te |
21 | index 5b4b5ec5d..e67c25a9e 100644 | 21 | index d3b06db7d..f63965d4d 100644 |
22 | --- a/policy/modules/system/logging.te | 22 | --- a/policy/modules/system/logging.te |
23 | +++ b/policy/modules/system/logging.te | 23 | +++ b/policy/modules/system/logging.te |
24 | @@ -498,6 +498,10 @@ fs_search_auto_mountpoints(syslogd_t) | 24 | @@ -505,6 +505,9 @@ fs_getattr_all_fs(syslogd_t) |
25 | fs_search_tmpfs(syslogd_t) | 25 | fs_search_auto_mountpoints(syslogd_t) |
26 | 26 | ||
27 | mls_file_write_all_levels(syslogd_t) # Need to be able to write to /var/run/ and /var/log directories | 27 | mls_file_write_all_levels(syslogd_t) # Need to be able to write to /var/run/ and /var/log directories |
28 | +mls_file_read_all_levels(syslogd_t) | ||
29 | +mls_socket_write_all_levels(syslogd_t) # Need to be able to sendto dgram | 28 | +mls_socket_write_all_levels(syslogd_t) # Need to be able to sendto dgram |
30 | +mls_trusted_object(syslogd_t) # Other process need to have the right to connectto/sendto /dev/log | 29 | +mls_trusted_object(syslogd_t) # Other process need to have the right to connectto/sendto /dev/log |
31 | +mls_fd_use_all_levels(syslogd_t) | 30 | +mls_fd_use_all_levels(syslogd_t) |
@@ -33,5 +32,5 @@ index 5b4b5ec5d..e67c25a9e 100644 | |||
33 | term_write_console(syslogd_t) | 32 | term_write_console(syslogd_t) |
34 | # Allow syslog to a terminal | 33 | # Allow syslog to a terminal |
35 | -- | 34 | -- |
36 | 2.17.1 | 35 | 2.25.1 |
37 | 36 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0055-policy-modules-system-init-make-init_t-MLS-trusted-f.patch b/recipes-security/refpolicy/refpolicy/0048-policy-modules-system-init-make-init_t-MLS-trusted-f.patch index 5c01ef4..16f0e4e 100644 --- a/recipes-security/refpolicy/refpolicy/0055-policy-modules-system-init-make-init_t-MLS-trusted-f.patch +++ b/recipes-security/refpolicy/refpolicy/0048-policy-modules-system-init-make-init_t-MLS-trusted-f.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 3f875fae6d9a4538b3e7d33f30dd2a98fc9ea2bd Mon Sep 17 00:00:00 2001 | 1 | From f87bb3cb0843af69f9aecaef0a4052e04b15a630 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Tue, 28 May 2019 16:41:37 +0800 | 3 | Date: Tue, 28 May 2019 16:41:37 +0800 |
4 | Subject: [PATCH] policy/modules/system/init: make init_t MLS trusted for | 4 | Subject: [PATCH] policy/modules/system/init: make init_t MLS trusted for |
@@ -17,10 +17,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
17 | 1 file changed, 1 insertion(+) | 17 | 1 file changed, 1 insertion(+) |
18 | 18 | ||
19 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te | 19 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te |
20 | index 36becaa6e..9c0a98eb7 100644 | 20 | index fee846cb5..df7f87f17 100644 |
21 | --- a/policy/modules/system/init.te | 21 | --- a/policy/modules/system/init.te |
22 | +++ b/policy/modules/system/init.te | 22 | +++ b/policy/modules/system/init.te |
23 | @@ -218,6 +218,7 @@ mls_file_write_all_levels(init_t) | 23 | @@ -228,6 +228,7 @@ mls_file_write_all_levels(init_t) |
24 | mls_process_write_all_levels(init_t) | 24 | mls_process_write_all_levels(init_t) |
25 | mls_fd_use_all_levels(init_t) | 25 | mls_fd_use_all_levels(init_t) |
26 | mls_process_set_level(init_t) | 26 | mls_process_set_level(init_t) |
@@ -29,5 +29,5 @@ index 36becaa6e..9c0a98eb7 100644 | |||
29 | # MLS trusted for lowering/raising the level of files | 29 | # MLS trusted for lowering/raising the level of files |
30 | mls_file_downgrade(init_t) | 30 | mls_file_downgrade(init_t) |
31 | -- | 31 | -- |
32 | 2.17.1 | 32 | 2.25.1 |
33 | 33 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0056-policy-modules-system-init-all-init_t-to-read-any-le.patch b/recipes-security/refpolicy/refpolicy/0049-policy-modules-system-init-all-init_t-to-read-any-le.patch index d3ddcd2..fb56eca 100644 --- a/recipes-security/refpolicy/refpolicy/0056-policy-modules-system-init-all-init_t-to-read-any-le.patch +++ b/recipes-security/refpolicy/refpolicy/0049-policy-modules-system-init-all-init_t-to-read-any-le.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a59dae035b7d5063e0f25c4cf40b5b180ad69022 Mon Sep 17 00:00:00 2001 | 1 | From f3c0f18b647631fd2ffc1e86c9e3f51cbf74d60f Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Wed, 3 Feb 2016 04:16:06 -0500 | 3 | Date: Wed, 3 Feb 2016 04:16:06 -0500 |
4 | Subject: [PATCH] policy/modules/system/init: all init_t to read any level | 4 | Subject: [PATCH] policy/modules/system/init: all init_t to read any level |
@@ -22,10 +22,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
22 | 1 file changed, 3 insertions(+) | 22 | 1 file changed, 3 insertions(+) |
23 | 23 | ||
24 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te | 24 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te |
25 | index 9c0a98eb7..5a19f0e43 100644 | 25 | index df7f87f17..671b5aef3 100644 |
26 | --- a/policy/modules/system/init.te | 26 | --- a/policy/modules/system/init.te |
27 | +++ b/policy/modules/system/init.te | 27 | +++ b/policy/modules/system/init.te |
28 | @@ -224,6 +224,9 @@ mls_key_write_all_levels(init_t) | 28 | @@ -234,6 +234,9 @@ mls_key_write_all_levels(init_t) |
29 | mls_file_downgrade(init_t) | 29 | mls_file_downgrade(init_t) |
30 | mls_file_upgrade(init_t) | 30 | mls_file_upgrade(init_t) |
31 | 31 | ||
@@ -36,5 +36,5 @@ index 9c0a98eb7..5a19f0e43 100644 | |||
36 | # otherwise the call fails and sysvinit tries to load the policy | 36 | # otherwise the call fails and sysvinit tries to load the policy |
37 | # again when using the initramfs | 37 | # again when using the initramfs |
38 | -- | 38 | -- |
39 | 2.17.1 | 39 | 2.25.1 |
40 | 40 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0057-policy-modules-system-logging-allow-auditd_t-to-writ.patch b/recipes-security/refpolicy/refpolicy/0050-policy-modules-system-logging-allow-auditd_t-to-writ.patch index 47328be..aa02eb1 100644 --- a/recipes-security/refpolicy/refpolicy/0057-policy-modules-system-logging-allow-auditd_t-to-writ.patch +++ b/recipes-security/refpolicy/refpolicy/0050-policy-modules-system-logging-allow-auditd_t-to-writ.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 96437ba860d352304246fbe3381030da0665f239 Mon Sep 17 00:00:00 2001 | 1 | From cb7a4ff6081f19d05b109512275ec9a537f2f6d2 Mon Sep 17 00:00:00 2001 |
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
3 | Date: Thu, 25 Feb 2016 04:25:08 -0500 | 3 | Date: Thu, 25 Feb 2016 04:25:08 -0500 |
4 | Subject: [PATCH] policy/modules/system/logging: allow auditd_t to write socket | 4 | Subject: [PATCH] policy/modules/system/logging: allow auditd_t to write socket |
@@ -22,10 +22,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
22 | 1 file changed, 2 insertions(+) | 22 | 1 file changed, 2 insertions(+) |
23 | 23 | ||
24 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te | 24 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te |
25 | index e67c25a9e..f8d8b73f0 100644 | 25 | index f63965d4d..7e41596f4 100644 |
26 | --- a/policy/modules/system/logging.te | 26 | --- a/policy/modules/system/logging.te |
27 | +++ b/policy/modules/system/logging.te | 27 | +++ b/policy/modules/system/logging.te |
28 | @@ -215,6 +215,8 @@ miscfiles_read_localization(auditd_t) | 28 | @@ -223,6 +223,8 @@ miscfiles_read_localization(auditd_t) |
29 | 29 | ||
30 | mls_file_read_all_levels(auditd_t) | 30 | mls_file_read_all_levels(auditd_t) |
31 | mls_file_write_all_levels(auditd_t) # Need to be able to write to /var/run/ directory | 31 | mls_file_write_all_levels(auditd_t) # Need to be able to write to /var/run/ directory |
@@ -35,5 +35,5 @@ index e67c25a9e..f8d8b73f0 100644 | |||
35 | seutil_dontaudit_read_config(auditd_t) | 35 | seutil_dontaudit_read_config(auditd_t) |
36 | 36 | ||
37 | -- | 37 | -- |
38 | 2.17.1 | 38 | 2.25.1 |
39 | 39 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0058-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch b/recipes-security/refpolicy/refpolicy/0051-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch index ad92c7f..16bdf84 100644 --- a/recipes-security/refpolicy/refpolicy/0058-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch +++ b/recipes-security/refpolicy/refpolicy/0051-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 102255e89863c5a31d0d6c8df67b258d819b9a68 Mon Sep 17 00:00:00 2001 | 1 | From 023e7b92a805103c54aec06bbd9465e4fbf7a6f2 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Thu, 31 Oct 2019 17:35:59 +0800 | 3 | Date: Thu, 31 Oct 2019 17:35:59 +0800 |
4 | Subject: [PATCH] policy/modules/kernel/kernel: make kernel_t MLS trusted for | 4 | Subject: [PATCH] policy/modules/kernel/kernel: make kernel_t MLS trusted for |
@@ -15,10 +15,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
15 | 1 file changed, 1 insertion(+) | 15 | 1 file changed, 1 insertion(+) |
16 | 16 | ||
17 | diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te | 17 | diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te |
18 | index 1c53754ee..2031576e0 100644 | 18 | index 40cd52825..d08610543 100644 |
19 | --- a/policy/modules/kernel/kernel.te | 19 | --- a/policy/modules/kernel/kernel.te |
20 | +++ b/policy/modules/kernel/kernel.te | 20 | +++ b/policy/modules/kernel/kernel.te |
21 | @@ -360,6 +360,7 @@ mls_socket_write_all_levels(kernel_t) | 21 | @@ -372,6 +372,7 @@ mls_socket_write_all_levels(kernel_t) |
22 | mls_fd_use_all_levels(kernel_t) | 22 | mls_fd_use_all_levels(kernel_t) |
23 | # https://bugzilla.redhat.com/show_bug.cgi?id=667370 | 23 | # https://bugzilla.redhat.com/show_bug.cgi?id=667370 |
24 | mls_file_downgrade(kernel_t) | 24 | mls_file_downgrade(kernel_t) |
@@ -27,5 +27,5 @@ index 1c53754ee..2031576e0 100644 | |||
27 | ifdef(`distro_redhat',` | 27 | ifdef(`distro_redhat',` |
28 | # Bugzilla 222337 | 28 | # Bugzilla 222337 |
29 | -- | 29 | -- |
30 | 2.17.1 | 30 | 2.25.1 |
31 | 31 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0059-policy-modules-system-setrans-allow-setrans_t-use-fd.patch b/recipes-security/refpolicy/refpolicy/0052-policy-modules-system-setrans-allow-setrans_t-use-fd.patch index 96d0588..b916084 100644 --- a/recipes-security/refpolicy/refpolicy/0059-policy-modules-system-setrans-allow-setrans_t-use-fd.patch +++ b/recipes-security/refpolicy/refpolicy/0052-policy-modules-system-setrans-allow-setrans_t-use-fd.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5fa9e03a3b90f97e573a7724cd9d49b53730d083 Mon Sep 17 00:00:00 2001 | 1 | From 55fe90eba640e6d52bb269176f45a3a5e2c3ed80 Mon Sep 17 00:00:00 2001 |
2 | From: Roy Li <rongqing.li@windriver.com> | 2 | From: Roy Li <rongqing.li@windriver.com> |
3 | Date: Sat, 22 Feb 2014 13:35:38 +0800 | 3 | Date: Sat, 22 Feb 2014 13:35:38 +0800 |
4 | Subject: [PATCH] policy/modules/system/setrans: allow setrans_t use fd at any | 4 | Subject: [PATCH] policy/modules/system/setrans: allow setrans_t use fd at any |
@@ -13,10 +13,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
13 | 1 file changed, 2 insertions(+) | 13 | 1 file changed, 2 insertions(+) |
14 | 14 | ||
15 | diff --git a/policy/modules/system/setrans.te b/policy/modules/system/setrans.te | 15 | diff --git a/policy/modules/system/setrans.te b/policy/modules/system/setrans.te |
16 | index 25aadfc5f..564e2d4d1 100644 | 16 | index 12e66aad9..5510f7fac 100644 |
17 | --- a/policy/modules/system/setrans.te | 17 | --- a/policy/modules/system/setrans.te |
18 | +++ b/policy/modules/system/setrans.te | 18 | +++ b/policy/modules/system/setrans.te |
19 | @@ -73,6 +73,8 @@ mls_net_receive_all_levels(setrans_t) | 19 | @@ -69,6 +69,8 @@ mls_net_receive_all_levels(setrans_t) |
20 | mls_socket_write_all_levels(setrans_t) | 20 | mls_socket_write_all_levels(setrans_t) |
21 | mls_process_read_all_levels(setrans_t) | 21 | mls_process_read_all_levels(setrans_t) |
22 | mls_socket_read_all_levels(setrans_t) | 22 | mls_socket_read_all_levels(setrans_t) |
@@ -26,5 +26,5 @@ index 25aadfc5f..564e2d4d1 100644 | |||
26 | selinux_compute_access_vector(setrans_t) | 26 | selinux_compute_access_vector(setrans_t) |
27 | 27 | ||
28 | -- | 28 | -- |
29 | 2.17.1 | 29 | 2.25.1 |
30 | 30 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0060-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch b/recipes-security/refpolicy/refpolicy/0053-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch index 8bfe607..c4dc87b 100644 --- a/recipes-security/refpolicy/refpolicy/0060-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch +++ b/recipes-security/refpolicy/refpolicy/0053-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From fe70aaf9a104b4b0c3439d2767eccb0136951f08 Mon Sep 17 00:00:00 2001 | 1 | From c9afe0dc30f51f7ad7b93b8878c88df1146272a0 Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Mon, 22 Feb 2021 11:28:12 +0800 | 3 | Date: Mon, 22 Feb 2021 11:28:12 +0800 |
4 | Subject: [PATCH] policy/modules/system/systemd: make *_systemd_t MLS trusted | 4 | Subject: [PATCH] policy/modules/system/systemd: make *_systemd_t MLS trusted |
@@ -24,10 +24,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
24 | 1 file changed, 3 insertions(+) | 24 | 1 file changed, 3 insertions(+) |
25 | 25 | ||
26 | diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if | 26 | diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if |
27 | index 5c44d8d8a..5f2038f22 100644 | 27 | index 325ca548b..b23b9bb0a 100644 |
28 | --- a/policy/modules/system/systemd.if | 28 | --- a/policy/modules/system/systemd.if |
29 | +++ b/policy/modules/system/systemd.if | 29 | +++ b/policy/modules/system/systemd.if |
30 | @@ -171,6 +171,9 @@ template(`systemd_role_template',` | 30 | @@ -196,6 +196,9 @@ template(`systemd_role_template',` |
31 | xdg_read_config_files($1_systemd_t) | 31 | xdg_read_config_files($1_systemd_t) |
32 | xdg_read_data_files($1_systemd_t) | 32 | xdg_read_data_files($1_systemd_t) |
33 | ') | 33 | ') |
@@ -38,5 +38,5 @@ index 5c44d8d8a..5f2038f22 100644 | |||
38 | 38 | ||
39 | ###################################### | 39 | ###################################### |
40 | -- | 40 | -- |
41 | 2.17.1 | 41 | 2.25.1 |
42 | 42 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0061-policy-modules-system-logging-make-syslogd_runtime_t.patch b/recipes-security/refpolicy/refpolicy/0054-policy-modules-system-logging-make-syslogd_runtime_t.patch index 7bdc9d6..ab87039 100644 --- a/recipes-security/refpolicy/refpolicy/0061-policy-modules-system-logging-make-syslogd_runtime_t.patch +++ b/recipes-security/refpolicy/refpolicy/0054-policy-modules-system-logging-make-syslogd_runtime_t.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From f8a12b28b70689ab520e7ae94d306afe9dcbb556 Mon Sep 17 00:00:00 2001 | 1 | From 7a65c9f3636b43f3a29349ea1c045d5281efa5aa Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: Yi Zhao <yi.zhao@windriver.com> |
3 | Date: Sat, 18 Dec 2021 17:31:45 +0800 | 3 | Date: Sat, 18 Dec 2021 17:31:45 +0800 |
4 | Subject: [PATCH] policy/modules/system/logging: make syslogd_runtime_t MLS | 4 | Subject: [PATCH] policy/modules/system/logging: make syslogd_runtime_t MLS |
@@ -23,7 +23,7 @@ dev="tmpfs" ino=9854 scontext=system_u:system_r:rpcd_t:s0-s15:c0.c1023 | |||
23 | tcontext=system_u:object_r:syslogd_var_run_t:s15:c0.c1023 tclass=dir | 23 | tcontext=system_u:object_r:syslogd_var_run_t:s15:c0.c1023 tclass=dir |
24 | permissive=0 | 24 | permissive=0 |
25 | 25 | ||
26 | Upstream-Status: Pending | 26 | Upstream-Status: Inappropriate [embedded specific] |
27 | 27 | ||
28 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 28 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
29 | --- | 29 | --- |
@@ -31,18 +31,18 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | |||
31 | 1 file changed, 2 insertions(+) | 31 | 1 file changed, 2 insertions(+) |
32 | 32 | ||
33 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te | 33 | diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te |
34 | index f8d8b73f0..badf56f16 100644 | 34 | index 7e41596f4..0c25457d6 100644 |
35 | --- a/policy/modules/system/logging.te | 35 | --- a/policy/modules/system/logging.te |
36 | +++ b/policy/modules/system/logging.te | 36 | +++ b/policy/modules/system/logging.te |
37 | @@ -438,6 +438,8 @@ allow syslogd_t syslogd_runtime_t:file map; | 37 | @@ -447,6 +447,8 @@ allow syslogd_t syslogd_runtime_t:file map; |
38 | manage_files_pattern(syslogd_t, syslogd_runtime_t, syslogd_runtime_t) | 38 | manage_files_pattern(syslogd_t, syslogd_runtime_t, syslogd_runtime_t) |
39 | files_runtime_filetrans(syslogd_t, syslogd_runtime_t, file) | 39 | files_runtime_filetrans(syslogd_t, syslogd_runtime_t, file) |
40 | 40 | ||
41 | +mls_trusted_object(syslogd_runtime_t) | 41 | +mls_trusted_object(syslogd_runtime_t) |
42 | + | 42 | + |
43 | kernel_read_crypto_sysctls(syslogd_t) | ||
44 | kernel_read_system_state(syslogd_t) | 43 | kernel_read_system_state(syslogd_t) |
45 | kernel_read_network_state(syslogd_t) | 44 | kernel_read_network_state(syslogd_t) |
45 | kernel_read_kernel_sysctls(syslogd_t) | ||
46 | -- | 46 | -- |
47 | 2.17.1 | 47 | 2.25.1 |
48 | 48 | ||
diff --git a/recipes-security/refpolicy/refpolicy/0062-systemd-systemd-resolved-is-linked-to-libselinux.patch b/recipes-security/refpolicy/refpolicy/0062-systemd-systemd-resolved-is-linked-to-libselinux.patch deleted file mode 100644 index e0db7d3..0000000 --- a/recipes-security/refpolicy/refpolicy/0062-systemd-systemd-resolved-is-linked-to-libselinux.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 52a4222397f5d3b28ca15a45bb2ace209a4afc3e Mon Sep 17 00:00:00 2001 | ||
2 | From: Kenton Groombridge <me@concord.sh> | ||
3 | Date: Thu, 31 Mar 2022 13:09:10 -0400 | ||
4 | Subject: [PATCH] systemd: systemd-resolved is linked to libselinux | ||
5 | |||
6 | systemd-resolved as of systemd 250 fails to start with this error: | ||
7 | |||
8 | Failed to initialize SELinux labeling handle: No such file or directory | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | [https://github.com/SELinuxProject/refpolicy/commit/3a22db2410de479e5baa88f3f668a7a4ac198950] | ||
12 | |||
13 | Signed-off-by: Kenton Groombridge <me@concord.sh> | ||
14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
15 | --- | ||
16 | policy/modules/system/systemd.te | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | ||
20 | index 8cea6baa1..beb301cc6 100644 | ||
21 | --- a/policy/modules/system/systemd.te | ||
22 | +++ b/policy/modules/system/systemd.te | ||
23 | @@ -1261,6 +1261,7 @@ fs_getattr_cgroup(systemd_resolved_t) | ||
24 | |||
25 | init_dgram_send(systemd_resolved_t) | ||
26 | |||
27 | +seutil_libselinux_linked(systemd_resolved_t) | ||
28 | seutil_read_file_contexts(systemd_resolved_t) | ||
29 | |||
30 | systemd_log_parse_environment(systemd_resolved_t) | ||
31 | -- | ||
32 | 2.25.1 | ||
33 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0063-sysnetwork-systemd-allow-DNS-resolution-over-io.syst.patch b/recipes-security/refpolicy/refpolicy/0063-sysnetwork-systemd-allow-DNS-resolution-over-io.syst.patch deleted file mode 100644 index 63da7cd..0000000 --- a/recipes-security/refpolicy/refpolicy/0063-sysnetwork-systemd-allow-DNS-resolution-over-io.syst.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 1ba0911e157c64ea15636c5707f38f1bdc9a46c8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kenton Groombridge <me@concord.sh> | ||
3 | Date: Wed, 27 Apr 2022 01:09:52 -0400 | ||
4 | Subject: [PATCH] sysnetwork, systemd: allow DNS resolution over | ||
5 | io.systemd.Resolve | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | [https://github.com/SELinuxProject/refpolicy/commit/1a0acc9c0d8c7c49ad4ca2cabd44bc66450f45e0] | ||
9 | |||
10 | Signed-off-by: Kenton Groombridge <me@concord.sh> | ||
11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
12 | --- | ||
13 | policy/modules/system/sysnetwork.if | 1 + | ||
14 | policy/modules/system/systemd.if | 21 +++++++++++++++++++++ | ||
15 | 2 files changed, 22 insertions(+) | ||
16 | |||
17 | diff --git a/policy/modules/system/sysnetwork.if b/policy/modules/system/sysnetwork.if | ||
18 | index 8664a67c8..140d48508 100644 | ||
19 | --- a/policy/modules/system/sysnetwork.if | ||
20 | +++ b/policy/modules/system/sysnetwork.if | ||
21 | @@ -844,6 +844,7 @@ interface(`sysnet_dns_name_resolve',` | ||
22 | ifdef(`init_systemd',` | ||
23 | optional_policy(` | ||
24 | systemd_dbus_chat_resolved($1) | ||
25 | + systemd_stream_connect_resolved($1) | ||
26 | ') | ||
27 | # This seems needed when the mymachines NSS module is used | ||
28 | optional_policy(` | ||
29 | diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if | ||
30 | index 5f2038f22..9143fb4c0 100644 | ||
31 | --- a/policy/modules/system/systemd.if | ||
32 | +++ b/policy/modules/system/systemd.if | ||
33 | @@ -1835,6 +1835,27 @@ interface(`systemd_tmpfilesd_managed',` | ||
34 | ') | ||
35 | ') | ||
36 | |||
37 | +####################################### | ||
38 | +## <summary> | ||
39 | +## Connect to systemd resolved over | ||
40 | +## /run/systemd/resolve/io.systemd.Resolve . | ||
41 | +## </summary> | ||
42 | +## <param name="domain"> | ||
43 | +## <summary> | ||
44 | +## Domain allowed access. | ||
45 | +## </summary> | ||
46 | +## </param> | ||
47 | +# | ||
48 | +interface(`systemd_stream_connect_resolved',` | ||
49 | + gen_require(` | ||
50 | + type systemd_resolved_t; | ||
51 | + type systemd_resolved_runtime_t; | ||
52 | + ') | ||
53 | + | ||
54 | + files_search_runtime($1) | ||
55 | + stream_connect_pattern($1, systemd_resolved_runtime_t, systemd_resolved_runtime_t, systemd_resolved_t) | ||
56 | +') | ||
57 | + | ||
58 | ######################################## | ||
59 | ## <summary> | ||
60 | ## Send and receive messages from | ||
61 | -- | ||
62 | 2.25.1 | ||
63 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0064-term-init-allow-systemd-to-watch-and-watch-reads-on-.patch b/recipes-security/refpolicy/refpolicy/0064-term-init-allow-systemd-to-watch-and-watch-reads-on-.patch deleted file mode 100644 index 88f070d..0000000 --- a/recipes-security/refpolicy/refpolicy/0064-term-init-allow-systemd-to-watch-and-watch-reads-on-.patch +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | From 50670946f04257cc2110facbc61884e2cf0d8327 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kenton Groombridge <me@concord.sh> | ||
3 | Date: Fri, 6 May 2022 21:16:29 -0400 | ||
4 | Subject: [PATCH] term, init: allow systemd to watch and watch reads on | ||
5 | unallocated ttys | ||
6 | |||
7 | As of systemd 250, systemd needs to be able to add a watch on and watch | ||
8 | reads on unallocated ttys in order to start getty. | ||
9 | |||
10 | systemd[55548]: getty@tty1.service: Failed to set up standard input: Permission denied | ||
11 | systemd[55548]: getty@tty1.service: Failed at step STDIN spawning /sbin/agetty: Permission denied | ||
12 | |||
13 | time->Fri May 6 21:17:58 2022 | ||
14 | type=PROCTITLE msg=audit(1651886278.452:1770): proctitle="(agetty)" | ||
15 | type=PATH msg=audit(1651886278.452:1770): item=0 name="/dev/tty1" inode=18 dev=00:05 mode=020620 ouid=0 ogid=5 rdev=04:01 obj=system_u:object_r:tty_device_t:s0 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0 | ||
16 | type=CWD msg=audit(1651886278.452:1770): cwd="/" | ||
17 | type=SYSCALL msg=audit(1651886278.452:1770): arch=c000003e syscall=254 success=no exit=-13 a0=3 a1=60ba5c21e020 a2=18 a3=23 items=1 ppid=1 pid=55551 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="(agetty)" exe="/lib/systemd/systemd" subj=system_u:system_r:init_t:s0 key=(null) | ||
18 | type=AVC msg=audit(1651886278.452:1770): avc: denied { watch watch_reads } for pid=55551 comm="(agetty)" path="/dev/tty1" dev="devtmpfs" ino=18 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:tty_device_t:s0 tclass=chr_file permissive=0 | ||
19 | |||
20 | Upstream-Status: Backport | ||
21 | [https://github.com/SELinuxProject/refpolicy/commit/308ab9f69a4623f5dace8da151e70c6316f055a8] | ||
22 | |||
23 | Signed-off-by: Kenton Groombridge <me@concord.sh> | ||
24 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
25 | --- | ||
26 | policy/modules/kernel/terminal.if | 38 +++++++++++++++++++++++++++++++ | ||
27 | policy/modules/system/init.te | 2 ++ | ||
28 | 2 files changed, 40 insertions(+) | ||
29 | |||
30 | diff --git a/policy/modules/kernel/terminal.if b/policy/modules/kernel/terminal.if | ||
31 | index e8c0735eb..6e9f654ac 100644 | ||
32 | --- a/policy/modules/kernel/terminal.if | ||
33 | +++ b/policy/modules/kernel/terminal.if | ||
34 | @@ -1287,6 +1287,44 @@ interface(`term_dontaudit_use_unallocated_ttys',` | ||
35 | dontaudit $1 tty_device_t:chr_file rw_chr_file_perms; | ||
36 | ') | ||
37 | |||
38 | +######################################## | ||
39 | +## <summary> | ||
40 | +## Watch unallocated ttys. | ||
41 | +## </summary> | ||
42 | +## <param name="domain"> | ||
43 | +## <summary> | ||
44 | +## Domain allowed access. | ||
45 | +## </summary> | ||
46 | +## </param> | ||
47 | +# | ||
48 | +interface(`term_watch_unallocated_ttys',` | ||
49 | + gen_require(` | ||
50 | + type tty_device_t; | ||
51 | + ') | ||
52 | + | ||
53 | + dev_list_all_dev_nodes($1) | ||
54 | + allow $1 tty_device_t:chr_file watch; | ||
55 | +') | ||
56 | + | ||
57 | +######################################## | ||
58 | +## <summary> | ||
59 | +## Watch reads on unallocated ttys. | ||
60 | +## </summary> | ||
61 | +## <param name="domain"> | ||
62 | +## <summary> | ||
63 | +## Domain allowed access. | ||
64 | +## </summary> | ||
65 | +## </param> | ||
66 | +# | ||
67 | +interface(`term_watch_reads_unallocated_ttys',` | ||
68 | + gen_require(` | ||
69 | + type tty_device_t; | ||
70 | + ') | ||
71 | + | ||
72 | + dev_list_all_dev_nodes($1) | ||
73 | + allow $1 tty_device_t:chr_file watch_reads; | ||
74 | +') | ||
75 | + | ||
76 | ######################################## | ||
77 | ## <summary> | ||
78 | ## Get the attributes of all tty device nodes. | ||
79 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te | ||
80 | index 5a19f0e43..24cef0924 100644 | ||
81 | --- a/policy/modules/system/init.te | ||
82 | +++ b/policy/modules/system/init.te | ||
83 | @@ -518,6 +518,8 @@ ifdef(`init_systemd',` | ||
84 | term_create_devpts_dirs(init_t) | ||
85 | term_create_ptmx(init_t) | ||
86 | term_create_controlling_term(init_t) | ||
87 | + term_watch_unallocated_ttys(init_t) | ||
88 | + term_watch_reads_unallocated_ttys(init_t) | ||
89 | |||
90 | # udevd is a "systemd kobject uevent socket activated daemon" | ||
91 | udev_create_kobject_uevent_sockets(init_t) | ||
92 | -- | ||
93 | 2.25.1 | ||
94 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0065-systemd-add-file-transition-for-systemd-networkd-run.patch b/recipes-security/refpolicy/refpolicy/0065-systemd-add-file-transition-for-systemd-networkd-run.patch deleted file mode 100644 index 1029490..0000000 --- a/recipes-security/refpolicy/refpolicy/0065-systemd-add-file-transition-for-systemd-networkd-run.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 6f8a8ecd8bafd6e8a3515b53db2a2982a02ff254 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kenton Groombridge <me@concord.sh> | ||
3 | Date: Thu, 31 Mar 2022 13:22:37 -0400 | ||
4 | Subject: [PATCH] systemd: add file transition for systemd-networkd runtime | ||
5 | |||
6 | systemd-networkd creates the /run/systemd/network directory which should | ||
7 | be labeled appropriately. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | [https://github.com/SELinuxProject/refpolicy/commit/663b62f27cb12c22f056eba9326cf3f7f78d8a9e] | ||
11 | |||
12 | Signed-off-by: Kenton Groombridge <me@concord.sh> | ||
13 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
14 | --- | ||
15 | policy/modules/system/systemd.te | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te | ||
19 | index beb301cc6..654c6a42a 100644 | ||
20 | --- a/policy/modules/system/systemd.te | ||
21 | +++ b/policy/modules/system/systemd.te | ||
22 | @@ -917,6 +917,7 @@ auth_use_nsswitch(systemd_networkd_t) | ||
23 | |||
24 | init_dgram_send(systemd_networkd_t) | ||
25 | init_read_state(systemd_networkd_t) | ||
26 | +init_runtime_filetrans(systemd_networkd_t, systemd_networkd_runtime_t, dir) | ||
27 | |||
28 | logging_send_syslog_msg(systemd_networkd_t) | ||
29 | |||
30 | -- | ||
31 | 2.25.1 | ||
32 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0066-systemd-add-missing-file-context-for-run-systemd-net.patch b/recipes-security/refpolicy/refpolicy/0066-systemd-add-missing-file-context-for-run-systemd-net.patch deleted file mode 100644 index f84eb4a..0000000 --- a/recipes-security/refpolicy/refpolicy/0066-systemd-add-missing-file-context-for-run-systemd-net.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 2e3f371b59bee343c42e4c69495df0f3719b6e24 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kenton Groombridge <me@concord.sh> | ||
3 | Date: Sat, 2 Apr 2022 15:44:01 -0400 | ||
4 | Subject: [PATCH] systemd: add missing file context for /run/systemd/network | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | [https://github.com/SELinuxProject/refpolicy/commit/f2fe1ae15485da7b6269b7d0d7dbed9a834f1876] | ||
8 | |||
9 | Signed-off-by: Kenton Groombridge <me@concord.sh> | ||
10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
11 | --- | ||
12 | policy/modules/system/systemd.fc | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/policy/modules/system/systemd.fc b/policy/modules/system/systemd.fc | ||
16 | index 34db8c034..d21914227 100644 | ||
17 | --- a/policy/modules/system/systemd.fc | ||
18 | +++ b/policy/modules/system/systemd.fc | ||
19 | @@ -85,6 +85,7 @@ HOME_DIR/\.local/share/systemd(/.*)? gen_context(system_u:object_r:systemd_data | ||
20 | |||
21 | /run/systemd/ask-password(/.*)? gen_context(system_u:object_r:systemd_passwd_runtime_t,s0) | ||
22 | /run/systemd/ask-password-block(/.*)? gen_context(system_u:object_r:systemd_passwd_runtime_t,s0) | ||
23 | +/run/systemd/network(/.*)? gen_context(system_u:object_r:systemd_networkd_runtime_t,s0) | ||
24 | /run/systemd/resolve(/.*)? gen_context(system_u:object_r:systemd_resolved_runtime_t,s0) | ||
25 | /run/systemd/seats(/.*)? gen_context(system_u:object_r:systemd_sessions_runtime_t,s0) | ||
26 | /run/systemd/sessions(/.*)? gen_context(system_u:object_r:systemd_sessions_runtime_t,s0) | ||
27 | -- | ||
28 | 2.25.1 | ||
29 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0067-systemd-add-file-contexts-for-systemd-network-genera.patch b/recipes-security/refpolicy/refpolicy/0067-systemd-add-file-contexts-for-systemd-network-genera.patch deleted file mode 100644 index 0aaf096..0000000 --- a/recipes-security/refpolicy/refpolicy/0067-systemd-add-file-contexts-for-systemd-network-genera.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 143d339b2e6611c56cd0210279757ebee9632731 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kenton Groombridge <me@concord.sh> | ||
3 | Date: Thu, 19 May 2022 11:42:51 -0400 | ||
4 | Subject: [PATCH] systemd: add file contexts for systemd-network-generator | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | [https://github.com/SELinuxProject/refpolicy/commit/73adba0a39b7409bc4bbfa0e962108c2b1e5f2a5] | ||
8 | |||
9 | Thanks-To: Zhao Yi | ||
10 | Signed-off-by: Kenton Groombridge <me@concord.sh> | ||
11 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
12 | --- | ||
13 | policy/modules/system/systemd.fc | 2 ++ | ||
14 | 1 file changed, 2 insertions(+) | ||
15 | |||
16 | diff --git a/policy/modules/system/systemd.fc b/policy/modules/system/systemd.fc | ||
17 | index d21914227..1a35bd65c 100644 | ||
18 | --- a/policy/modules/system/systemd.fc | ||
19 | +++ b/policy/modules/system/systemd.fc | ||
20 | @@ -35,6 +35,7 @@ | ||
21 | /usr/lib/systemd/systemd-machined -- gen_context(system_u:object_r:systemd_machined_exec_t,s0) | ||
22 | /usr/lib/systemd/systemd-modules-load -- gen_context(system_u:object_r:systemd_modules_load_exec_t,s0) | ||
23 | /usr/lib/systemd/systemd-networkd -- gen_context(system_u:object_r:systemd_networkd_exec_t,s0) | ||
24 | +/usr/lib/systemd/systemd-network-generator -- gen_context(system_u:object_r:systemd_networkd_exec_t,s0) | ||
25 | /usr/lib/systemd/systemd-pstore -- gen_context(system_u:object_r:systemd_pstore_exec_t,s0) | ||
26 | /usr/lib/systemd/systemd-resolved -- gen_context(system_u:object_r:systemd_resolved_exec_t,s0) | ||
27 | /usr/lib/systemd/systemd-rfkill -- gen_context(system_u:object_r:systemd_rfkill_exec_t,s0) | ||
28 | @@ -60,6 +61,7 @@ HOME_DIR/\.local/share/systemd(/.*)? gen_context(system_u:object_r:systemd_data | ||
29 | /usr/lib/systemd/system/systemd-backlight.* -- gen_context(system_u:object_r:systemd_backlight_unit_t,s0) | ||
30 | /usr/lib/systemd/system/systemd-binfmt.* -- gen_context(system_u:object_r:systemd_binfmt_unit_t,s0) | ||
31 | /usr/lib/systemd/system/systemd-networkd.* gen_context(system_u:object_r:systemd_networkd_unit_t,s0) | ||
32 | +/usr/lib/systemd/system/systemd-network-generator.* gen_context(system_u:object_r:systemd_networkd_unit_t,s0) | ||
33 | /usr/lib/systemd/system/systemd-rfkill.* -- gen_context(system_u:object_r:systemd_rfkill_unit_t,s0) | ||
34 | /usr/lib/systemd/system/systemd-socket-proxyd\.service -- gen_context(system_u:object_r:systemd_socket_proxyd_unit_file_t,s0) | ||
35 | |||
36 | -- | ||
37 | 2.25.1 | ||
38 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0068-systemd-udev-allow-udev-to-read-systemd-networkd-run.patch b/recipes-security/refpolicy/refpolicy/0068-systemd-udev-allow-udev-to-read-systemd-networkd-run.patch deleted file mode 100644 index 259863c..0000000 --- a/recipes-security/refpolicy/refpolicy/0068-systemd-udev-allow-udev-to-read-systemd-networkd-run.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 6508bc8a3440525384fcfcd8ad55a4cd5c79b912 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kenton Groombridge <me@concord.sh> | ||
3 | Date: Thu, 19 May 2022 11:43:44 -0400 | ||
4 | Subject: [PATCH] systemd, udev: allow udev to read systemd-networkd runtime | ||
5 | |||
6 | udev searches for .link files and applies custom udev rules to devices | ||
7 | as they come up. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | [https://github.com/SELinuxProject/refpolicy/commit/998ef975f38c70d57e7220b88ae5e62c88ebb770] | ||
11 | |||
12 | Thanks-To: Zhao Yi | ||
13 | Signed-off-by: Kenton Groombridge <me@concord.sh> | ||
14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
15 | --- | ||
16 | policy/modules/system/udev.te | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
18 | |||
19 | diff --git a/policy/modules/system/udev.te b/policy/modules/system/udev.te | ||
20 | index 4c5a690fb..8e243c0f2 100644 | ||
21 | --- a/policy/modules/system/udev.te | ||
22 | +++ b/policy/modules/system/udev.te | ||
23 | @@ -270,6 +270,8 @@ ifdef(`init_systemd',` | ||
24 | systemd_read_hwdb(udev_t) | ||
25 | systemd_read_logind_sessions_files(udev_t) | ||
26 | systemd_read_logind_runtime_files(udev_t) | ||
27 | + # udev searches for .link files and applies custom udev rules | ||
28 | + systemd_read_networkd_runtime(udev_t) | ||
29 | |||
30 | optional_policy(` | ||
31 | init_dbus_chat(udev_t) | ||
32 | -- | ||
33 | 2.25.1 | ||
34 | |||
diff --git a/recipes-security/refpolicy/refpolicy/0069-fc-fstools-apply-policy-to-findfs-alternative.patch b/recipes-security/refpolicy/refpolicy/0069-fc-fstools-apply-policy-to-findfs-alternative.patch deleted file mode 100644 index 6535a4b..0000000 --- a/recipes-security/refpolicy/refpolicy/0069-fc-fstools-apply-policy-to-findfs-alternative.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 3e3ec39659ae068d20efbb5f13054d90960c3c3f Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Thu, 19 May 2022 16:51:49 +0800 | ||
4 | Subject: [PATCH] fc/fstools: apply policy to findfs alternative | ||
5 | |||
6 | Add file context for findfs alternative which is provided by util-linux. | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | |||
10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
11 | --- | ||
12 | policy/modules/system/fstools.fc | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc | ||
16 | index bef711850..91be0ef3d 100644 | ||
17 | --- a/policy/modules/system/fstools.fc | ||
18 | +++ b/policy/modules/system/fstools.fc | ||
19 | @@ -77,6 +77,7 @@ | ||
20 | /usr/sbin/fdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) | ||
21 | /usr/sbin/fdisk\.util-linux -- gen_context(system_u:object_r:fsadm_exec_t,s0) | ||
22 | /usr/sbin/findfs -- gen_context(system_u:object_r:fsadm_exec_t,s0) | ||
23 | +/usr/sbin/findfs\.util-linux -- gen_context(system_u:object_r:fsadm_exec_t,s0) | ||
24 | /usr/sbin/fsck.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) | ||
25 | /usr/sbin/gdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) | ||
26 | /usr/sbin/hdparm -- gen_context(system_u:object_r:fsadm_exec_t,s0) | ||
27 | -- | ||
28 | 2.25.1 | ||
29 | |||
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc index bb0c0dd..a51312f 100644 --- a/recipes-security/refpolicy/refpolicy_common.inc +++ b/recipes-security/refpolicy/refpolicy_common.inc | |||
@@ -7,10 +7,10 @@ PROVIDES = "virtual/refpolicy" | |||
7 | RPROVIDES:${PN} = "refpolicy" | 7 | RPROVIDES:${PN} = "refpolicy" |
8 | 8 | ||
9 | # Specific config files for Poky | 9 | # Specific config files for Poky |
10 | SRC_URI += "file://customizable_types \ | 10 | SRC_URI += "file://customizable_types \ |
11 | file://setrans-mls.conf \ | 11 | file://setrans-mls.conf \ |
12 | file://setrans-mcs.conf \ | 12 | file://setrans-mcs.conf \ |
13 | " | 13 | " |
14 | 14 | ||
15 | # Base patches applied to all Yocto-based platforms. Your own version of | 15 | # Base patches applied to all Yocto-based platforms. Your own version of |
16 | # refpolicy should provide a version of these and place them in your own | 16 | # refpolicy should provide a version of these and place them in your own |
@@ -49,64 +49,49 @@ SRC_URI += " \ | |||
49 | file://0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch \ | 49 | file://0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch \ |
50 | file://0032-policy-modules-system-logging-fix-auditd-startup-fai.patch \ | 50 | file://0032-policy-modules-system-logging-fix-auditd-startup-fai.patch \ |
51 | file://0033-policy-modules-kernel-terminal-don-t-audit-tty_devic.patch \ | 51 | file://0033-policy-modules-kernel-terminal-don-t-audit-tty_devic.patch \ |
52 | file://0034-policy-modules-system-modutils-allow-mod_t-to-access.patch \ | 52 | file://0034-policy-modules-services-rpcbind-allow-rpcbind_t-to-c.patch \ |
53 | file://0035-policy-modules-system-getty-allow-getty_t-to-search-.patch \ | 53 | file://0035-policy-modules-system-systemd-enable-support-for-sys.patch \ |
54 | file://0036-policy-modules-services-rpcbind-allow-rpcbind_t-to-c.patch \ | 54 | file://0036-policy-modules-system-systemd-allow-systemd_logind_t.patch \ |
55 | file://0037-policy-modules-admin-usermanage-allow-useradd-to-rel.patch \ | 55 | file://0037-policy-modules-roles-sysadm-allow-sysadm-to-use-init.patch \ |
56 | file://0038-policy-modules-system-systemd-enable-support-for-sys.patch \ | 56 | file://0038-policy-modules-system-systemd-systemd-user-fixes.patch \ |
57 | file://0039-policy-modules-system-systemd-fix-systemd-resolved-s.patch \ | 57 | file://0039-policy-modules-system-mount-make-mount_t-domain-MLS-.patch \ |
58 | file://0040-policy-modules-system-systemd-allow-systemd_-_t-to-g.patch \ | 58 | file://0040-policy-modules-roles-sysadm-MLS-sysadm-rw-to-clearan.patch \ |
59 | file://0041-policy-modules-system-logging-fix-syslogd-failures-f.patch \ | 59 | file://0041-policy-modules-services-rpc-make-nfsd_t-domain-MLS-t.patch \ |
60 | file://0042-policy-modules-system-systemd-systemd-user-fixes.patch \ | 60 | file://0042-policy-modules-admin-dmesg-make-dmesg_t-MLS-trusted-.patch \ |
61 | file://0043-policy-modules-system-sysnetwork-support-priviledge-.patch \ | 61 | file://0043-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch \ |
62 | file://0044-policy-modules-system-modutils-allow-kmod_t-to-write.patch \ | 62 | file://0044-policy-modules-system-init-make-init_t-MLS-trusted-f.patch \ |
63 | file://0045-policy-modules-system-systemd-allow-systemd_logind_t.patch \ | 63 | file://0045-policy-modules-system-systemd-make-systemd-tmpfiles_.patch \ |
64 | file://0046-policy-modules-system-mount-make-mount_t-domain-MLS-.patch \ | 64 | file://0046-policy-modules-system-systemd-systemd-make-systemd_-.patch \ |
65 | file://0047-policy-modules-roles-sysadm-MLS-sysadm-rw-to-clearan.patch \ | 65 | file://0047-policy-modules-system-logging-add-the-syslogd_t-to-t.patch \ |
66 | file://0048-policy-modules-services-rpc-make-nfsd_t-domain-MLS-t.patch \ | 66 | file://0048-policy-modules-system-init-make-init_t-MLS-trusted-f.patch \ |
67 | file://0049-policy-modules-admin-dmesg-make-dmesg_t-MLS-trusted-.patch \ | 67 | file://0049-policy-modules-system-init-all-init_t-to-read-any-le.patch \ |
68 | file://0050-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch \ | 68 | file://0050-policy-modules-system-logging-allow-auditd_t-to-writ.patch \ |
69 | file://0051-policy-modules-system-init-make-init_t-MLS-trusted-f.patch \ | 69 | file://0051-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch \ |
70 | file://0052-policy-modules-system-systemd-make-systemd-tmpfiles_.patch \ | 70 | file://0052-policy-modules-system-setrans-allow-setrans_t-use-fd.patch \ |
71 | file://0053-policy-modules-system-systemd-systemd-make-systemd_-.patch \ | 71 | file://0053-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch \ |
72 | file://0054-policy-modules-system-logging-add-the-syslogd_t-to-t.patch \ | 72 | file://0054-policy-modules-system-logging-make-syslogd_runtime_t.patch \ |
73 | file://0055-policy-modules-system-init-make-init_t-MLS-trusted-f.patch \ | ||
74 | file://0056-policy-modules-system-init-all-init_t-to-read-any-le.patch \ | ||
75 | file://0057-policy-modules-system-logging-allow-auditd_t-to-writ.patch \ | ||
76 | file://0058-policy-modules-kernel-kernel-make-kernel_t-MLS-trust.patch \ | ||
77 | file://0059-policy-modules-system-setrans-allow-setrans_t-use-fd.patch \ | ||
78 | file://0060-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch \ | ||
79 | file://0061-policy-modules-system-logging-make-syslogd_runtime_t.patch \ | ||
80 | file://0062-systemd-systemd-resolved-is-linked-to-libselinux.patch \ | ||
81 | file://0063-sysnetwork-systemd-allow-DNS-resolution-over-io.syst.patch \ | ||
82 | file://0064-term-init-allow-systemd-to-watch-and-watch-reads-on-.patch \ | ||
83 | file://0065-systemd-add-file-transition-for-systemd-networkd-run.patch \ | ||
84 | file://0066-systemd-add-missing-file-context-for-run-systemd-net.patch \ | ||
85 | file://0067-systemd-add-file-contexts-for-systemd-network-genera.patch \ | ||
86 | file://0068-systemd-udev-allow-udev-to-read-systemd-networkd-run.patch \ | ||
87 | file://0069-fc-fstools-apply-policy-to-findfs-alternative.patch \ | ||
88 | " | 73 | " |
89 | 74 | ||
90 | S = "${WORKDIR}/refpolicy" | 75 | S = "${WORKDIR}/refpolicy" |
91 | 76 | ||
92 | CONFFILES:${PN} += "${sysconfdir}/selinux/config" | 77 | CONFFILES:${PN} = "${sysconfdir}/selinux/config" |
93 | FILES:${PN} += " \ | 78 | FILES:${PN} += " \ |
94 | ${sysconfdir}/selinux/${POLICY_NAME}/ \ | 79 | ${sysconfdir}/selinux/${POLICY_NAME}/ \ |
95 | ${datadir}/selinux/${POLICY_NAME}/*.pp \ | 80 | ${datadir}/selinux/${POLICY_NAME}/*.pp \ |
96 | ${localstatedir}/lib/selinux/${POLICY_NAME}/ \ | 81 | ${localstatedir}/lib/selinux/${POLICY_NAME}/ \ |
97 | " | 82 | " |
98 | FILES:${PN}-dev =+ " \ | 83 | FILES:${PN}-dev =+ " \ |
99 | ${datadir}/selinux/${POLICY_NAME}/include/ \ | 84 | ${datadir}/selinux/${POLICY_NAME}/include/ \ |
100 | ${sysconfdir}/selinux/sepolgen.conf \ | 85 | ${sysconfdir}/selinux/sepolgen.conf \ |
101 | " | 86 | " |
102 | 87 | ||
103 | EXTRANATIVEPATH += "bzip2-native" | 88 | EXTRANATIVEPATH += "bzip2-native" |
104 | 89 | ||
105 | DEPENDS += "bzip2-replacement-native checkpolicy-native policycoreutils-native semodule-utils-native m4-native" | 90 | DEPENDS = "bzip2-replacement-native checkpolicy-native policycoreutils-native semodule-utils-native m4-native" |
106 | 91 | ||
107 | RDEPENDS:${PN}-dev =+ " \ | 92 | RDEPENDS:${PN}-dev = " \ |
108 | python3-core \ | 93 | python3-core \ |
109 | " | 94 | " |
110 | 95 | ||
111 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 96 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
112 | 97 | ||
@@ -129,83 +114,83 @@ POLICY_MLS_SENS ?= "16" | |||
129 | POLICY_MLS_CATS ?= "1024" | 114 | POLICY_MLS_CATS ?= "1024" |
130 | POLICY_MCS_CATS ?= "1024" | 115 | POLICY_MCS_CATS ?= "1024" |
131 | 116 | ||
132 | EXTRA_OEMAKE += "NAME=${POLICY_NAME} \ | 117 | EXTRA_OEMAKE = "NAME=${POLICY_NAME} \ |
133 | TYPE=${POLICY_TYPE} \ | 118 | TYPE=${POLICY_TYPE} \ |
134 | DISTRO=${POLICY_DISTRO} \ | 119 | DISTRO=${POLICY_DISTRO} \ |
135 | UBAC=${POLICY_UBAC} \ | 120 | UBAC=${POLICY_UBAC} \ |
136 | UNK_PERMS=${POLICY_UNK_PERMS} \ | 121 | UNK_PERMS=${POLICY_UNK_PERMS} \ |
137 | DIRECT_INITRC=${POLICY_DIRECT_INITRC} \ | 122 | DIRECT_INITRC=${POLICY_DIRECT_INITRC} \ |
138 | SYSTEMD=${POLICY_SYSTEMD} \ | 123 | SYSTEMD=${POLICY_SYSTEMD} \ |
139 | MONOLITHIC=${POLICY_MONOLITHIC} \ | 124 | MONOLITHIC=${POLICY_MONOLITHIC} \ |
140 | CUSTOM_BUILDOPT=${POLICY_CUSTOM_BUILDOPT} \ | 125 | CUSTOM_BUILDOPT=${POLICY_CUSTOM_BUILDOPT} \ |
141 | QUIET=${POLICY_QUIET} \ | 126 | QUIET=${POLICY_QUIET} \ |
142 | MLS_SENS=${POLICY_MLS_SENS} \ | 127 | MLS_SENS=${POLICY_MLS_SENS} \ |
143 | MLS_CATS=${POLICY_MLS_CATS} \ | 128 | MLS_CATS=${POLICY_MLS_CATS} \ |
144 | MCS_CATS=${POLICY_MCS_CATS}" | 129 | MCS_CATS=${POLICY_MCS_CATS}" |
145 | 130 | ||
146 | EXTRA_OEMAKE += "tc_usrbindir=${STAGING_BINDIR_NATIVE}" | 131 | EXTRA_OEMAKE += "tc_usrbindir=${STAGING_BINDIR_NATIVE}" |
147 | EXTRA_OEMAKE += "OUTPUT_POLICY=`${STAGING_BINDIR_NATIVE}/checkpolicy -V | cut -d' ' -f1`" | 132 | EXTRA_OEMAKE += "OUTPUT_POLICY=`${STAGING_BINDIR_NATIVE}/checkpolicy -V | cut -d' ' -f1`" |
148 | EXTRA_OEMAKE += "CC='${BUILD_CC}' CFLAGS='${BUILD_CFLAGS}' PYTHON='${PYTHON}'" | 133 | EXTRA_OEMAKE += "CC='${BUILD_CC}' CFLAGS='${BUILD_CFLAGS}' PYTHON='${PYTHON}'" |
149 | 134 | ||
150 | python __anonymous () { | 135 | python __anonymous() { |
151 | import re | 136 | import re |
152 | 137 | ||
153 | # make sure DEFAULT_ENFORCING is something sane | 138 | # Make sure DEFAULT_ENFORCING is something sane |
154 | if not re.match('^(enforcing|permissive|disabled)$', | 139 | if not re.match('^(enforcing|permissive|disabled)$', |
155 | d.getVar('DEFAULT_ENFORCING'), | 140 | d.getVar('DEFAULT_ENFORCING'), |
156 | flags=0): | 141 | flags=0): |
157 | d.setVar('DEFAULT_ENFORCING', 'permissive') | 142 | d.setVar('DEFAULT_ENFORCING', 'permissive') |
158 | } | 143 | } |
159 | 144 | ||
160 | disable_policy_modules () { | 145 | disable_policy_modules() { |
161 | for module in ${PURGE_POLICY_MODULES} ; do | 146 | for module in ${PURGE_POLICY_MODULES} ; do |
162 | sed -i "s/^\(\<${module}\>\) *= *.*$/\1 = off/" ${S}/policy/modules.conf | 147 | sed -i "s/^\(\<${module}\>\) *= *.*$/\1 = off/" ${S}/policy/modules.conf |
163 | done | 148 | done |
164 | } | 149 | } |
165 | 150 | ||
166 | do_compile() { | 151 | do_compile() { |
167 | if [ -f "${WORKDIR}/modules.conf" ] ; then | 152 | if [ -f "${WORKDIR}/modules.conf" ] ; then |
168 | cp -f ${WORKDIR}/modules.conf ${S}/policy/modules.conf | 153 | cp -f ${WORKDIR}/modules.conf ${S}/policy/modules.conf |
169 | fi | 154 | fi |
170 | oe_runmake conf | 155 | oe_runmake conf |
171 | disable_policy_modules | 156 | disable_policy_modules |
172 | oe_runmake policy | 157 | oe_runmake policy |
173 | } | 158 | } |
174 | 159 | ||
175 | prepare_policy_store () { | 160 | prepare_policy_store() { |
176 | oe_runmake 'DESTDIR=${D}' 'prefix=${D}${prefix}' install | 161 | oe_runmake 'DESTDIR=${D}' 'prefix=${D}${prefix}' install |
177 | POL_PRIORITY=100 | 162 | POL_PRIORITY=100 |
178 | POL_SRC=${D}${datadir}/selinux/${POLICY_NAME} | 163 | POL_SRC=${D}${datadir}/selinux/${POLICY_NAME} |
179 | POL_STORE=${D}${localstatedir}/lib/selinux/${POLICY_NAME} | 164 | POL_STORE=${D}${localstatedir}/lib/selinux/${POLICY_NAME} |
180 | POL_ACTIVE_MODS=${POL_STORE}/active/modules/${POL_PRIORITY} | 165 | POL_ACTIVE_MODS=${POL_STORE}/active/modules/${POL_PRIORITY} |
181 | 166 | ||
182 | # Prepare to create policy store | 167 | # Prepare to create policy store |
183 | mkdir -p ${POL_STORE} | 168 | mkdir -p ${POL_STORE} |
184 | mkdir -p ${POL_ACTIVE_MODS} | 169 | mkdir -p ${POL_ACTIVE_MODS} |
185 | 170 | ||
186 | # get hll type from suffix on base policy module | 171 | # Get hll type from suffix on base policy module |
187 | HLL_TYPE=$(echo ${POL_SRC}/base.* | awk -F . '{if (NF>1) {print $NF}}') | 172 | HLL_TYPE=$(echo ${POL_SRC}/base.* | awk -F . '{if (NF>1) {print $NF}}') |
188 | HLL_BIN=${STAGING_DIR_NATIVE}${prefix}/libexec/selinux/hll/${HLL_TYPE} | 173 | HLL_BIN=${STAGING_DIR_NATIVE}${prefix}/libexec/selinux/hll/${HLL_TYPE} |
189 | 174 | ||
190 | for i in ${POL_SRC}/*.${HLL_TYPE}; do | 175 | for i in ${POL_SRC}/*.${HLL_TYPE}; do |
191 | MOD_NAME=$(basename $i | sed "s/\.${HLL_TYPE}$//") | 176 | MOD_NAME=$(basename $i | sed "s/\.${HLL_TYPE}$//") |
192 | MOD_DIR=${POL_ACTIVE_MODS}/${MOD_NAME} | 177 | MOD_DIR=${POL_ACTIVE_MODS}/${MOD_NAME} |
193 | mkdir -p ${MOD_DIR} | 178 | mkdir -p ${MOD_DIR} |
194 | echo -n "${HLL_TYPE}" > ${MOD_DIR}/lang_ext | 179 | echo -n "${HLL_TYPE}" > ${MOD_DIR}/lang_ext |
195 | if ! bzip2 -t $i >/dev/null 2>&1; then | 180 | if ! bzip2 -t $i >/dev/null 2>&1; then |
196 | ${HLL_BIN} $i | bzip2 --stdout > ${MOD_DIR}/cil | 181 | ${HLL_BIN} $i | bzip2 --stdout > ${MOD_DIR}/cil |
197 | bzip2 -f $i && mv -f $i.bz2 $i | 182 | bzip2 -f $i && mv -f $i.bz2 $i |
198 | else | 183 | else |
199 | bunzip2 --stdout $i | \ | 184 | bunzip2 --stdout $i | \ |
200 | ${HLL_BIN} | \ | 185 | ${HLL_BIN} | \ |
201 | bzip2 --stdout > ${MOD_DIR}/cil | 186 | bzip2 --stdout > ${MOD_DIR}/cil |
202 | fi | 187 | fi |
203 | cp $i ${MOD_DIR}/hll | 188 | cp $i ${MOD_DIR}/hll |
204 | done | 189 | done |
205 | } | 190 | } |
206 | 191 | ||
207 | rebuild_policy () { | 192 | rebuild_policy() { |
208 | cat <<-EOF > ${D}${sysconfdir}/selinux/semanage.conf | 193 | cat <<-EOF > ${D}${sysconfdir}/selinux/semanage.conf |
209 | module-store = direct | 194 | module-store = direct |
210 | [setfiles] | 195 | [setfiles] |
211 | path = ${STAGING_DIR_NATIVE}${base_sbindir_native}/setfiles | 196 | path = ${STAGING_DIR_NATIVE}${base_sbindir_native}/setfiles |
@@ -219,29 +204,29 @@ args = \$@ | |||
219 | policy-version = 33 | 204 | policy-version = 33 |
220 | EOF | 205 | EOF |
221 | 206 | ||
222 | # Create policy store and build the policy | 207 | # Create policy store and build the policy |
223 | semodule -p ${D} -s ${POLICY_NAME} -n -B | 208 | semodule -p ${D} -s ${POLICY_NAME} -n -B |
224 | rm -f ${D}${sysconfdir}/selinux/semanage.conf | 209 | rm -f ${D}${sysconfdir}/selinux/semanage.conf |
225 | # no need to leave final dir created by semanage laying around | 210 | # No need to leave final dir created by semanage laying around |
226 | rm -rf ${D}${localstatedir}/lib/selinux/final | 211 | rm -rf ${D}${localstatedir}/lib/selinux/final |
227 | } | 212 | } |
228 | 213 | ||
229 | install_misc_files () { | 214 | install_misc_files() { |
230 | cat ${WORKDIR}/customizable_types >> \ | 215 | cat ${WORKDIR}/customizable_types >> \ |
231 | ${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/customizable_types | 216 | ${D}${sysconfdir}/selinux/${POLICY_NAME}/contexts/customizable_types |
232 | 217 | ||
233 | # install setrans.conf for mls/mcs policy | 218 | # Install setrans.conf for mls/mcs policy |
234 | if [ -f ${WORKDIR}/setrans-${POLICY_TYPE}.conf ]; then | 219 | if [ -f ${WORKDIR}/setrans-${POLICY_TYPE}.conf ]; then |
235 | install -m 0644 ${WORKDIR}/setrans-${POLICY_TYPE}.conf \ | 220 | install -m 0644 ${WORKDIR}/setrans-${POLICY_TYPE}.conf \ |
236 | ${D}${sysconfdir}/selinux/${POLICY_NAME}/setrans.conf | 221 | ${D}${sysconfdir}/selinux/${POLICY_NAME}/setrans.conf |
237 | fi | 222 | fi |
238 | 223 | ||
239 | # install policy headers | 224 | # Install policy headers |
240 | oe_runmake 'DESTDIR=${D}' 'prefix=${D}${prefix}' install-headers | 225 | oe_runmake 'DESTDIR=${D}' 'prefix=${D}${prefix}' install-headers |
241 | } | 226 | } |
242 | 227 | ||
243 | install_config () { | 228 | install_config() { |
244 | echo "\ | 229 | echo "\ |
245 | # This file controls the state of SELinux on the system. | 230 | # This file controls the state of SELinux on the system. |
246 | # SELINUX= can take one of these three values: | 231 | # SELINUX= can take one of these three values: |
247 | # enforcing - SELinux security policy is enforced. | 232 | # enforcing - SELinux security policy is enforced. |
@@ -256,22 +241,22 @@ SELINUX=${DEFAULT_ENFORCING} | |||
256 | # mcs - Multi Category Security protection. | 241 | # mcs - Multi Category Security protection. |
257 | SELINUXTYPE=${POLICY_NAME} | 242 | SELINUXTYPE=${POLICY_NAME} |
258 | " > ${WORKDIR}/config | 243 | " > ${WORKDIR}/config |
259 | install -d ${D}/${sysconfdir}/selinux | 244 | install -d ${D}/${sysconfdir}/selinux |
260 | install -m 0644 ${WORKDIR}/config ${D}/${sysconfdir}/selinux/ | 245 | install -m 0644 ${WORKDIR}/config ${D}/${sysconfdir}/selinux/ |
261 | } | 246 | } |
262 | 247 | ||
263 | do_install () { | 248 | do_install() { |
264 | prepare_policy_store | 249 | prepare_policy_store |
265 | rebuild_policy | 250 | rebuild_policy |
266 | install_misc_files | 251 | install_misc_files |
267 | install_config | 252 | install_config |
268 | } | 253 | } |
269 | 254 | ||
270 | do_install:append(){ | 255 | do_install:append() { |
271 | # While building policies on target, Makefile will be searched from SELINUX_DEVEL_PATH | 256 | # While building policies on target, Makefile will be searched from SELINUX_DEVEL_PATH |
272 | echo "SELINUX_DEVEL_PATH=${datadir}/selinux/${POLICY_NAME}/include" > ${D}${sysconfdir}/selinux/sepolgen.conf | 257 | echo "SELINUX_DEVEL_PATH=${datadir}/selinux/${POLICY_NAME}/include" > ${D}${sysconfdir}/selinux/sepolgen.conf |
273 | } | 258 | } |
274 | 259 | ||
275 | sysroot_stage_all:append () { | 260 | sysroot_stage_all:append() { |
276 | sysroot_stage_dir ${D}${sysconfdir} ${SYSROOT_DESTDIR}${sysconfdir} | 261 | sysroot_stage_dir ${D}${sysconfdir} ${SYSROOT_DESTDIR}${sysconfdir} |
277 | } | 262 | } |
diff --git a/recipes-security/refpolicy/refpolicy_git.inc b/recipes-security/refpolicy/refpolicy_git.inc index 9e78aed..54e0890 100644 --- a/recipes-security/refpolicy/refpolicy_git.inc +++ b/recipes-security/refpolicy/refpolicy_git.inc | |||
@@ -1,8 +1,8 @@ | |||
1 | PV = "2.20210908+git${SRCPV}" | 1 | PV = "2.20221101+git${SRCPV}" |
2 | 2 | ||
3 | SRC_URI = "git://github.com/SELinuxProject/refpolicy.git;protocol=https;branch=master;name=refpolicy;destsuffix=refpolicy" | 3 | SRC_URI = "git://github.com/SELinuxProject/refpolicy.git;protocol=https;branch=master;name=refpolicy;destsuffix=refpolicy" |
4 | 4 | ||
5 | SRCREV_refpolicy ?= "23a8d103f379361cfe63a9ee064564624e108196" | 5 | SRCREV_refpolicy ?= "03d486e306555da161b653c88e804ce23f3a0ea4" |
6 | 6 | ||
7 | UPSTREAM_CHECK_GITTAGREGEX = "RELEASE_(?P<pver>\d+_\d+)" | 7 | UPSTREAM_CHECK_GITTAGREGEX = "RELEASE_(?P<pver>\d+_\d+)" |
8 | 8 | ||