[selinux-policy: 2561/3172] Minor tweaks on icecast.

Daniel J Walsh dwalsh at fedoraproject.org
Thu Oct 7 22:47:37 UTC 2010


commit 340af119b0d0efa4b47cf313addeb2c5c655638a
Author: Chris PeBenito <cpebenito at tresys.com>
Date:   Mon Mar 22 08:56:32 2010 -0400

    Minor tweaks on icecast.

 policy/modules/services/icecast.fc |    1 -
 policy/modules/services/icecast.if |   46 ++++++++++++++++-------------------
 policy/modules/services/icecast.te |   15 +++++------
 3 files changed, 28 insertions(+), 34 deletions(-)
---
diff --git a/policy/modules/services/icecast.fc b/policy/modules/services/icecast.fc
index 3f1a6c2..a81e090 100644
--- a/policy/modules/services/icecast.fc
+++ b/policy/modules/services/icecast.fc
@@ -1,4 +1,3 @@
-
 /etc/rc\.d/init\.d/icecast	--	gen_context(system_u:object_r:icecast_initrc_exec_t,s0)
 
 /usr/bin/icecast		--	gen_context(system_u:object_r:icecast_exec_t,s0)
diff --git a/policy/modules/services/icecast.if b/policy/modules/services/icecast.if
index 8e6759d..96ab892 100644
--- a/policy/modules/services/icecast.if
+++ b/policy/modules/services/icecast.if
@@ -1,4 +1,3 @@
-
 ## <summary> ShoutCast compatible streaming media server</summary>
 
 ########################################
@@ -21,6 +20,24 @@ interface(`icecast_domtrans',`
 
 ########################################
 ## <summary>
+##	Allow domain signal icecast
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`icecast_signal',`
+	gen_require(`
+		type icecast_t;
+	')
+
+	allow $1 icecast_t:process signal;
+')
+
+########################################
+## <summary>
 ##	Execute icecast server in the icecast domain.
 ## </summary>
 ## <param name="domain">
@@ -131,32 +148,12 @@ interface(`icecast_manage_log',`
 	')
 
 	logging_search_logs($1)
-	manage_dirs_pattern($1, icecast_log_t, icecast_log_t)
 	manage_files_pattern($1, icecast_log_t, icecast_log_t)
-	manage_lnk_files_pattern($1, icecast_log_t, icecast_log_t)
 ')
 
 ########################################
 ## <summary>
-##	Allow domain signal icecast 
-## </summary>
-## <param name="domain">
-##	<summary>
-##	Domain allowed access.
-##	</summary>
-## </param>
-#
-interface(`icecast_signal',`
-	gen_require(`
-		type icecast_t;
-	')
-
-	allow $1 icecast_t:process signal;
-')
-
-########################################
-## <summary>
-##	All of the rules required to administrate 
+##	All of the rules required to administrate
 ##	an icecast environment
 ## </summary>
 ## <param name="domain">
@@ -176,9 +173,8 @@ interface(`icecast_admin',`
 		type icecast_t, icecast_initrc_exec_t;
 	')
 
-	allow $1 icecast_t:process { ptrace signal_perms getattr };
-	read_files_pattern($1, icecast_t, icecast_t)
-	        
+	ps_process_pattern($1, icecast_t)
+
 	# Allow icecast_t to restart the apache service
 	icecast_initrc_domtrans($1)
 	domain_system_change_exemption($1)
diff --git a/policy/modules/services/icecast.te b/policy/modules/services/icecast.te
index 87159be..71984e4 100644
--- a/policy/modules/services/icecast.te
+++ b/policy/modules/services/icecast.te
@@ -1,4 +1,5 @@
-policy_module(icecast,1.0.0)
+
+policy_module(icecast, 1.0.0)
 
 ########################################
 #
@@ -25,18 +26,16 @@ logging_log_file(icecast_log_t)
 
 allow icecast_t self:capability { dac_override setgid setuid sys_nice };
 allow icecast_t self:process { getsched fork setsched signal };
-
-# internal communication is often done using fifo and unix sockets.
 allow icecast_t self:fifo_file rw_fifo_file_perms;
 allow icecast_t self:unix_stream_socket create_stream_socket_perms;
 allow icecast_t self:tcp_socket create_stream_socket_perms;
 
-manage_dirs_pattern(icecast_t, icecast_log_t,  icecast_log_t)
-manage_files_pattern(icecast_t, icecast_log_t,  icecast_log_t)
+manage_dirs_pattern(icecast_t, icecast_log_t, icecast_log_t)
+manage_files_pattern(icecast_t, icecast_log_t, icecast_log_t)
 logging_log_filetrans(icecast_t, icecast_log_t, { file dir } )
 
-manage_dirs_pattern(icecast_t, icecast_var_run_t,  icecast_var_run_t)
-manage_files_pattern(icecast_t, icecast_var_run_t,  icecast_var_run_t)
+manage_dirs_pattern(icecast_t, icecast_var_run_t, icecast_var_run_t)
+manage_files_pattern(icecast_t, icecast_var_run_t, icecast_var_run_t)
 files_pid_filetrans(icecast_t, icecast_var_run_t, { file dir })
 
 corenet_tcp_bind_soundd_port(icecast_t)
@@ -53,5 +52,5 @@ miscfiles_read_localization(icecast_t)
 sysnet_dns_name_resolve(icecast_t)
 
 optional_policy(`
-         rtkit_schedule(icecast_t)
+	rtkit_schedule(icecast_t)
 ')


More information about the scm-commits mailing list