Chris PeBenito d4dca5
Chris PeBenito d4dca5
policy_module(bluetooth,1.0)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
########################################
Chris PeBenito d4dca5
#
Chris PeBenito d4dca5
# Declarations
Chris PeBenito d4dca5
#
Chris PeBenito d4dca5
type bluetooth_t;
Chris PeBenito d4dca5
type bluetooth_exec_t;
Chris PeBenito d4dca5
init_daemon_domain(bluetooth_t,bluetooth_exec_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
type bluetooth_conf_t;
Chris PeBenito d4dca5
files_type(bluetooth_conf_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
type bluetooth_lock_t;
Chris PeBenito d4dca5
files_lock_file(bluetooth_lock_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
type bluetooth_tmp_t;
Chris PeBenito d4dca5
files_tmp_file(bluetooth_tmp_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
type bluetooth_var_run_t;
Chris PeBenito d4dca5
files_pid_file(bluetooth_var_run_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
########################################
Chris PeBenito d4dca5
#
Chris PeBenito d4dca5
# Local policy
Chris PeBenito d4dca5
#
Chris PeBenito d4dca5
allow bluetooth_t self:capability { net_admin net_raw sys_tty_config };
Chris PeBenito d4dca5
dontaudit bluetooth_t self:capability sys_tty_config;
Chris PeBenito d4dca5
allow bluetooth_t self:process signal_perms;
Chris PeBenito d4dca5
allow bluetooth_t self:socket create_stream_socket_perms;
Chris PeBenito d4dca5
allow bluetooth_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito d4dca5
allow bluetooth_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito d4dca5
allow bluetooth_t self:tcp_socket { create_stream_socket_perms connect };
Chris PeBenito d4dca5
allow bluetooth_t self:udp_socket create_socket_perms;
Chris PeBenito d4dca5
Chris PeBenito d4dca5
allow bluetooth_t bluetooth_conf_t:dir search;
Chris PeBenito d4dca5
allow bluetooth_t bluetooth_conf_t:file { getattr read ioctl };
Chris PeBenito d4dca5
Chris PeBenito d4dca5
allow bluetooth_t bluetooth_lock_t:file create_file_perms;
Chris PeBenito d4dca5
files_create_lock(bluetooth_t,bluetooth_lock_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
allow bluetooth_t bluetooth_tmp_t:dir create_dir_perms;
Chris PeBenito d4dca5
allow bluetooth_t bluetooth_tmp_t:file create_file_perms;
Chris PeBenito d4dca5
files_create_tmp_files(bluetooth_t, bluetooth_tmp_t, { file dir })
Chris PeBenito d4dca5
Chris PeBenito d4dca5
allow bluetooth_t bluetooth_var_run_t:dir rw_dir_perms;
Chris PeBenito d4dca5
allow bluetooth_t bluetooth_var_run_t:file create_file_perms;
Chris PeBenito d4dca5
allow bluetooth_t bluetooth_var_run_t:sock_file create_file_perms;
Chris PeBenito d4dca5
files_create_pid(bluetooth_t, bluetooth_var_run_t, { file sock_file })
Chris PeBenito d4dca5
Chris PeBenito d4dca5
kernel_read_kernel_sysctl(bluetooth_t)
Chris PeBenito d4dca5
kernel_list_proc(bluetooth_t)
Chris PeBenito d4dca5
kernel_read_proc_symlinks(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
corenet_tcp_sendrecv_all_if(bluetooth_t)
Chris PeBenito d4dca5
corenet_udp_sendrecv_all_if(bluetooth_t)
Chris PeBenito d4dca5
corenet_raw_sendrecv_all_if(bluetooth_t)
Chris PeBenito d4dca5
corenet_tcp_sendrecv_all_nodes(bluetooth_t)
Chris PeBenito d4dca5
corenet_udp_sendrecv_all_nodes(bluetooth_t)
Chris PeBenito d4dca5
corenet_raw_sendrecv_all_nodes(bluetooth_t)
Chris PeBenito d4dca5
corenet_tcp_bind_all_nodes(bluetooth_t)
Chris PeBenito d4dca5
corenet_udp_bind_all_nodes(bluetooth_t)
Chris PeBenito d4dca5
corenet_tcp_sendrecv_all_ports(bluetooth_t)
Chris PeBenito d4dca5
corenet_udp_sendrecv_all_ports(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
dev_read_sysfs(bluetooth_t)
Chris PeBenito d4dca5
dev_rw_usbfs(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
fs_getattr_all_fs(bluetooth_t)
Chris PeBenito d4dca5
fs_search_auto_mountpoints(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
term_dontaudit_use_console(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
corecmd_exec_bin(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
domain_use_wide_inherit_fd(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
init_use_fd(bluetooth_t)
Chris PeBenito d4dca5
init_use_script_pty(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
libs_use_ld_so(bluetooth_t)
Chris PeBenito d4dca5
libs_use_shared_libs(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
logging_send_syslog_msg(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
miscfiles_read_localization(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
sysnet_read_config(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
userdom_dontaudit_use_unpriv_user_fd(bluetooth_t)
Chris PeBenito d4dca5
userdom_dontaudit_use_sysadm_pty(bluetooth_t)
Chris PeBenito d4dca5
userdom_dontaudit_search_sysadm_home_dir(bluetooth_t)
Chris PeBenito d4dca5
Chris PeBenito d4dca5
ifdef(`targeted_policy',`
Chris PeBenito d4dca5
	term_dontaudit_use_unallocated_tty(bluetooth_t)
Chris PeBenito d4dca5
	term_dontaudit_use_generic_pty(bluetooth_t)
Chris PeBenito d4dca5
	files_dontaudit_read_root_file(bluetooth_t)
Chris PeBenito d4dca5
')
Chris PeBenito d4dca5
Chris PeBenito d4dca5
optional_policy(`dbus.te',`
Chris PeBenito d4dca5
	dbus_system_bus_client_template(bluetooth,bluetooth_t)
Chris PeBenito d4dca5
	dbus_send_system_bus_msg(bluetooth_t)
Chris PeBenito d4dca5
')
Chris PeBenito d4dca5
Chris PeBenito d4dca5
optional_policy(`nis.te',`
Chris PeBenito d4dca5
	nis_use_ypbind(bluetooth_t)
Chris PeBenito d4dca5
')
Chris PeBenito d4dca5
Chris PeBenito d4dca5
optional_policy(`selinuxutil.te',`
Chris PeBenito d4dca5
	seutil_sigchld_newrole(bluetooth_t)
Chris PeBenito d4dca5
')
Chris PeBenito d4dca5
Chris PeBenito d4dca5
optional_policy(`udev.te',`
Chris PeBenito d4dca5
	udev_read_db(bluetooth_t)
Chris PeBenito d4dca5
')
Chris PeBenito d4dca5
Chris PeBenito d4dca5
ifdef(`TODO',`
Chris PeBenito d4dca5
optional_policy(`rhgb.te',`
Chris PeBenito d4dca5
	rhgb_domain(bluetooth_t)
Chris PeBenito d4dca5
')
Chris PeBenito d4dca5
')