From: david@hardeman.nu
To: selinux@tycho.nsa.gov
Cc: dwalsh@redhat.com, cpebenito@tresys.com
Subject: [refpolicy-patch 15/23] soundserver policy update
Date: Sat, 19 Jul 2008 22:50:17 +0200 [thread overview]
Message-ID: <20080719210253.454830587@hardeman.nu> (raw)
In-Reply-To: 20080719205002.462190042@hardeman.nu
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5708 bytes --]
This policy was written by Ken Yang and reviewed by Dan Walsh:
http://marc.info/?l=fedora-selinux-list&m=118561164825982&w=2
and here:
https://bugzilla.redhat.com/show_bug.cgi?id=250453
I updated the .fc changes to also work with Debian paths.
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/soundserver.fc serefpolicy-3.5.0/policy/modules/services/soundserver.fc
--- nsaserefpolicy/policy/modules/services/soundserver.fc 2008-06-12 23:25:05.000000000 -0400
+++ serefpolicy-3.5.0/policy/modules/services/soundserver.fc 2008-07-15 14:05:13.000000000 -0400
@@ -7,4 +7,8 @@
/usr/sbin/yiff -- gen_context(system_u:object_r:soundd_exec_t,s0)
/var/run/yiff-[0-9]+\.pid -- gen_context(system_u:object_r:soundd_var_run_t,s0)
+/var/run/nasd(/.*)? gen_context(system_u:object_r:soundd_var_run_t,s0)
+
/var/state/yiff(/.*)? gen_context(system_u:object_r:soundd_state_t,s0)
+
+/etc/(rc.d/)?init.d/nas(d)? -- gen_context(system_u:object_r:soundd_script_exec_t,s0)
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/soundserver.if serefpolicy-3.5.0/policy/modules/services/soundserver.if
--- nsaserefpolicy/policy/modules/services/soundserver.if 2008-06-12 23:25:05.000000000 -0400
+++ serefpolicy-3.5.0/policy/modules/services/soundserver.if 2008-07-15 14:05:13.000000000 -0400
@@ -13,3 +13,74 @@
interface(`soundserver_tcp_connect',`
refpolicywarn(`$0($*) has been deprecated.')
')
+
+########################################
+## <summary>
+## Execute soundd server in the soundd domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## The type of the process performing this action.
+## </summary>
+## </param>
+#
+#
+interface(`soundserver_script_domtrans',`
+ gen_require(`
+ type soundd_script_exec_t;
+ ')
+
+ init_script_domtrans_spec($1,soundd_script_exec_t)
+')
+
+########################################
+## <summary>
+## All of the rules required to administrate
+## an soundd environment
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+## <param name="role">
+## <summary>
+## The role to be allowed to manage the soundd domain.
+## </summary>
+## </param>
+## <param name="terminal">
+## <summary>
+## The type of the user terminal.
+## </summary>
+## </param>
+## <rolecap/>
+#
+interface(`soundserver_admin',`
+ gen_require(`
+ type soundd_t;
+ type soundd_script_exec_t;
+ type soundd_etc_t;
+ type soundd_tmp_t;
+ type soundd_var_run_t;
+ ')
+
+ allow $1 soundd_t:process { ptrace signal_perms getattr };
+ read_files_pattern($1, soundd_t, soundd_t)
+
+ # Allow soundd_t to restart the apache service
+ soundserver_script_domtrans($1)
+ domain_system_change_exemption($1)
+ role_transition $2 soundd_script_exec_t system_r;
+ allow $2 system_r;
+
+ files_list_tmp($1)
+ manage_all_pattern($1,soundd_tmp_t)
+
+ files_list_etc($1)
+ manage_all_pattern($1,soundd_etc_t)
+
+ files_list_pids($1)
+ manage_all_pattern($1,soundd_var_run_t)
+')
+
+
diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/soundserver.te serefpolicy-3.5.0/policy/modules/services/soundserver.te
--- nsaserefpolicy/policy/modules/services/soundserver.te 2008-07-10 11:38:46.000000000 -0400
+++ serefpolicy-3.5.0/policy/modules/services/soundserver.te 2008-07-15 14:05:13.000000000 -0400
@@ -10,9 +10,6 @@
type soundd_exec_t;
init_daemon_domain(soundd_t,soundd_exec_t)
-type soundd_etc_t alias etc_soundd_t;
-files_type(soundd_etc_t)
-
type soundd_state_t;
files_type(soundd_state_t)
@@ -26,21 +23,30 @@
type soundd_var_run_t;
files_pid_file(soundd_var_run_t)
+type soundd_etc_t;
+files_config_file(soundd_etc_t)
+
+type soundd_script_exec_t;
+init_script_type(soundd_script_exec_t)
+
########################################
#
-# Declarations
+# sound server local policy
#
+allow soundd_t self:capability dac_override;
dontaudit soundd_t self:capability sys_tty_config;
allow soundd_t self:process { setpgid signal_perms };
allow soundd_t self:tcp_socket create_stream_socket_perms;
allow soundd_t self:udp_socket create_socket_perms;
+allow soundd_t self:unix_stream_socket { connectto create_stream_socket_perms };
+
+fs_getattr_all_fs(soundd_t)
+
# for yiff
allow soundd_t self:shm create_shm_perms;
-allow soundd_t soundd_etc_t:dir list_dir_perms;
-allow soundd_t soundd_etc_t:file read_file_perms;
-allow soundd_t soundd_etc_t:lnk_file { getattr read };
+read_files_pattern(soundd_t,soundd_etc_t,soundd_etc_t)
manage_files_pattern(soundd_t,soundd_state_t,soundd_state_t)
manage_lnk_files_pattern(soundd_t,soundd_state_t,soundd_state_t)
@@ -55,8 +61,10 @@
manage_sock_files_pattern(soundd_t,soundd_tmpfs_t,soundd_tmpfs_t)
fs_tmpfs_filetrans(soundd_t,soundd_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
+manage_sock_files_pattern(soundd_t,soundd_var_run_t,soundd_var_run_t)
manage_files_pattern(soundd_t,soundd_var_run_t,soundd_var_run_t)
-files_pid_filetrans(soundd_t,soundd_var_run_t,file)
+manage_dirs_pattern(soundd_t,soundd_var_run_t,soundd_var_run_t)
+files_pid_filetrans(soundd_t,soundd_var_run_t,{ file dir })
kernel_read_kernel_sysctls(soundd_t)
kernel_list_proc(soundd_t)
@@ -96,10 +104,13 @@
sysnet_read_config(soundd_t)
userdom_dontaudit_use_unpriv_user_fds(soundd_t)
-
sysadm_dontaudit_search_home_dirs(soundd_t)
optional_policy(`
+ alsa_domtrans(soundd_t)
+')
+
+optional_policy(`
seutil_sigchld_newrole(soundd_t)
')
--
David Härdeman
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2008-07-19 21:04 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-19 20:50 [refpolicy-patch 00/23] Cherry-picks from Fedora SELinux patch david
2008-07-19 20:50 ` [refpolicy-patch 01/23] slocate policy update david
2008-07-19 20:50 ` [refpolicy-patch 02/23] anaconda " david
2008-07-20 5:53 ` Russell Coker
2008-07-22 10:16 ` Daniel J Walsh
2008-07-22 20:36 ` Chris PeBenito
2008-07-19 20:50 ` [refpolicy-patch 03/23] unconfined_u policy updates david
2008-07-19 20:50 ` [refpolicy-patch 04/23] kismet policy update david
2008-07-19 20:50 ` [refpolicy-patch 05/23] kudzu " david
2008-07-19 20:50 ` [refpolicy-patch 06/23] logrotate " david
2008-07-28 15:18 ` Chris PeBenito
2008-07-28 16:35 ` Daniel J Walsh
2008-07-19 20:50 ` [refpolicy-patch 07/23] corenetwork " david
2008-07-22 10:18 ` Daniel J Walsh
2008-07-19 20:50 ` [refpolicy-patch 08/23] secadm " david
2008-07-19 20:50 ` [refpolicy-patch 09/23] apm " david
2008-07-19 20:50 ` [refpolicy-patch 10/23] courier " david
2008-07-19 20:50 ` [refpolicy-patch 11/23] cpucontrol " david
2008-07-22 20:25 ` Chris PeBenito
2008-07-24 12:23 ` Daniel J Walsh
2008-07-19 20:50 ` [refpolicy-patch 12/23] openca " david
2008-07-19 20:50 ` [refpolicy-patch 13/23] portslave " david
2008-07-25 0:00 ` Chris PeBenito
2008-07-19 20:50 ` [refpolicy-patch 14/23] rhgb " david
2008-07-22 20:29 ` Chris PeBenito
2008-07-24 0:24 ` Daniel J Walsh
2008-07-24 23:44 ` Chris PeBenito
2008-07-25 1:25 ` Daniel J Walsh
2008-07-19 20:50 ` david [this message]
2008-07-28 12:37 ` [refpolicy-patch 15/23] soundserver " Chris PeBenito
2008-07-19 20:50 ` [refpolicy-patch 16/23] w3c policy addition david
2008-07-19 20:50 ` [refpolicy-patch 17/23] logging policy update david
2008-07-19 20:50 ` [refpolicy-patch 18/23] miscfiles " david
2008-07-25 12:14 ` Chris PeBenito
2008-07-19 20:50 ` [refpolicy-patch 19/23] netlabel " david
2008-07-25 12:14 ` Chris PeBenito
2008-07-19 20:50 ` [refpolicy-patch 20/23] pcmcia " david
2008-07-22 20:32 ` Chris PeBenito
2008-07-19 20:50 ` [refpolicy-patch 21/23] raid " david
2008-07-25 12:14 ` Chris PeBenito
2008-07-19 20:50 ` [refpolicy-patch 22/23] xen " david
2008-07-19 20:50 ` [refpolicy-patch 23/23] qemu " david
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080719210253.454830587@hardeman.nu \
--to=david@hardeman.nu \
--cc=cpebenito@tresys.com \
--cc=dwalsh@redhat.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.