Chris PeBenito 17de1b
Chris PeBenito c12621
policy_module(bluetooth, 3.1.2)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
type bluetooth_t;
Chris PeBenito 17de1b
type bluetooth_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(bluetooth_t, bluetooth_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type bluetooth_conf_t;
Chris PeBenito 17de1b
files_type(bluetooth_conf_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type bluetooth_conf_rw_t;
Chris PeBenito 17de1b
files_type(bluetooth_conf_rw_t)
Chris PeBenito 17de1b
Chris PeBenito 296273
type bluetooth_helper_t;
Chris PeBenito 350b6a
type bluetooth_helper_exec_t;
Chris PeBenito 296273
typealias bluetooth_helper_t alias { user_bluetooth_helper_t staff_bluetooth_helper_t sysadm_bluetooth_helper_t };
Chris PeBenito 296273
typealias bluetooth_helper_t alias { auditadm_bluetooth_helper_t secadm_bluetooth_helper_t };
Chris PeBenito 296273
application_domain(bluetooth_helper_t, bluetooth_helper_exec_t)
Chris PeBenito 296273
ubac_constrained(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
type bluetooth_helper_tmp_t;
Chris PeBenito 296273
typealias bluetooth_helper_tmp_t alias { user_bluetooth_helper_tmp_t staff_bluetooth_helper_tmp_t sysadm_bluetooth_helper_tmp_t };
Chris PeBenito 296273
typealias bluetooth_helper_tmp_t alias { auditadm_bluetooth_helper_tmp_t secadm_bluetooth_helper_tmp_t };
Chris PeBenito 296273
files_tmp_file(bluetooth_helper_tmp_t)
Chris PeBenito 296273
ubac_constrained(bluetooth_helper_tmp_t)
Chris PeBenito 296273
Chris PeBenito 296273
type bluetooth_helper_tmpfs_t;
Chris PeBenito 296273
typealias bluetooth_helper_tmpfs_t alias { user_bluetooth_helper_tmpfs_t staff_bluetooth_helper_tmpfs_t sysadm_bluetooth_helper_tmpfs_t };
Chris PeBenito 296273
typealias bluetooth_helper_tmpfs_t alias { auditadm_bluetooth_helper_tmpfs_t secadm_bluetooth_helper_tmpfs_t };
Chris PeBenito 296273
files_tmpfs_file(bluetooth_helper_tmpfs_t)
Chris PeBenito 296273
ubac_constrained(bluetooth_helper_tmpfs_t)
Chris PeBenito 17de1b
Chris PeBenito fcee22
type bluetooth_initrc_exec_t;
Chris PeBenito fcee22
init_script_file(bluetooth_initrc_exec_t)
Chris PeBenito fcee22
Chris PeBenito 17de1b
type bluetooth_lock_t;
Chris PeBenito 17de1b
files_lock_file(bluetooth_lock_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type bluetooth_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(bluetooth_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type bluetooth_var_lib_t;
Chris PeBenito 17de1b
files_type(bluetooth_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type bluetooth_var_run_t;
Chris PeBenito 17de1b
files_pid_file(bluetooth_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Bluetooth services local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito fcee22
allow bluetooth_t self:capability { dac_override net_bind_service net_admin net_raw sys_tty_config ipc_lock };
Chris PeBenito 17de1b
dontaudit bluetooth_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow bluetooth_t self:process { getsched signal_perms };
Chris PeBenito c0868a
allow bluetooth_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow bluetooth_t self:shm create_shm_perms;
Chris PeBenito 17de1b
allow bluetooth_t self:socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow bluetooth_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito fcee22
allow bluetooth_t self:unix_stream_socket { connectto create_stream_socket_perms };
Chris PeBenito 17de1b
allow bluetooth_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow bluetooth_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
read_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_t)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
Chris PeBenito 0bfccd
manage_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
Chris PeBenito 0bfccd
manage_lnk_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
Chris PeBenito 0bfccd
manage_fifo_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t)
Chris PeBenito 0bfccd
filetrans_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_rw_t, { dir file lnk_file sock_file fifo_file })
Chris PeBenito 17de1b
Chris PeBenito 350b6a
can_exec(bluetooth_t, bluetooth_helper_exec_t)
Chris PeBenito 17de1b
Chris PeBenito d9845a
allow bluetooth_t bluetooth_lock_t:file manage_file_perms;
Chris PeBenito 17de1b
files_lock_filetrans(bluetooth_t,bluetooth_lock_t,file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(bluetooth_t, bluetooth_tmp_t, bluetooth_tmp_t)
Chris PeBenito 0bfccd
manage_files_pattern(bluetooth_t, bluetooth_tmp_t, bluetooth_tmp_t)
Chris PeBenito 17de1b
files_tmp_filetrans(bluetooth_t, bluetooth_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(bluetooth_t, bluetooth_var_lib_t, bluetooth_var_lib_t)
Chris PeBenito 0bfccd
manage_files_pattern(bluetooth_t, bluetooth_var_lib_t, bluetooth_var_lib_t)
Chris PeBenito 0bfccd
files_var_lib_filetrans(bluetooth_t, bluetooth_var_lib_t, { dir file } )
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(bluetooth_t, bluetooth_var_run_t, bluetooth_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(bluetooth_t, bluetooth_var_run_t, bluetooth_var_run_t)
Chris PeBenito 17de1b
files_pid_filetrans(bluetooth_t, bluetooth_var_run_t, { file sock_file })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(bluetooth_t)
Chris PeBenito 17de1b
kernel_read_system_state(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(bluetooth_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(bluetooth_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(bluetooth_t)
Chris PeBenito 668b30
corenet_udp_sendrecv_generic_if(bluetooth_t)
Chris PeBenito 668b30
corenet_raw_sendrecv_generic_if(bluetooth_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(bluetooth_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(bluetooth_t)
Chris PeBenito c12621
corenet_raw_sendrecv_generic_node(bluetooth_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(bluetooth_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(bluetooth_t)
Chris PeBenito 17de1b
dev_rw_usbfs(bluetooth_t)
Chris PeBenito 17de1b
dev_rw_generic_usb_dev(bluetooth_t)
Chris PeBenito 17de1b
dev_read_urand(bluetooth_t)
Chris PeBenito fcee22
dev_rw_input_dev(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(bluetooth_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(bluetooth_t)
Chris PeBenito 7487a6
fs_list_inotifyfs(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#Handle bluetooth serial devices
Chris PeBenito 17de1b
term_use_unallocated_ttys(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(bluetooth_t)
Chris PeBenito 17de1b
corecmd_exec_shell(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(bluetooth_t)
Chris PeBenito 17de1b
domain_dontaudit_search_all_domains_state(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(bluetooth_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(bluetooth_t)
Chris PeBenito 17de1b
files_read_usr_files(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito fcee22
auth_use_nsswitch(bluetooth_t)
Chris PeBenito fcee22
Chris PeBenito 17de1b
logging_send_syslog_msg(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(bluetooth_t)
Chris PeBenito 17de1b
miscfiles_read_fonts(bluetooth_t)
Chris PeBenito fcee22
miscfiles_read_hwdata(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(bluetooth_t)
Chris PeBenito 296273
userdom_dontaudit_use_user_terminals(bluetooth_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(bluetooth_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 296273
	dbus_system_bus_client(bluetooth_t)
Chris PeBenito 17de1b
	dbus_connect_system_bus(bluetooth_t)
Chris PeBenito fcee22
Chris PeBenito fcee22
	optional_policy(`
Chris PeBenito fcee22
		cups_dbus_chat(bluetooth_t)
Chris PeBenito fcee22
	')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(bluetooth_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(bluetooth_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(bluetooth_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 8708d9
	ppp_domtrans(bluetooth_t)
Chris PeBenito 8708d9
')
Chris PeBenito 296273
Chris PeBenito 296273
########################################
Chris PeBenito 296273
#
Chris PeBenito 296273
# Bluetooth helper programs local policy
Chris PeBenito 296273
#
Chris PeBenito 296273
Chris PeBenito 296273
allow bluetooth_helper_t self:capability sys_nice;
Chris PeBenito 296273
allow bluetooth_helper_t self:process getsched;
Chris PeBenito 296273
allow bluetooth_helper_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 296273
allow bluetooth_helper_t self:shm create_shm_perms;
Chris PeBenito 296273
allow bluetooth_helper_t self:unix_stream_socket { create_stream_socket_perms connectto };
Chris PeBenito 296273
allow bluetooth_helper_t self:tcp_socket create_socket_perms;
Chris PeBenito 296273
allow bluetooth_helper_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 296273
Chris PeBenito 296273
allow bluetooth_helper_t bluetooth_t:socket { read write };
Chris PeBenito 296273
Chris PeBenito 296273
manage_dirs_pattern(bluetooth_helper_t, bluetooth_helper_tmp_t, bluetooth_helper_tmp_t)
Chris PeBenito 296273
manage_files_pattern(bluetooth_helper_t, bluetooth_helper_tmp_t, bluetooth_helper_tmp_t)
Chris PeBenito 296273
manage_sock_files_pattern(bluetooth_helper_t, bluetooth_helper_tmp_t, bluetooth_helper_tmp_t)
Chris PeBenito 296273
files_tmp_filetrans(bluetooth_helper_t, bluetooth_helper_tmp_t, { file dir sock_file })
Chris PeBenito 296273
Chris PeBenito 296273
manage_dirs_pattern(bluetooth_helper_t, bluetooth_helper_tmpfs_t, bluetooth_helper_tmpfs_t)
Chris PeBenito 296273
manage_files_pattern(bluetooth_helper_t, bluetooth_helper_tmpfs_t, bluetooth_helper_tmpfs_t)
Chris PeBenito 296273
fs_tmpfs_filetrans(bluetooth_helper_t, bluetooth_helper_tmpfs_t, { dir file })
Chris PeBenito 296273
Chris PeBenito 296273
kernel_read_system_state(bluetooth_helper_t)
Chris PeBenito 296273
kernel_read_kernel_sysctls(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
dev_read_urand(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
term_dontaudit_use_all_user_ttys(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
corecmd_exec_bin(bluetooth_helper_t)
Chris PeBenito 296273
corecmd_exec_shell(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
domain_read_all_domains_state(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
files_read_etc_files(bluetooth_helper_t)
Chris PeBenito 296273
files_read_etc_runtime_files(bluetooth_helper_t)
Chris PeBenito 296273
files_read_usr_files(bluetooth_helper_t)
Chris PeBenito 296273
files_dontaudit_list_default(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
locallogin_dontaudit_use_fds(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
logging_send_syslog_msg(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
miscfiles_read_localization(bluetooth_helper_t) 
Chris PeBenito 296273
Chris PeBenito 296273
sysnet_read_config(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	bluetooth_dbus_chat(bluetooth_helper_t)
Chris PeBenito 296273
Chris PeBenito 296273
	dbus_system_bus_client(bluetooth_helper_t)
Chris PeBenito 296273
	dbus_connect_system_bus(bluetooth_helper_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	nscd_socket_use(bluetooth_helper_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	xserver_user_x_domain_template(bluetooth_helper, bluetooth_helper_t, bluetooth_helper_tmpfs_t)
Chris PeBenito 296273
')