Skip to contentSkip to conversation

Allow Gentoo rc-update to manage runlevels

PATCH New Chris Richards 2 participants 2 messages Nov 28, 2010 – Dec 15, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Allow Gentoo rc-update to manage runlevels

rc-update cannot properly update the system runlevels, even when run as the root user in sysadm role.

---
 policy/modules/system/init.if |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
policy/modules/system/init.if +19 -0
index df3fa64..b1ef45f 100644
@@ -1441,6 +1441,25 @@ interface(`init_dontaudit_use_script_ptys',`
 
 ########################################
 ## <summary>
+##	Manage init runlevel files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_manage_runlevel_files',`
+	gen_require(`
+		type initrc_state_t;
+	')
+
+	read_lnk_files_pattern($1, initrc_state_t, initrc_state_t)
+	files_manage_etc_symlinks($1)
+')
+
+########################################
+## <summary>
 ##	Get the attributes of init script
 ##	status files.
 ## </summary>
Signature · 1 line
1.7.3.2
#1 lore raw

PATCH 1/2 Allow Gentoo rc-update to manage runlevels

Quoted 15 lines · Chris Richards

rc-update cannot properly update the system runlevels, even when run as the root user in sysadm role.

---
 policy/modules/system/init.if |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
policy/modules/system/init.if +0 -0
index df3fa64..b1ef45f 100644
@@ -1441,6 +1441,25 @@ interface(`init_dontaudit_use_script_ptys',`
 
 ########################################

policy/modules/system/init.if interface(`init_dontaudit_use_script_ptys',` · line 1452

Quoted 10 lines
policy/modules/system/init.if +9 -0
 ## <summary>
+##	Manage init runlevel files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_manage_runlevel_files',`

Needs a name similar to the other initrc_state_t interfaces.

Quoted 13 lines
policy/modules/system/init.if +10 -0
+	gen_require(`
+		type initrc_state_t;
+	')
+
+	read_lnk_files_pattern($1, initrc_state_t, initrc_state_t)
+	files_manage_etc_symlinks($1)
+')
+
+########################################
+## <summary>
 ##	Get the attributes of init script
 ##	status files.
 ## </summary>
Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com