Skip to contentSkip to conversation

Implement Icecast policy.

PATCH New Dominick Grift 1 participant 1 message Mar 22, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Implement Icecast policy.

Whilst merging Fedoras'Icecast policy into my custom policy based off of refpolicy i made some changes to the policy. Most changes are style related and all changes are purely theory. I have not tested it but it does build.

I decided to submit my version in hopes that it increases chances of swift inclusion.

---
:100644 100644 2648a1f... ba87caa... M policy/modules/admin/logrotate.te
:100644 100644 afcb9bd... ff58b42... M policy/modules/services/apache.fc
:000000 100644 0000000... 9832cf3... A policy/modules/services/icecast.fc
:000000 100644 0000000... d8befa6... A policy/modules/services/icecast.if
:000000 100644 0000000... 87ef543... A policy/modules/services/icecast.te
:100644 100644 d536c01... 96f8504... M policy/modules/services/rtkit.if

 policy/modules/admin/logrotate.te  |    4 +
 policy/modules/services/apache.fc  |    1 +
 policy/modules/services/icecast.fc |    7 ++
 policy/modules/services/icecast.if |  206 ++++++++++++++++++++++++++++++++++++
 policy/modules/services/icecast.te |   61 +++++++++++
 policy/modules/services/rtkit.if   |   21 ++++
 6 files changed, 300 insertions(+), 0 deletions(-)
policy/modules/admin/logrotate.te +4 -0
index 2648a1f..ba87caa 100644
@@ -161,6 +161,10 @@ optional_policy(`
 ')
 
 optional_policy(`
+	icecast_signal(logrotate_t)
+')
+
+optional_policy(`
 	samba_exec_log(logrotate_t)
 ')
 
policy/modules/services/apache.fc +1 -0
index afcb9bd..ff58b42 100644
@@ -33,6 +33,7 @@ ifdef(`distro_suse', `
 ')
 
 /usr/share/htdig(/.*)?			gen_context(system_u:object_r:httpd_sys_content_t,s0)
+/usr/share/icecast(/.*)?		gen_context(system_u:object_r:httpd_sys_content_t,s0)
 /usr/share/openca/htdocs(/.*)?		gen_context(system_u:object_r:httpd_sys_content_t,s0)
 /usr/share/selinux-policy[^/]*/html(/.*)? gen_context(system_u:object_r:httpd_sys_content_t,s0)
 
policy/modules/services/icecast.fc new file +7 -0
new file mode 100644
index 0000000..9832cf3
@@ -0,0 +1,7 @@
+/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)
+
+/var/log/icecast(/.*)?			gen_context(system_u:object_r:icecast_var_log_t,s0)
+
+/var/run/icecast(/.*)?			gen_context(system_u:object_r:icecast_var_run_t,s0)
policy/modules/services/icecast.if new file +206 -0

206 lines not on this page · raw message

policy/modules/services/icecast.te new file +61 -0

61 lines not on this page · raw message

policy/modules/services/rtkit.if +21 -0
index d536c01..96f8504 100644
@@ -38,3 +38,24 @@ interface(`rtkit_daemon_dbus_chat',`
 	allow $1 rtkit_daemon_t:dbus send_msg;
 	allow rtkit_daemon_t $1:dbus send_msg;
 ')
+
+########################################
+## <summary>
+##	Allow rtkit to control scheduling
+##	for your process.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`rtkit_daemon_system_domain',`
+	gen_require(`
+		type rtkit_daemon_t;
+	')
+
+	ps_process_pattern(rtkit_daemon_t, $1)
+	allow rtkit_daemon_t $1:process { getsched setsched };
+	rtkit_daemon_dbus_chat($1)
+')
Signature · 9 lines
1.7.0.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100322/2d621b72/attachment.bin