|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
policy_module(hal,1.0)
|
|
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 |
a08248 |
allow hald_t self:capability { net_admin sys_admin dac_override dac_read_search mknod sys_rawio };
|
|
Chris PeBenito |
fdae8e |
dontaudit hald_t self:capability sys_tty_config;
|
|
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 |
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 |
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 |
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 |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
corenet_tcp_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 |
fdae8e |
corenet_raw_sendrecv_all_nodes(hald_t)
|
|
Chris PeBenito |
fdae8e |
corenet_tcp_sendrecv_all_ports(hald_t)
|
|
Chris PeBenito |
fdae8e |
corenet_tcp_bind_all_nodes(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
dev_read_sysfs(hald_t)
|
|
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 |
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 |
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 |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
corecmd_exec_bin(hald_t)
|
|
Chris PeBenito |
fdae8e |
corecmd_exec_sbin(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
domain_use_wide_inherit_fd(hald_t)
|
|
Chris PeBenito |
fdae8e |
domain_exec_all_entry_files(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
files_exec_etc_files(hald_t)
|
|
Chris PeBenito |
fdae8e |
files_read_etc_files(hald_t)
|
|
Chris PeBenito |
fdae8e |
files_rw_etc_runtime_files(hald_t)
|
|
Chris PeBenito |
fdae8e |
files_search_mnt(hald_t)
|
|
Chris PeBenito |
fdae8e |
files_search_var_lib(hald_t)
|
|
Chris PeBenito |
fdae8e |
files_read_usr_files(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
init_use_fd(hald_t)
|
|
Chris PeBenito |
fdae8e |
init_use_script_pty(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 |
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 |
fdae8e |
optional_policy(`dbus.te',`
|
|
Chris PeBenito |
fdae8e |
allow hald_t self:dbus send_msg;
|
|
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 |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
20e306 |
optional_policy(`dmidecode.te',`
|
|
Chris PeBenito |
20e306 |
# For /usr/libexec/hald-probe-smbios
|
|
Chris PeBenito |
20e306 |
dmidecode_domtrans(hald_t)
|
|
Chris PeBenito |
20e306 |
')
|
|
Chris PeBenito |
20e306 |
|
|
Chris PeBenito |
fdae8e |
optional_policy(`hotplug.te',`
|
|
Chris PeBenito |
fdae8e |
hotplug_read_config(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
a1fcff |
optional_policy(`mount.te',`
|
|
Chris PeBenito |
a1fcff |
mount_domtrans(hald_t)
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
fdae8e |
optional_policy(`nis.te',`
|
|
Chris PeBenito |
fdae8e |
nis_use_ypbind(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
optional_policy(`nscd.te',`
|
|
Chris PeBenito |
fdae8e |
nscd_use_socket(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
603f90 |
optional_policy(`pcmcia.te',`
|
|
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 |
fdae8e |
optional_policy(`selinuxutil.te',`
|
|
Chris PeBenito |
fdae8e |
seutil_sigchld_newrole(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
optional_policy(`udev.te', `
|
|
Chris PeBenito |
fdae8e |
udev_domtrans(hald_t)
|
|
Chris PeBenito |
fdae8e |
udev_read_db(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
optional_policy(`updfstab.te',`
|
|
Chris PeBenito |
fdae8e |
updfstab_domtrans(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
ifdef(`TODO',`
|
|
Chris PeBenito |
fdae8e |
optional_policy(`rhgb.te',`
|
|
Chris PeBenito |
fdae8e |
rhgb_domain(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
allow hald_t device_t:dir create_dir_perms;
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
optional_policy(`updfstab.te',`
|
|
Chris PeBenito |
fdae8e |
allow updfstab_t hald_t:dbus send_msg;
|
|
Chris PeBenito |
fdae8e |
allow hald_t updfstab_t:dbus send_msg;
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
optional_policy(`hald.te',`
|
|
Chris PeBenito |
fdae8e |
allow udev_t hald_t:unix_dgram_socket sendto;
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
allow hald_t initrc_t:dbus send_msg;
|
|
Chris PeBenito |
fdae8e |
allow initrc_t hald_t:dbus send_msg;
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
a1fcff |
# For /usr/libexec/hald-addon-acpi - writes to /var/run/acpid.socket
|
|
Chris PeBenito |
a1fcff |
ifdef(`apmd.te', `
|
|
Chris PeBenito |
a1fcff |
allow hald_t apmd_var_run_t:sock_file write;
|
|
Chris PeBenito |
a1fcff |
allow hald_t apmd_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
a1fcff |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
a1fcff |
allow unconfined_t hald_t:dbus send_msg;
|
|
Chris PeBenito |
a1fcff |
allow hald_t unconfined_t:dbus send_msg;
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
fdae8e |
') dnl end TODO
|