Skip to contentSkip to conversation

Allow Gentoo rc-update to manage runlevels, try 2

PATCH New gizmo at giz-works.com 2 participants 2 messages Dec 20, 2010

lore
Share & tools
lore
#0 lore raw

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

From: Chris Richards <[email protected]>

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 ed152c4..7904818 100644
@@ -1442,6 +1442,25 @@ interface(`init_dontaudit_use_script_ptys',`
 
 ########################################
 ## <summary>
+##	Manage init script runlevel files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_manage_script_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, try 2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 23 lines · gizmo at giz-works.com

From: Chris Richards <[email protected]>

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 +5 -0
index ed152c4..7904818 100644
@@ -1442,6 +1442,25 @@ interface(`init_dontaudit_use_script_ptys',`
 
 ########################################
 ## <summary>
+##	Manage init script runlevel files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.

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

Quoted 10 lines
policy/modules/system/init.if +10 -0
+##	</summary>
+## </param>
+#
+interface(`init_manage_script_runlevel_files',`
+	gen_require(`
+		type initrc_state_t;
+	')
+
+	read_lnk_files_pattern($1, initrc_state_t, initrc_state_t)
+	files_manage_etc_symlinks($1)

I am worried about the above symlink, seems to be it may be mislabelled. (should it have been created with initrc_state_t type or some other type?)

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

Quoted 7 lines
policy/modules/system/init.if +4 -0
+')
+
+########################################
+## <summary>
 ##	Get the attributes of init script
 ##	status files.
 ## </summary>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk0P2pkACgkQMlxVo39jgT+o2gCgwtQZXmkairFLb1lSVYMRGIYY LyoAn1ZbC8tlSpPCKi9+vJeiQm6CRLk3
=vYcR
-----END PGP SIGNATURE-----