Chris PeBenito fdae8e
Chris PeBenito cd6676
policy_module(hal,1.1.3)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
########################################
Chris PeBenito fdae8e
#
Chris PeBenito fdae8e
# Declarations
Chris PeBenito fdae8e
#
Chris PeBenito fdae8e
Chris PeBenito fdae8e
type hald_t;
Chris PeBenito fdae8e
type hald_exec_t;
Chris PeBenito fdae8e
init_daemon_domain(hald_t,hald_exec_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
type hald_tmp_t;
Chris PeBenito fdae8e
files_tmp_file(hald_tmp_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
type hald_var_run_t;
Chris PeBenito fdae8e
files_pid_file(hald_var_run_t)
Chris PeBenito fdae8e
Chris PeBenito a1fcff
########################################
Chris PeBenito a1fcff
#
Chris PeBenito a1fcff
# Local policy
Chris PeBenito a1fcff
#
Chris PeBenito a1fcff
Chris PeBenito 9cca1c
# execute openvt which needs setuid
Chris PeBenito 9cca1c
allow hald_t self:capability { setuid kill net_admin sys_admin sys_nice dac_override dac_read_search mknod sys_rawio };
Chris PeBenito fdae8e
dontaudit hald_t self:capability sys_tty_config;
Chris PeBenito 9cca1c
allow hald_t self:process signal_perms;
Chris PeBenito fdae8e
allow hald_t self:fifo_file rw_file_perms;
Chris PeBenito 0907bd
allow hald_t self:unix_stream_socket { create_stream_socket_perms connectto };
Chris PeBenito fdae8e
allow hald_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito fdae8e
allow hald_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 049e11
allow hald_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
Chris PeBenito 0907bd
allow hald_t self:netlink_kobject_uevent_socket create_socket_perms;
Chris PeBenito fdae8e
allow hald_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 162dfc
allow hald_t self:udp_socket create_socket_perms;
Chris PeBenito 0907bd
# For backwards compatibility with older kernels
Chris PeBenito 0907bd
allow hald_t self:netlink_socket create_socket_perms;
Chris PeBenito fdae8e
Chris PeBenito fdae8e
allow hald_t hald_tmp_t:dir create_dir_perms;
Chris PeBenito fdae8e
allow hald_t hald_tmp_t:file create_file_perms;
Chris PeBenito fdae8e
files_create_tmp_files(hald_t, hald_tmp_t, { file dir })
Chris PeBenito fdae8e
Chris PeBenito fdae8e
allow hald_t hald_var_run_t:file create_file_perms;
Chris PeBenito 4614e8
allow hald_t hald_var_run_t:dir rw_dir_perms;
Chris PeBenito fdae8e
files_create_pid(hald_t,hald_var_run_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
kernel_read_system_state(hald_t)
Chris PeBenito fdae8e
kernel_read_network_state(hald_t)
Chris PeBenito fdae8e
kernel_read_kernel_sysctl(hald_t)
Chris PeBenito d8636f
kernel_write_proc_file(hald_t)
Chris PeBenito fdae8e
Chris PeBenito 049e11
corecmd_exec_bin(hald_t)
Chris PeBenito 049e11
corecmd_exec_sbin(hald_t)
Chris PeBenito 049e11
Chris PeBenito fdae8e
corenet_tcp_sendrecv_all_if(hald_t)
Chris PeBenito e6a2ea
corenet_udp_sendrecv_all_if(hald_t)
Chris PeBenito fdae8e
corenet_raw_sendrecv_all_if(hald_t)
Chris PeBenito fdae8e
corenet_tcp_sendrecv_all_nodes(hald_t)
Chris PeBenito e6a2ea
corenet_udp_sendrecv_all_nodes(hald_t)
Chris PeBenito fdae8e
corenet_raw_sendrecv_all_nodes(hald_t)
Chris PeBenito fdae8e
corenet_tcp_sendrecv_all_ports(hald_t)
Chris PeBenito 162dfc
corenet_udp_sendrecv_all_ports(hald_t)
Chris PeBenito bd7037
corenet_non_ipsec_sendrecv(hald_t)
Chris PeBenito fdae8e
corenet_tcp_bind_all_nodes(hald_t)
Chris PeBenito 162dfc
corenet_udp_bind_all_nodes(hald_t)
Chris PeBenito fdae8e
Chris PeBenito a1fcff
dev_rw_usbfs(hald_t)
Chris PeBenito fdae8e
dev_read_urand(hald_t)
Chris PeBenito fdae8e
dev_read_input(hald_t)
Chris PeBenito a08248
dev_read_mouse(hald_t)
Chris PeBenito fdae8e
dev_rw_printer(hald_t)
Chris PeBenito a1fcff
dev_read_lvm_control(hald_t)
Chris PeBenito a08248
dev_getattr_all_chr_files(hald_t)
Chris PeBenito fdae8e
dev_manage_generic_chr_file(hald_t)
Chris PeBenito 049e11
# hal is now execing pm-suspend
Chris PeBenito 049e11
dev_rw_sysfs(hald_t)
Chris PeBenito 049e11
Chris PeBenito 049e11
domain_use_wide_inherit_fd(hald_t)
Chris PeBenito 049e11
domain_exec_all_entry_files(hald_t)
Chris PeBenito 049e11
Chris PeBenito 049e11
files_exec_etc_files(hald_t)
Chris PeBenito 049e11
files_read_etc_files(hald_t)
Chris PeBenito 049e11
files_rw_etc_runtime_files(hald_t)
Chris PeBenito 049e11
files_search_mnt(hald_t)
Chris PeBenito 049e11
files_search_var_lib(hald_t)
Chris PeBenito 049e11
files_read_usr_files(hald_t)
Chris PeBenito 049e11
# hal is now execing pm-suspend
Chris PeBenito 049e11
files_create_boot_flag(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
fs_getattr_all_fs(hald_t)
Chris PeBenito a1fcff
fs_search_all(hald_t)
Chris PeBenito fdae8e
fs_search_auto_mountpoints(hald_t)
Chris PeBenito fdae8e
Chris PeBenito a08248
selinux_get_fs_mount(hald_t)
Chris PeBenito a08248
selinux_validate_context(hald_t)
Chris PeBenito a08248
selinux_compute_access_vector(hald_t)
Chris PeBenito a08248
selinux_compute_create_context(hald_t)
Chris PeBenito a08248
selinux_compute_relabel_context(hald_t)
Chris PeBenito a08248
selinux_compute_user_contexts(hald_t)
Chris PeBenito a08248
Chris PeBenito fdae8e
storage_raw_read_removable_device(hald_t)
Chris PeBenito af2345
storage_raw_write_removable_device(hald_t)
Chris PeBenito fdae8e
storage_raw_read_fixed_disk(hald_t)
Chris PeBenito fdae8e
storage_raw_write_fixed_disk(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
term_dontaudit_use_console(hald_t)
Chris PeBenito 9cca1c
term_dontaudit_ioctl_unallocated_ttys(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
init_use_fd(hald_t)
Chris PeBenito fdae8e
init_use_script_pty(hald_t)
Chris PeBenito 9cca1c
init_domtrans_script(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
libs_use_ld_so(hald_t)
Chris PeBenito fdae8e
libs_use_shared_libs(hald_t)
Chris PeBenito fdae8e
libs_exec_ld_so(hald_t)
Chris PeBenito fdae8e
libs_exec_lib_files(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
logging_send_syslog_msg(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
miscfiles_read_localization(hald_t)
Chris PeBenito 77f6e2
miscfiles_read_hwdata(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
seutil_read_config(hald_t)
Chris PeBenito fdae8e
seutil_read_default_contexts(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
sysnet_read_config(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
userdom_dontaudit_use_unpriv_user_fd(hald_t)
Chris PeBenito fdae8e
userdom_dontaudit_search_sysadm_home_dir(hald_t)
Chris PeBenito fdae8e
Chris PeBenito fdae8e
ifdef(`targeted_policy', `
Chris PeBenito fdae8e
	term_dontaudit_use_unallocated_tty(hald_t)
Chris PeBenito fdae8e
	term_dontaudit_use_generic_pty(hald_t)
Chris PeBenito fdae8e
	files_dontaudit_read_root_file(hald_t)
Chris PeBenito fdae8e
')
Chris PeBenito fdae8e
Chris PeBenito 132880
optional_policy(`apm',`
Chris PeBenito 725926
	# For /usr/libexec/hald-addon-acpi
Chris PeBenito 725926
	# writes to /var/run/acpid.socket
Chris PeBenito 725926
	apm_stream_connect(hald_t)
Chris PeBenito 725926
')
Chris PeBenito 725926
Chris PeBenito 9cca1c
optional_policy(`clock',`
Chris PeBenito 9cca1c
	clock_domtrans(hald_t)
Chris PeBenito 9cca1c
')
Chris PeBenito 9cca1c
Chris PeBenito 132880
optional_policy(`cups',`
Chris PeBenito 725926
	cups_domtrans_config(hald_t)
Chris PeBenito 9fd4b8
	cups_signal_config(hald_t)
Chris PeBenito 725926
')
Chris PeBenito 725926
Chris PeBenito 132880
optional_policy(`dbus',`
Chris PeBenito fdae8e
	dbus_system_bus_client_template(hald,hald_t)
Chris PeBenito fdae8e
	dbus_send_system_bus_msg(hald_t)
Chris PeBenito fdae8e
	dbus_connect_system_bus(hald_t)
Chris PeBenito d828b5
Chris PeBenito f525b4
	init_dbus_chat_script(hald_t)
Chris PeBenito f525b4
Chris PeBenito d828b5
	optional_policy(`networkmanager',`
Chris PeBenito d828b5
		networkmanager_dbus_chat(hald_t)
Chris PeBenito d828b5
	')
Chris PeBenito fdae8e
')
Chris PeBenito fdae8e
Chris PeBenito 132880
optional_policy(`dmidecode',`
Chris PeBenito 20e306
	# For /usr/libexec/hald-probe-smbios
Chris PeBenito 20e306
	dmidecode_domtrans(hald_t)
Chris PeBenito 20e306
')
Chris PeBenito 20e306
Chris PeBenito 132880
optional_policy(`hotplug',`
Chris PeBenito fdae8e
	hotplug_read_config(hald_t)
Chris PeBenito fdae8e
')
Chris PeBenito fdae8e
Chris PeBenito 132880
optional_policy(`mount',`
Chris PeBenito a1fcff
	mount_domtrans(hald_t)
Chris PeBenito a1fcff
')
Chris PeBenito a1fcff
Chris PeBenito 132880
optional_policy(`nis',`
Chris PeBenito fdae8e
	nis_use_ypbind(hald_t)
Chris PeBenito fdae8e
')
Chris PeBenito fdae8e
Chris PeBenito 132880
optional_policy(`nscd',`
Chris PeBenito fdae8e
	nscd_use_socket(hald_t)
Chris PeBenito fdae8e
')
Chris PeBenito fdae8e
Chris PeBenito 132880
optional_policy(`pcmcia',`
Chris PeBenito 603f90
	pcmcia_manage_pid(hald_t)
Chris PeBenito 603f90
	pcmcia_manage_runtime_chr(hald_t)
Chris PeBenito 603f90
')
Chris PeBenito 603f90
Chris PeBenito 132880
optional_policy(`selinuxutil',`
Chris PeBenito fdae8e
	seutil_sigchld_newrole(hald_t)
Chris PeBenito fdae8e
')
Chris PeBenito fdae8e
Chris PeBenito 132880
optional_policy(`udev', `
Chris PeBenito fdae8e
	udev_domtrans(hald_t)
Chris PeBenito fdae8e
	udev_read_db(hald_t)
Chris PeBenito fdae8e
')
Chris PeBenito fdae8e
Chris PeBenito 132880
optional_policy(`updfstab',`
Chris PeBenito fdae8e
	updfstab_domtrans(hald_t)
Chris PeBenito fdae8e
')
Chris PeBenito fdae8e
Chris PeBenito 9cca1c
optional_policy(`vbetool',`
Chris PeBenito 9cca1c
	vbetool_domtrans(hald_t)
Chris PeBenito 9cca1c
')
Chris PeBenito 9cca1c
Chris PeBenito fdae8e
ifdef(`TODO',`
Chris PeBenito fdae8e
allow hald_t device_t:dir create_dir_perms;
Chris PeBenito dab808
') dnl end TODO