diff options
author | Shrikant Bobade <shrikant_bobade@mentor.com> | 2016-08-29 19:07:33 +0530 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2016-09-01 14:30:47 -0400 |
commit | 0e03715dfe5f76ba01e391cfdc7592a6c0792f2b (patch) | |
tree | f4ff713c235f139be734c98985833449bca23784 | |
parent | 95922a23cb3c44d7ba2c7b40c7d812de244ece4a (diff) | |
download | meta-selinux-0e03715dfe5f76ba01e391cfdc7592a6c0792f2b.tar.gz |
refpolicy-minimum: init: fix reboot with systemd as init manager.
add allow rule to fix avc denial during system reboot.
Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r-- | recipes-security/refpolicy/refpolicy-minimum/0005-refpolicy-minimum-init-fix-reboot-with-systemd-as-in.patch | 36 | ||||
-rw-r--r-- | recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/refpolicy-minimum/0005-refpolicy-minimum-init-fix-reboot-with-systemd-as-in.patch b/recipes-security/refpolicy/refpolicy-minimum/0005-refpolicy-minimum-init-fix-reboot-with-systemd-as-in.patch new file mode 100644 index 0000000..c88f2b2 --- /dev/null +++ b/recipes-security/refpolicy/refpolicy-minimum/0005-refpolicy-minimum-init-fix-reboot-with-systemd-as-in.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 07b7eb45458de8a6781019a927c66aabe736e03a Mon Sep 17 00:00:00 2001 | ||
2 | From: Shrikant Bobade <shrikant_bobade@mentor.com> | ||
3 | Date: Fri, 26 Aug 2016 17:53:53 +0530 | ||
4 | Subject: [PATCH 5/9] refpolicy-minimum: init: fix reboot with systemd as init | ||
5 | manager. | ||
6 | |||
7 | add allow rule to fix avc denial during system reboot. | ||
8 | |||
9 | without this change we are getting: | ||
10 | |||
11 | audit: type=1107 audit(): pid=1 uid=0 auid=4294967295 ses=4294967295 subj= | ||
12 | system_u:system_r:init_t:s0 msg='avc: denied { reboot } for auid=n/a uid=0 | ||
13 | gid=0 cmdline="/bin/systemctl --force reboot" scontext=system_u:system_r: | ||
14 | initrc_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=system | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com> | ||
19 | --- | ||
20 | policy/modules/system/init.te | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te | ||
24 | index f9d7114..19a7a20 100644 | ||
25 | --- a/policy/modules/system/init.te | ||
26 | +++ b/policy/modules/system/init.te | ||
27 | @@ -1103,5 +1103,5 @@ allow devpts_t device_t:filesystem associate; | ||
28 | allow init_t self:capability2 block_suspend; | ||
29 | allow init_t self:capability2 audit_read; | ||
30 | |||
31 | -allow initrc_t init_t:system { start status }; | ||
32 | +allow initrc_t init_t:system { start status reboot }; | ||
33 | allow initrc_t init_var_run_t:service { start status }; | ||
34 | -- | ||
35 | 1.9.1 | ||
36 | |||
diff --git a/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb b/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb index d1ea37d..9c806c4 100644 --- a/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb +++ b/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb | |||
@@ -76,4 +76,5 @@ SYSTEMD_REFPOLICY_PATCHES = " \ | |||
76 | file://0002-refpolicy-minimum-audit-logging-getty-audit-related-.patch \ | 76 | file://0002-refpolicy-minimum-audit-logging-getty-audit-related-.patch \ |
77 | file://0003-refpolicy-minimum-systemd-mount-logging-authlogin-ad.patch \ | 77 | file://0003-refpolicy-minimum-systemd-mount-logging-authlogin-ad.patch \ |
78 | file://0004-refpolicy-minimum-locallogin-add-allow-rules-for-typ.patch \ | 78 | file://0004-refpolicy-minimum-locallogin-add-allow-rules-for-typ.patch \ |
79 | file://0005-refpolicy-minimum-init-fix-reboot-with-systemd-as-in.patch \ | ||
79 | " | 80 | " |