Skip to contentSkip to conversation

udev create lnk files in openrc dirs

PATCH New Chris Richards 2 participants 2 messages Dec 29, 2010 – Jan 10, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 udev create lnk files in openrc dirs

When starting and stopping dhcpcd, some scripts are fired off by udev as the result of devices being hotplugged (net.eth0). These scripts update status information for openrc, specifically with respect to started or stopoed services, as well as information regarding the hotplugged or scheduled state. They also need to be able to read information regarding the current runlevel of the system, also maintained by openrc.

Add interfaces to init.if

---
 policy/modules/system/init.if |   43 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)
policy/modules/system/init.if +37 -0
index ed152c4..940b91f 100644
@@ -1461,6 +1467,25 @@ interface(`init_getattr_script_status_files',`
 
 ########################################
 ## <summary>
+##	Read init script status files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_read_script_status_files',`
+	gen_require(`
+		type initrc_state_t;
+	')
+
+	list_dirs_pattern($1, initrc_state_t, initrc_state_t)
+	read_files_pattern($1, initrc_state_t, initrc_state_t)
+')
+
+########################################
+## <summary>
 ##	Do not audit attempts to read init script
 ##	status files.
 ## </summary>
@@ -1481,6 +1506,24 @@ interface(`init_dontaudit_read_script_status_files',`
 
 ########################################
 ## <summary>
+##	Manage init script status link files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_manage_script_status_lnk_files',`
+	gen_require(`
+		type initrc_state_t;
+	')
+
+	manage_lnk_files_pattern($1, initrc_state_t, initrc_state_t)
+')
+
+########################################
+## <summary>
 ##	Read init script temporary data.
 ## </summary>
 ## <param name="domain">
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/2 udev create lnk files in openrc dirs

Quoted 6 lines · Chris Richards

When starting and stopping dhcpcd, some scripts are fired off by udev as the result of devices being hotplugged (net.eth0). These scripts update status information for openrc, specifically with respect to started or stopoed services, as well as information regarding the hotplugged or scheduled state. They also need to be able to read information regarding the current runlevel of the system, also maintained by openrc.

It seems like the best course of action would actually be to have a transition to initrc_t if its running init scripts.

Quoted 62 lines

Add interfaces to init.if

---
 policy/modules/system/init.if |   43 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)
policy/modules/system/init.if +37 -0
index ed152c4..940b91f 100644
@@ -1461,6 +1467,25 @@ interface(`init_getattr_script_status_files',`
 
 ########################################
 ## <summary>
+##	Read init script status files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_read_script_status_files',`
+	gen_require(`
+		type initrc_state_t;
+	')
+
+	list_dirs_pattern($1, initrc_state_t, initrc_state_t)
+	read_files_pattern($1, initrc_state_t, initrc_state_t)
+')
+
+########################################
+## <summary>
 ##	Do not audit attempts to read init script
 ##	status files.
 ## </summary>
@@ -1481,6 +1506,24 @@ interface(`init_dontaudit_read_script_status_files',`
 
 ########################################
 ## <summary>
+##	Manage init script status link files.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`init_manage_script_status_lnk_files',`
+	gen_require(`
+		type initrc_state_t;
+	')
+
+	manage_lnk_files_pattern($1, initrc_state_t, initrc_state_t)
+')
+
+########################################
+## <summary>
 ##	Read init script temporary data.
 ## </summary>
 ## <param name="domain">
Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com