From 8eefd8242e8b08fee6886d6bba12c4af202890d0 Mon Sep 17 00:00:00 2001
From: Xin Ouyang <Xin.Ouyang@windriver.com>
Date: Thu, 22 Aug 2013 13:37:23 +0800
Subject: [PATCH] fc/init: fix update-alternatives for sysvinit

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 policy/modules/admin/shutdown.fc      | 1 +
 policy/modules/kernel/corecommands.fc | 2 ++
 policy/modules/system/init.fc         | 1 +
 3 files changed, 4 insertions(+)

diff --git a/policy/modules/admin/shutdown.fc b/policy/modules/admin/shutdown.fc
index 89d682d36..354f4d1d9 100644
--- a/policy/modules/admin/shutdown.fc
+++ b/policy/modules/admin/shutdown.fc
@@ -7,5 +7,6 @@
 
 /usr/sbin/halt		--	gen_context(system_u:object_r:shutdown_exec_t,s0)
 /usr/sbin/shutdown	--	gen_context(system_u:object_r:shutdown_exec_t,s0)
+/usr/sbin/shutdown\.sysvinit	--	gen_context(system_u:object_r:shutdown_exec_t,s0)
 
 /run/shutdown\.pid	--	gen_context(system_u:object_r:shutdown_runtime_t,s0)
diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc
index 7d2efef0a..9a5711a83 100644
--- a/policy/modules/kernel/corecommands.fc
+++ b/policy/modules/kernel/corecommands.fc
@@ -156,6 +156,8 @@ ifdef(`distro_gentoo',`
 /usr/bin/mkfs\.cramfs		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/bin/mksh			--	gen_context(system_u:object_r:shell_exec_t,s0)
 /usr/bin/mountpoint		--	gen_context(system_u:object_r:bin_t,s0)
+/usr/bin/mountpoint\.sysvinit		--	gen_context(system_u:object_r:bin_t,s0)
+/usr/bin/mountpoint\.util-linux		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/bin/nologin		--	gen_context(system_u:object_r:shell_exec_t,s0)
 /usr/bin/sash			--	gen_context(system_u:object_r:shell_exec_t,s0)
 /usr/bin/sesh			--	gen_context(system_u:object_r:shell_exec_t,s0)
diff --git a/policy/modules/system/init.fc b/policy/modules/system/init.fc
index 07b12de2e..d99767ce8 100644
--- a/policy/modules/system/init.fc
+++ b/policy/modules/system/init.fc
@@ -49,6 +49,7 @@ ifdef(`distro_gentoo',`
 /usr/libexec/dcc/stop-.* --	gen_context(system_u:object_r:initrc_exec_t,s0)
 
 /usr/sbin/init(ng)?	--	gen_context(system_u:object_r:init_exec_t,s0)
+/usr/sbin/init\.sysvinit	--	gen_context(system_u:object_r:init_exec_t,s0)
 /usr/sbin/open_init_pty	--	gen_context(system_u:object_r:initrc_exec_t,s0)
 /usr/sbin/upstart	--	gen_context(system_u:object_r:init_exec_t,s0)
 
-- 
2.25.1

