summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy-2.20140311/refpolicy-update-for_systemd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/refpolicy/refpolicy-2.20140311/refpolicy-update-for_systemd.patch')
-rw-r--r--recipes-security/refpolicy/refpolicy-2.20140311/refpolicy-update-for_systemd.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/refpolicy-2.20140311/refpolicy-update-for_systemd.patch b/recipes-security/refpolicy/refpolicy-2.20140311/refpolicy-update-for_systemd.patch
new file mode 100644
index 0000000..80b420c
--- /dev/null
+++ b/recipes-security/refpolicy/refpolicy-2.20140311/refpolicy-update-for_systemd.patch
@@ -0,0 +1,46 @@
1refpolicy: update for systemd
2
3It provides the systemd support for refpolicy
4and related allow rules.
5The restorecon provides systemd init labeled
6as init_exec_t.
7
8Upstream-Status: Pending
9
10
11Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
12
13--- a/policy/modules/contrib/shutdown.fc
14+++ b/policy/modules/contrib/shutdown.fc
15@@ -5,6 +5,9 @@
16 /sbin/shutdown -- gen_context(system_u:object_r:shutdown_exec_t,s0)
17 /sbin/shutdown\.sysvinit -- gen_context(system_u:object_r:shutdown_exec_t,s0)
18
19+# systemd support
20+/bin/systemctl -- gen_context(system_u:object_r:shutdown_exec_t,s0)
21+
22 /usr/lib/upstart/shutdown -- gen_context(system_u:object_r:shutdown_exec_t,s0)
23
24 /usr/sbin/shutdown -- gen_context(system_u:object_r:shutdown_exec_t,s0)
25--- a/policy/modules/system/init.fc
26+++ b/policy/modules/system/init.fc
27@@ -31,6 +31,8 @@
28 #
29 /sbin/init(ng)? -- gen_context(system_u:object_r:init_exec_t,s0)
30 /sbin/init\.sysvinit -- gen_context(system_u:object_r:init_exec_t,s0)
31+# systemd support
32+/lib/systemd/systemd -- gen_context(system_u:object_r:init_exec_t,s0)
33 # because nowadays, /sbin/init is often a symlink to /sbin/upstart
34 /sbin/upstart -- gen_context(system_u:object_r:init_exec_t,s0)
35
36--- a/policy/modules/system/init.te
37+++ b/policy/modules/system/init.te
38@@ -913,3 +913,8 @@
39 optional_policy(`
40 zebra_read_config(initrc_t)
41 ')
42+
43+# systemd related allow rules
44+allow kernel_t init_t:process dyntransition;
45+allow devpts_t device_t:filesystem associate;
46+allow init_t self:capability2 block_suspend;