2009-07-21 14:05:38 +00:00
|
|
|
|
2010-02-16 20:13:08 +00:00
|
|
|
policy_module(pulseaudio, 1.1.1)
|
2009-07-21 14:05:38 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type pulseaudio_t;
|
|
|
|
type pulseaudio_exec_t;
|
2010-03-23 19:51:04 +00:00
|
|
|
init_daemon_domain(pulseaudio_t, pulseaudio_exec_t)
|
2009-07-21 14:05:38 +00:00
|
|
|
application_domain(pulseaudio_t, pulseaudio_exec_t)
|
|
|
|
role system_r types pulseaudio_t;
|
|
|
|
|
2010-03-23 19:51:04 +00:00
|
|
|
type pulseaudio_home_t;
|
|
|
|
userdom_user_home_content(pulseaudio_home_t)
|
|
|
|
|
|
|
|
type pulseaudio_tmpfs_t;
|
|
|
|
files_tmpfs_file(pulseaudio_tmpfs_t)
|
|
|
|
|
|
|
|
type pulseaudio_var_lib_t;
|
|
|
|
files_type(pulseaudio_var_lib_t)
|
|
|
|
|
|
|
|
type pulseaudio_var_run_t;
|
|
|
|
files_pid_file(pulseaudio_var_run_t)
|
|
|
|
|
2009-07-21 14:05:38 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# pulseaudio local policy
|
|
|
|
#
|
2010-03-23 19:51:04 +00:00
|
|
|
allow pulseaudio_t self:capability { fowner fsetid chown setgid setuid sys_nice sys_resource sys_tty_config };
|
2009-07-21 14:05:38 +00:00
|
|
|
allow pulseaudio_t self:process { getcap setcap setrlimit setsched getsched signal signull };
|
|
|
|
allow pulseaudio_t self:fifo_file rw_file_perms;
|
2010-03-23 19:51:04 +00:00
|
|
|
allow pulseaudio_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
2009-07-21 14:05:38 +00:00
|
|
|
allow pulseaudio_t self:unix_dgram_socket { sendto create_socket_perms };
|
|
|
|
allow pulseaudio_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow pulseaudio_t self:udp_socket create_socket_perms;
|
2009-08-31 14:07:57 +00:00
|
|
|
allow pulseaudio_t self:netlink_kobject_uevent_socket create_socket_perms;
|
2009-07-21 14:05:38 +00:00
|
|
|
|
2010-03-23 19:51:04 +00:00
|
|
|
userdom_search_user_home_dirs(pulseaudio_t)
|
|
|
|
manage_dirs_pattern(pulseaudio_t, pulseaudio_home_t, pulseaudio_home_t)
|
|
|
|
manage_files_pattern(pulseaudio_t, pulseaudio_home_t, pulseaudio_home_t)
|
|
|
|
|
|
|
|
manage_dirs_pattern(pulseaudio_t, pulseaudio_var_lib_t, pulseaudio_var_lib_t)
|
|
|
|
manage_files_pattern(pulseaudio_t, pulseaudio_var_lib_t, pulseaudio_var_lib_t)
|
|
|
|
files_var_lib_filetrans(pulseaudio_t, pulseaudio_var_lib_t, { dir file })
|
|
|
|
|
|
|
|
manage_dirs_pattern(pulseaudio_t, pulseaudio_var_run_t, pulseaudio_var_run_t)
|
|
|
|
manage_files_pattern(pulseaudio_t, pulseaudio_var_run_t, pulseaudio_var_run_t)
|
|
|
|
manage_sock_files_pattern(pulseaudio_t, pulseaudio_var_run_t, pulseaudio_var_run_t)
|
|
|
|
files_pid_filetrans(pulseaudio_t, pulseaudio_var_run_t, { dir file })
|
|
|
|
|
2009-08-31 14:07:57 +00:00
|
|
|
can_exec(pulseaudio_t, pulseaudio_exec_t)
|
|
|
|
|
2010-03-23 19:51:04 +00:00
|
|
|
kernel_getattr_proc(pulseaudio_t)
|
2009-08-31 14:07:57 +00:00
|
|
|
kernel_read_system_state(pulseaudio_t)
|
2009-07-21 14:05:38 +00:00
|
|
|
kernel_read_kernel_sysctls(pulseaudio_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(pulseaudio_t)
|
|
|
|
|
|
|
|
corenet_all_recvfrom_unlabeled(pulseaudio_t)
|
|
|
|
corenet_all_recvfrom_netlabel(pulseaudio_t)
|
|
|
|
corenet_tcp_bind_pulseaudio_port(pulseaudio_t)
|
|
|
|
corenet_tcp_bind_soundd_port(pulseaudio_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(pulseaudio_t)
|
|
|
|
corenet_tcp_sendrecv_generic_node(pulseaudio_t)
|
|
|
|
corenet_udp_bind_sap_port(pulseaudio_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(pulseaudio_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(pulseaudio_t)
|
|
|
|
|
|
|
|
dev_read_sound(pulseaudio_t)
|
|
|
|
dev_write_sound(pulseaudio_t)
|
|
|
|
dev_read_sysfs(pulseaudio_t)
|
|
|
|
dev_read_urand(pulseaudio_t)
|
|
|
|
|
|
|
|
files_read_etc_files(pulseaudio_t)
|
|
|
|
files_read_usr_files(pulseaudio_t)
|
|
|
|
|
|
|
|
fs_rw_anon_inodefs_files(pulseaudio_t)
|
|
|
|
fs_getattr_tmpfs(pulseaudio_t)
|
2009-08-31 14:07:57 +00:00
|
|
|
fs_list_inotifyfs(pulseaudio_t)
|
2009-07-21 14:05:38 +00:00
|
|
|
|
2010-02-11 19:20:10 +00:00
|
|
|
term_use_all_ttys(pulseaudio_t)
|
|
|
|
term_use_all_ptys(pulseaudio_t)
|
2009-07-21 14:05:38 +00:00
|
|
|
|
|
|
|
auth_use_nsswitch(pulseaudio_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(pulseaudio_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(pulseaudio_t)
|
|
|
|
|
2010-02-16 20:13:08 +00:00
|
|
|
optional_policy(`
|
|
|
|
bluetooth_stream_connect(pulseaudio_t)
|
|
|
|
')
|
|
|
|
|
2009-07-21 14:05:38 +00:00
|
|
|
optional_policy(`
|
2010-03-23 19:51:04 +00:00
|
|
|
dbus_system_domain(pulseaudio_t, pulseaudio_exec_t)
|
2009-07-21 14:05:38 +00:00
|
|
|
dbus_system_bus_client(pulseaudio_t)
|
|
|
|
dbus_session_bus_client(pulseaudio_t)
|
2010-02-16 20:13:08 +00:00
|
|
|
dbus_connect_session_bus(pulseaudio_t)
|
2009-07-21 14:05:38 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
consolekit_dbus_chat(pulseaudio_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
hal_dbus_chat(pulseaudio_t)
|
|
|
|
')
|
2009-08-31 14:07:57 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
policykit_dbus_chat(pulseaudio_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
rpm_dbus_chat(pulseaudio_t)
|
|
|
|
')
|
2009-07-21 14:05:38 +00:00
|
|
|
')
|
|
|
|
|
2010-03-23 19:51:04 +00:00
|
|
|
optional_policy(`
|
|
|
|
rtkit_scheduled(pulseaudio_t)
|
|
|
|
')
|
|
|
|
|
2009-07-21 14:05:38 +00:00
|
|
|
optional_policy(`
|
|
|
|
policykit_domtrans_auth(pulseaudio_t)
|
|
|
|
policykit_read_lib(pulseaudio_t)
|
|
|
|
policykit_read_reload(pulseaudio_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
udev_read_db(pulseaudio_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
2010-03-23 19:51:04 +00:00
|
|
|
xserver_stream_connect(pulseaudio_t)
|
2009-07-21 14:05:38 +00:00
|
|
|
xserver_manage_xdm_tmp_files(pulseaudio_t)
|
|
|
|
xserver_read_xdm_lib_files(pulseaudio_t)
|
2010-03-23 19:51:04 +00:00
|
|
|
xserver_read_xdm_pid(pulseaudio_t)
|
|
|
|
xserver_user_x_domain_template(pulseaudio, pulseaudio_t, pulseaudio_tmpfs_t)
|
2009-07-21 14:05:38 +00:00
|
|
|
')
|