2005-09-02 20:29:52 +00:00
|
|
|
|
2006-01-18 18:45:23 +00:00
|
|
|
policy_module(hal,1.2.1)
|
2005-09-02 20:29:52 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type hald_t;
|
|
|
|
type hald_exec_t;
|
|
|
|
init_daemon_domain(hald_t,hald_exec_t)
|
|
|
|
|
|
|
|
type hald_tmp_t;
|
|
|
|
files_tmp_file(hald_tmp_t)
|
|
|
|
|
|
|
|
type hald_var_run_t;
|
|
|
|
files_pid_file(hald_var_run_t)
|
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2005-12-13 20:38:19 +00:00
|
|
|
# execute openvt which needs setuid
|
|
|
|
allow hald_t self:capability { setuid kill net_admin sys_admin sys_nice dac_override dac_read_search mknod sys_rawio };
|
2005-09-02 20:29:52 +00:00
|
|
|
dontaudit hald_t self:capability sys_tty_config;
|
2005-12-13 20:38:19 +00:00
|
|
|
allow hald_t self:process signal_perms;
|
2005-09-02 20:29:52 +00:00
|
|
|
allow hald_t self:fifo_file rw_file_perms;
|
2005-09-13 13:06:07 +00:00
|
|
|
allow hald_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
2005-09-02 20:29:52 +00:00
|
|
|
allow hald_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow hald_t self:netlink_route_socket r_netlink_socket_perms;
|
2005-12-09 15:42:39 +00:00
|
|
|
allow hald_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
2005-09-13 13:06:07 +00:00
|
|
|
allow hald_t self:netlink_kobject_uevent_socket create_socket_perms;
|
2005-09-02 20:29:52 +00:00
|
|
|
allow hald_t self:tcp_socket create_stream_socket_perms;
|
2005-10-24 17:06:34 +00:00
|
|
|
allow hald_t self:udp_socket create_socket_perms;
|
2005-09-13 13:06:07 +00:00
|
|
|
# For backwards compatibility with older kernels
|
|
|
|
allow hald_t self:netlink_socket create_socket_perms;
|
2005-09-02 20:29:52 +00:00
|
|
|
|
|
|
|
allow hald_t hald_tmp_t:dir create_dir_perms;
|
|
|
|
allow hald_t hald_tmp_t:file create_file_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_tmp(hald_t, hald_tmp_t, { file dir })
|
2005-09-02 20:29:52 +00:00
|
|
|
|
|
|
|
allow hald_t hald_var_run_t:file create_file_perms;
|
2005-10-26 21:03:19 +00:00
|
|
|
allow hald_t hald_var_run_t:dir rw_dir_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_pid(hald_t,hald_var_run_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(hald_t)
|
|
|
|
kernel_read_network_state(hald_t)
|
|
|
|
kernel_read_kernel_sysctl(hald_t)
|
2006-01-11 15:28:14 +00:00
|
|
|
kernel_read_fs_sysctl(hald_t)
|
2005-10-14 17:55:40 +00:00
|
|
|
kernel_write_proc_file(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
|
2006-01-17 17:50:10 +00:00
|
|
|
bootloader_getattr_boot_dir(hald_t)
|
|
|
|
|
2005-12-09 15:42:39 +00:00
|
|
|
corecmd_exec_bin(hald_t)
|
|
|
|
corecmd_exec_sbin(hald_t)
|
|
|
|
|
2005-09-02 20:29:52 +00:00
|
|
|
corenet_tcp_sendrecv_all_if(hald_t)
|
2005-10-21 21:35:25 +00:00
|
|
|
corenet_udp_sendrecv_all_if(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
corenet_raw_sendrecv_all_if(hald_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(hald_t)
|
2005-10-21 21:35:25 +00:00
|
|
|
corenet_udp_sendrecv_all_nodes(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
corenet_raw_sendrecv_all_nodes(hald_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(hald_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_ports(hald_t)
|
2005-12-06 19:59:50 +00:00
|
|
|
corenet_non_ipsec_sendrecv(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
corenet_tcp_bind_all_nodes(hald_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_bind_all_nodes(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
|
2005-09-19 21:17:45 +00:00
|
|
|
dev_rw_usbfs(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
dev_read_urand(hald_t)
|
|
|
|
dev_read_input(hald_t)
|
2005-09-16 13:36:26 +00:00
|
|
|
dev_read_mouse(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
dev_rw_printer(hald_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
dev_read_lvm_control(hald_t)
|
2005-09-16 13:36:26 +00:00
|
|
|
dev_getattr_all_chr_files(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
dev_manage_generic_chr_file(hald_t)
|
2005-12-09 15:42:39 +00:00
|
|
|
# hal is now execing pm-suspend
|
|
|
|
dev_rw_sysfs(hald_t)
|
|
|
|
|
|
|
|
domain_use_wide_inherit_fd(hald_t)
|
|
|
|
domain_exec_all_entry_files(hald_t)
|
|
|
|
|
|
|
|
files_exec_etc_files(hald_t)
|
|
|
|
files_read_etc_files(hald_t)
|
|
|
|
files_rw_etc_runtime_files(hald_t)
|
2006-01-11 15:28:14 +00:00
|
|
|
files_manage_mnt_dirs(hald_t)
|
2006-01-17 17:50:10 +00:00
|
|
|
files_manage_mnt_files(hald_t)
|
2005-12-09 15:42:39 +00:00
|
|
|
files_search_var_lib(hald_t)
|
|
|
|
files_read_usr_files(hald_t)
|
|
|
|
# hal is now execing pm-suspend
|
|
|
|
files_create_boot_flag(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
|
|
|
|
fs_getattr_all_fs(hald_t)
|
2005-09-19 21:17:45 +00:00
|
|
|
fs_search_all(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
fs_search_auto_mountpoints(hald_t)
|
|
|
|
|
2006-01-11 15:28:14 +00:00
|
|
|
mls_file_read_up(hald_t)
|
|
|
|
|
2005-09-16 13:36:26 +00:00
|
|
|
selinux_get_fs_mount(hald_t)
|
|
|
|
selinux_validate_context(hald_t)
|
|
|
|
selinux_compute_access_vector(hald_t)
|
|
|
|
selinux_compute_create_context(hald_t)
|
|
|
|
selinux_compute_relabel_context(hald_t)
|
|
|
|
selinux_compute_user_contexts(hald_t)
|
|
|
|
|
2005-09-02 20:29:52 +00:00
|
|
|
storage_raw_read_removable_device(hald_t)
|
2005-11-23 19:02:40 +00:00
|
|
|
storage_raw_write_removable_device(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
storage_raw_read_fixed_disk(hald_t)
|
|
|
|
storage_raw_write_fixed_disk(hald_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(hald_t)
|
2005-12-13 20:38:19 +00:00
|
|
|
term_dontaudit_ioctl_unallocated_ttys(hald_t)
|
2006-01-06 22:51:40 +00:00
|
|
|
term_dontaudit_use_unallocated_tty(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
|
|
|
|
init_use_fd(hald_t)
|
|
|
|
init_use_script_pty(hald_t)
|
2005-12-13 20:38:19 +00:00
|
|
|
init_domtrans_script(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(hald_t)
|
|
|
|
libs_use_shared_libs(hald_t)
|
|
|
|
libs_exec_ld_so(hald_t)
|
|
|
|
libs_exec_lib_files(hald_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(hald_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(hald_t)
|
2005-10-13 20:59:36 +00:00
|
|
|
miscfiles_read_hwdata(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
|
|
|
|
seutil_read_config(hald_t)
|
|
|
|
seutil_read_default_contexts(hald_t)
|
|
|
|
|
|
|
|
sysnet_read_config(hald_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fd(hald_t)
|
|
|
|
userdom_dontaudit_search_sysadm_home_dir(hald_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy', `
|
|
|
|
term_dontaudit_use_unallocated_tty(hald_t)
|
|
|
|
term_dontaudit_use_generic_pty(hald_t)
|
|
|
|
files_dontaudit_read_root_file(hald_t)
|
2006-01-18 18:45:23 +00:00
|
|
|
files_dontaudit_getattr_home_dir(hald_t)
|
2005-09-02 20:29:52 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`apm',`
|
2005-11-08 22:00:30 +00:00
|
|
|
# For /usr/libexec/hald-addon-acpi
|
|
|
|
# writes to /var/run/acpid.socket
|
|
|
|
apm_stream_connect(hald_t)
|
|
|
|
')
|
|
|
|
|
2006-01-17 17:50:10 +00:00
|
|
|
optional_policy(`bind',`
|
|
|
|
bind_search_cache(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-12-13 20:38:19 +00:00
|
|
|
optional_policy(`clock',`
|
|
|
|
clock_domtrans(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`cups',`
|
2005-11-08 22:00:30 +00:00
|
|
|
cups_domtrans_config(hald_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
cups_signal_config(hald_t)
|
2005-11-08 22:00:30 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`dbus',`
|
2005-09-02 20:29:52 +00:00
|
|
|
dbus_system_bus_client_template(hald,hald_t)
|
|
|
|
dbus_send_system_bus_msg(hald_t)
|
|
|
|
dbus_connect_system_bus(hald_t)
|
2006-01-17 17:50:10 +00:00
|
|
|
allow hald_t self:dbus send_msg;
|
2005-11-25 16:43:03 +00:00
|
|
|
|
2005-12-05 15:00:29 +00:00
|
|
|
init_dbus_chat_script(hald_t)
|
|
|
|
|
2005-11-25 16:43:03 +00:00
|
|
|
optional_policy(`networkmanager',`
|
|
|
|
networkmanager_dbus_chat(hald_t)
|
|
|
|
')
|
2005-09-02 20:29:52 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`dmidecode',`
|
2005-09-27 21:24:01 +00:00
|
|
|
# For /usr/libexec/hald-probe-smbios
|
|
|
|
dmidecode_domtrans(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`hotplug',`
|
2005-09-02 20:29:52 +00:00
|
|
|
hotplug_read_config(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`mount',`
|
2005-09-19 21:17:45 +00:00
|
|
|
mount_domtrans(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nis',`
|
2005-09-02 20:29:52 +00:00
|
|
|
nis_use_ypbind(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2005-09-02 20:29:52 +00:00
|
|
|
nscd_use_socket(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`pcmcia',`
|
2005-09-05 18:17:17 +00:00
|
|
|
pcmcia_manage_pid(hald_t)
|
|
|
|
pcmcia_manage_runtime_chr(hald_t)
|
|
|
|
')
|
|
|
|
|
2006-01-11 15:28:14 +00:00
|
|
|
optional_policy(`rpc',`
|
|
|
|
rpc_search_nfs_state_data(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`selinuxutil',`
|
2005-09-02 20:29:52 +00:00
|
|
|
seutil_sigchld_newrole(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`udev', `
|
2005-09-02 20:29:52 +00:00
|
|
|
udev_domtrans(hald_t)
|
|
|
|
udev_read_db(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`updfstab',`
|
2005-09-02 20:29:52 +00:00
|
|
|
updfstab_domtrans(hald_t)
|
|
|
|
')
|
|
|
|
|
2005-12-13 20:38:19 +00:00
|
|
|
optional_policy(`vbetool',`
|
|
|
|
vbetool_domtrans(hald_t)
|
|
|
|
')
|