|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
465510 |
policy_module(hal,1.3.11)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type hald_t;
|
|
Chris PeBenito |
17de1b |
type hald_exec_t;
|
|
Chris PeBenito |
17de1b |
init_daemon_domain(hald_t,hald_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type hald_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(hald_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type hald_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(hald_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# execute openvt which needs setuid
|
|
Chris PeBenito |
465510 |
allow hald_t self:capability { audit_write chown setuid setgid kill net_admin sys_admin sys_nice dac_override dac_read_search mknod sys_rawio sys_tty_config };
|
|
Chris PeBenito |
17de1b |
dontaudit hald_t self:capability sys_tty_config;
|
|
Chris PeBenito |
17de1b |
allow hald_t self:process signal_perms;
|
|
Chris PeBenito |
17de1b |
allow hald_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
17de1b |
allow hald_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
|
Chris PeBenito |
17de1b |
allow hald_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow hald_t self:netlink_route_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow hald_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
Chris PeBenito |
17de1b |
allow hald_t self:netlink_kobject_uevent_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow hald_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow hald_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
# For backwards compatibility with older kernels
|
|
Chris PeBenito |
17de1b |
allow hald_t self:netlink_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow hald_t hald_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
17de1b |
allow hald_t hald_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(hald_t, hald_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow hald_t hald_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
17de1b |
allow hald_t hald_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
17de1b |
files_pid_filetrans(hald_t,hald_var_run_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(hald_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state(hald_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(hald_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_fs_sysctls(hald_t)
|
|
Chris PeBenito |
17de1b |
kernel_rw_vm_sysctls(hald_t)
|
|
Chris PeBenito |
17de1b |
kernel_write_proc_files(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
auth_read_pam_console_data(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corecmd_exec_all_executables(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corenet_non_ipsec_sendrecv(hald_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_if(hald_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_if(hald_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_nodes(hald_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_nodes(hald_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(hald_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_rw_usbfs(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_read_urand(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_read_input(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_read_mouse(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_rw_printer(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_read_lvm_control(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_getattr_all_chr_files(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_manage_generic_chr_files(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_rw_generic_usb_dev(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_setattr_generic_usb_dev(hald_t)
|
|
Chris PeBenito |
17de1b |
dev_setattr_usbfs_files(hald_t)
|
|
Chris PeBenito |
17de1b |
# hal is now execing pm-suspend
|
|
Chris PeBenito |
17de1b |
dev_rw_sysfs(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
domain_use_interactive_fds(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_exec_etc_files(hald_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(hald_t)
|
|
Chris PeBenito |
17de1b |
files_rw_etc_runtime_files(hald_t)
|
|
Chris PeBenito |
17de1b |
files_manage_mnt_dirs(hald_t)
|
|
Chris PeBenito |
17de1b |
files_manage_mnt_files(hald_t)
|
|
Chris PeBenito |
17de1b |
files_search_var_lib(hald_t)
|
|
Chris PeBenito |
17de1b |
files_read_usr_files(hald_t)
|
|
Chris PeBenito |
17de1b |
# hal is now execing pm-suspend
|
|
Chris PeBenito |
17de1b |
files_create_boot_flag(hald_t)
|
|
Chris PeBenito |
17de1b |
files_getattr_all_dirs(hald_t)
|
|
Chris PeBenito |
17de1b |
files_read_kernel_img(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_getattr_all_fs(hald_t)
|
|
Chris PeBenito |
17de1b |
fs_search_all(hald_t)
|
|
Chris PeBenito |
17de1b |
fs_list_auto_mountpoints(hald_t)
|
|
Chris PeBenito |
17de1b |
files_getattr_all_mountpoints(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
mls_file_read_up(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
selinux_get_fs_mount(hald_t)
|
|
Chris PeBenito |
17de1b |
selinux_validate_context(hald_t)
|
|
Chris PeBenito |
17de1b |
selinux_compute_access_vector(hald_t)
|
|
Chris PeBenito |
17de1b |
selinux_compute_create_context(hald_t)
|
|
Chris PeBenito |
17de1b |
selinux_compute_relabel_context(hald_t)
|
|
Chris PeBenito |
17de1b |
selinux_compute_user_contexts(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
storage_raw_read_removable_device(hald_t)
|
|
Chris PeBenito |
17de1b |
storage_raw_write_removable_device(hald_t)
|
|
Chris PeBenito |
17de1b |
storage_raw_read_fixed_disk(hald_t)
|
|
Chris PeBenito |
17de1b |
storage_raw_write_fixed_disk(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_console(hald_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_generic_ptys(hald_t)
|
|
Chris PeBenito |
17de1b |
term_use_unallocated_ttys(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
auth_use_nsswitch(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
init_use_fds(hald_t)
|
|
Chris PeBenito |
17de1b |
init_use_script_ptys(hald_t)
|
|
Chris PeBenito |
17de1b |
init_domtrans_script(hald_t)
|
|
Chris PeBenito |
17de1b |
init_write_initctl(hald_t)
|
|
Chris PeBenito |
17de1b |
init_read_utmp(hald_t)
|
|
Chris PeBenito |
17de1b |
#hal runs shutdown, probably need a shutdown domain
|
|
Chris PeBenito |
17de1b |
init_rw_utmp(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
libs_use_ld_so(hald_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(hald_t)
|
|
Chris PeBenito |
17de1b |
libs_exec_ld_so(hald_t)
|
|
Chris PeBenito |
17de1b |
libs_exec_lib_files(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(hald_t)
|
|
Chris PeBenito |
17de1b |
logging_search_logs(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(hald_t)
|
|
Chris PeBenito |
17de1b |
miscfiles_read_hwdata(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
modutils_domtrans_insmod(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
seutil_read_config(hald_t)
|
|
Chris PeBenito |
17de1b |
seutil_read_default_contexts(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
sysnet_read_config(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_use_unpriv_user_fds(hald_t)
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_search_sysadm_home_dirs(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
17de1b |
term_setattr_unallocated_ttys(hald_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_unallocated_ttys(hald_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_generic_ptys(hald_t)
|
|
Chris PeBenito |
17de1b |
files_dontaudit_read_root_files(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
465510 |
bootloader_domtrans(hald_t)
|
|
Chris PeBenito |
465510 |
')
|
|
Chris PeBenito |
465510 |
|
|
Chris PeBenito |
465510 |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
# For /usr/libexec/hald-addon-acpi
|
|
Chris PeBenito |
17de1b |
# writes to /var/run/acpid.socket
|
|
Chris PeBenito |
17de1b |
apm_stream_connect(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
bind_search_cache(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
465510 |
bluetooth_domtrans(hald_t)
|
|
Chris PeBenito |
465510 |
')
|
|
Chris PeBenito |
465510 |
|
|
Chris PeBenito |
465510 |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
clock_domtrans(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
cups_domtrans_config(hald_t)
|
|
Chris PeBenito |
17de1b |
cups_signal_config(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
dbus_system_bus_client_template(hald,hald_t)
|
|
Chris PeBenito |
17de1b |
dbus_send_system_bus(hald_t)
|
|
Chris PeBenito |
17de1b |
dbus_connect_system_bus(hald_t)
|
|
Chris PeBenito |
17de1b |
allow hald_t self:dbus send_msg;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
init_dbus_chat_script(hald_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
networkmanager_dbus_chat(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
# For /usr/libexec/hald-probe-smbios
|
|
Chris PeBenito |
17de1b |
dmidecode_domtrans(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
hotplug_read_config(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
lvm_domtrans(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
mount_domtrans(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nis_use_ypbind(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nscd_socket_use(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
ntp_domtrans(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
pcmcia_manage_pid(hald_t)
|
|
Chris PeBenito |
17de1b |
pcmcia_manage_pid_chr_files(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
rpc_search_nfs_state_data(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
seutil_sigchld_newrole(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
udev_domtrans(hald_t)
|
|
Chris PeBenito |
17de1b |
udev_read_db(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
updfstab_domtrans(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
vbetool_domtrans(hald_t)
|
|
Chris PeBenito |
17de1b |
')
|