|
Dominick Grift |
59228c9 |
policy_module(bluetooth, 3.4.5)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
# Declarations
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
Dominick Grift |
a66ff9e |
attribute_role bluetooth_helper_roles;
|
|
Dominick Grift |
a66ff9e |
|
|
|
1ec3d1a |
type bluetooth_t;
|
|
|
1ec3d1a |
type bluetooth_exec_t;
|
|
|
1ec3d1a |
init_daemon_domain(bluetooth_t, bluetooth_exec_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_conf_t;
|
|
|
1ec3d1a |
files_config_file(bluetooth_conf_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_conf_rw_t;
|
|
|
1ec3d1a |
files_type(bluetooth_conf_rw_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_helper_t;
|
|
|
1ec3d1a |
type bluetooth_helper_exec_t;
|
|
|
1ec3d1a |
typealias bluetooth_helper_t alias { user_bluetooth_helper_t staff_bluetooth_helper_t sysadm_bluetooth_helper_t };
|
|
|
1ec3d1a |
typealias bluetooth_helper_t alias { auditadm_bluetooth_helper_t secadm_bluetooth_helper_t };
|
|
Chris PeBenito |
66b26ac |
userdom_user_application_domain(bluetooth_helper_t, bluetooth_helper_exec_t)
|
|
Dominick Grift |
a66ff9e |
role bluetooth_helper_roles types bluetooth_helper_t;
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_helper_tmp_t;
|
|
|
1ec3d1a |
typealias bluetooth_helper_tmp_t alias { user_bluetooth_helper_tmp_t staff_bluetooth_helper_tmp_t sysadm_bluetooth_helper_tmp_t };
|
|
|
1ec3d1a |
typealias bluetooth_helper_tmp_t alias { auditadm_bluetooth_helper_tmp_t secadm_bluetooth_helper_tmp_t };
|
|
Chris PeBenito |
66b26ac |
userdom_user_tmp_file(bluetooth_helper_tmp_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_helper_tmpfs_t;
|
|
|
1ec3d1a |
typealias bluetooth_helper_tmpfs_t alias { user_bluetooth_helper_tmpfs_t staff_bluetooth_helper_tmpfs_t sysadm_bluetooth_helper_tmpfs_t };
|
|
|
1ec3d1a |
typealias bluetooth_helper_tmpfs_t alias { auditadm_bluetooth_helper_tmpfs_t secadm_bluetooth_helper_tmpfs_t };
|
|
Chris PeBenito |
66b26ac |
userdom_user_tmpfs_file(bluetooth_helper_tmpfs_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_initrc_exec_t;
|
|
|
1ec3d1a |
init_script_file(bluetooth_initrc_exec_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_lock_t;
|
|
|
1ec3d1a |
files_lock_file(bluetooth_lock_t)
|
|
|
1ec3d1a |
|
|
Chris PeBenito |
9401ae1 |
type bluetooth_tmp_t;
|
|
Chris PeBenito |
9401ae1 |
files_tmp_file(bluetooth_tmp_t)
|
|
Chris PeBenito |
9401ae1 |
|
|
|
1ec3d1a |
type bluetooth_var_lib_t;
|
|
|
1ec3d1a |
files_type(bluetooth_var_lib_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_var_run_t;
|
|
|
1ec3d1a |
files_pid_file(bluetooth_var_run_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type bluetooth_unit_file_t;
|
|
|
1ec3d1a |
systemd_unit_file(bluetooth_unit_file_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
Dominick Grift |
a66ff9e |
# Local policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow bluetooth_t self:capability { dac_override net_bind_service net_admin net_raw setpcap sys_admin sys_tty_config ipc_lock };
|
|
|
1ec3d1a |
dontaudit bluetooth_t self:capability sys_tty_config;
|
|
|
1ec3d1a |
allow bluetooth_t self:process { getcap setcap getsched signal_perms };
|
|
|
1ec3d1a |
allow bluetooth_t self:fifo_file rw_fifo_file_perms;
|
|
|
1ec3d1a |
allow bluetooth_t self:shm create_shm_perms;
|
|
|
1ec3d1a |
allow bluetooth_t self:socket create_stream_socket_perms;
|
|
Dominick Grift |
a66ff9e |
allow bluetooth_t self:unix_stream_socket { accept connectto listen };
|
|
Dominick Grift |
a66ff9e |
allow bluetooth_t self:tcp_socket { accept listen };
|
|
|
1ec3d1a |
allow bluetooth_t self:netlink_kobject_uevent_socket create_socket_perms;
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
read_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
|
|
|
1ec3d1a |
manage_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
|
|
|
1ec3d1a |
manage_lnk_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
|
|
|
1ec3d1a |
manage_fifo_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
|
|
|
1ec3d1a |
manage_sock_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
|
|
|
1ec3d1a |
filetrans_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t, { dir file lnk_file sock_file fifo_file })
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow bluetooth_t bluetooth_lock_t:file manage_file_perms;
|
|
|
1ec3d1a |
files_lock_filetrans(bluetooth_t, bluetooth_lock_t, file)
|
|
|
1ec3d1a |
|
|
Chris PeBenito |
9401ae1 |
manage_dirs_pattern(bluetooth_t, bluetooth_tmp_t, bluetooth_tmp_t)
|
|
Chris PeBenito |
9401ae1 |
manage_files_pattern(bluetooth_t, bluetooth_tmp_t, bluetooth_tmp_t)
|
|
Dominick Grift |
a66ff9e |
files_tmp_filetrans(bluetooth_t, bluetooth_tmp_t, { dir file })
|
|
Chris PeBenito |
9401ae1 |
|
|
|
1ec3d1a |
manage_dirs_pattern(bluetooth_t, bluetooth_var_lib_t, bluetooth_var_lib_t)
|
|
|
1ec3d1a |
manage_files_pattern(bluetooth_t, bluetooth_var_lib_t, bluetooth_var_lib_t)
|
|
|
1ec3d1a |
files_var_lib_filetrans(bluetooth_t, bluetooth_var_lib_t, { dir file } )
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_files_pattern(bluetooth_t, bluetooth_var_run_t, bluetooth_var_run_t)
|
|
|
1ec3d1a |
manage_sock_files_pattern(bluetooth_t, bluetooth_var_run_t, bluetooth_var_run_t)
|
|
|
1ec3d1a |
files_pid_filetrans(bluetooth_t, bluetooth_var_run_t, { file sock_file })
|
|
|
1ec3d1a |
|
|
Dominick Grift |
a66ff9e |
can_exec(bluetooth_t, bluetooth_helper_exec_t)
|
|
Dominick Grift |
a66ff9e |
|
|
|
2e739f7 |
corecmd_exec_bin(bluetooth_t)
|
|
|
2e739f7 |
corecmd_exec_shell(bluetooth_t)
|
|
|
2e739f7 |
|
|
|
1ec3d1a |
kernel_read_kernel_sysctls(bluetooth_t)
|
|
|
1ec3d1a |
kernel_read_system_state(bluetooth_t)
|
|
|
1ec3d1a |
kernel_read_network_state(bluetooth_t)
|
|
|
1ec3d1a |
kernel_request_load_module(bluetooth_t)
|
|
|
1ec3d1a |
kernel_search_debugfs(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
corenet_all_recvfrom_netlabel(bluetooth_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_generic_if(bluetooth_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_generic_if(bluetooth_t)
|
|
|
1ec3d1a |
corenet_raw_sendrecv_generic_if(bluetooth_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_generic_node(bluetooth_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_generic_node(bluetooth_t)
|
|
|
1ec3d1a |
corenet_raw_sendrecv_generic_node(bluetooth_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_all_ports(bluetooth_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_all_ports(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
dev_read_sysfs(bluetooth_t)
|
|
|
1ec3d1a |
dev_rw_usbfs(bluetooth_t)
|
|
|
1ec3d1a |
dev_rw_generic_usb_dev(bluetooth_t)
|
|
|
1ec3d1a |
dev_read_urand(bluetooth_t)
|
|
|
1ec3d1a |
dev_rw_input_dev(bluetooth_t)
|
|
|
1ec3d1a |
dev_rw_wireless(bluetooth_t)
|
|
|
1ec3d1a |
|
|
Chris PeBenito |
9401ae1 |
domain_use_interactive_fds(bluetooth_t)
|
|
Chris PeBenito |
9401ae1 |
domain_dontaudit_search_all_domains_state(bluetooth_t)
|
|
Chris PeBenito |
9401ae1 |
|
|
Chris PeBenito |
9401ae1 |
files_read_etc_runtime_files(bluetooth_t)
|
|
Chris PeBenito |
9401ae1 |
|
|
|
1ec3d1a |
fs_getattr_all_fs(bluetooth_t)
|
|
|
1ec3d1a |
fs_search_auto_mountpoints(bluetooth_t)
|
|
|
1ec3d1a |
fs_list_inotifyfs(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
term_use_unallocated_ttys(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
auth_use_nsswitch(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_send_syslog_msg(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
miscfiles_read_fonts(bluetooth_t)
|
|
|
1ec3d1a |
miscfiles_read_hwdata(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_dontaudit_use_unpriv_user_fds(bluetooth_t)
|
|
|
1ec3d1a |
userdom_dontaudit_use_user_terminals(bluetooth_t)
|
|
|
1ec3d1a |
userdom_dontaudit_search_user_home_dirs(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
dbus_system_bus_client(bluetooth_t)
|
|
|
eb190a5 |
dbus_connect_system_bus(bluetooth_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
cups_dbus_chat(bluetooth_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
Dominick Grift |
a66ff9e |
devicekit_dbus_chat_power(bluetooth_t)
|
|
Dominick Grift |
a66ff9e |
')
|
|
Dominick Grift |
a66ff9e |
|
|
Dominick Grift |
a66ff9e |
optional_policy(`
|
|
|
1ec3d1a |
hal_dbus_chat(bluetooth_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
networkmanager_dbus_chat(bluetooth_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
pulseaudio_dbus_chat(bluetooth_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
seutil_sigchld_newrole(bluetooth_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
udev_read_db(bluetooth_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
ppp_domtrans(bluetooth_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
Dominick Grift |
a66ff9e |
# Helper local policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow bluetooth_helper_t self:capability sys_nice;
|
|
|
1ec3d1a |
allow bluetooth_helper_t self:process getsched;
|
|
|
1ec3d1a |
allow bluetooth_helper_t self:fifo_file rw_fifo_file_perms;
|
|
|
1ec3d1a |
allow bluetooth_helper_t self:shm create_shm_perms;
|
|
Dominick Grift |
a66ff9e |
allow bluetooth_helper_t self:unix_stream_socket { accept connectto listen };
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow bluetooth_helper_t bluetooth_t:socket { read write };
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(bluetooth_helper_t, bluetooth_helper_tmp_t, bluetooth_helper_tmp_t)
|
|
|
1ec3d1a |
manage_files_pattern(bluetooth_helper_t, bluetooth_helper_tmp_t, bluetooth_helper_tmp_t)
|
|
|
1ec3d1a |
manage_sock_files_pattern(bluetooth_helper_t, bluetooth_helper_tmp_t, bluetooth_helper_tmp_t)
|
|
Dominick Grift |
a66ff9e |
files_tmp_filetrans(bluetooth_helper_t, bluetooth_helper_tmp_t, { dir file sock_file })
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(bluetooth_helper_t, bluetooth_helper_tmpfs_t, bluetooth_helper_tmpfs_t)
|
|
|
1ec3d1a |
manage_files_pattern(bluetooth_helper_t, bluetooth_helper_tmpfs_t, bluetooth_helper_tmpfs_t)
|
|
|
1ec3d1a |
fs_tmpfs_filetrans(bluetooth_helper_t, bluetooth_helper_tmpfs_t, { dir file })
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
kernel_read_system_state(bluetooth_helper_t)
|
|
|
1ec3d1a |
kernel_read_kernel_sysctls(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
corecmd_exec_bin(bluetooth_helper_t)
|
|
|
1ec3d1a |
corecmd_exec_shell(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
Dominick Grift |
a66ff9e |
dev_read_urand(bluetooth_helper_t)
|
|
Dominick Grift |
a66ff9e |
|
|
|
1ec3d1a |
domain_read_all_domains_state(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
files_read_etc_runtime_files(bluetooth_helper_t)
|
|
|
1ec3d1a |
files_dontaudit_list_default(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
Dominick Grift |
a66ff9e |
term_dontaudit_use_all_ttys(bluetooth_helper_t)
|
|
Dominick Grift |
a66ff9e |
|
|
|
1ec3d1a |
auth_use_nsswitch(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
locallogin_dontaudit_use_fds(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_send_syslog_msg(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
Chris PeBenito |
9401ae1 |
miscfiles_read_localization(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
bluetooth_dbus_chat(bluetooth_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
dbus_system_bus_client(bluetooth_helper_t)
|
|
|
1ec3d1a |
dbus_connect_system_bus(bluetooth_helper_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
xserver_user_x_domain_template(bluetooth_helper, bluetooth_helper_t, bluetooth_helper_tmpfs_t)
|
|
|
1ec3d1a |
')
|