|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
cdc86e |
policy_module(hal,1.3.5)
|
|
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 |
8cfa5a |
allow hald_t self:capability { chown setuid setgid kill net_admin sys_admin sys_nice dac_override dac_read_search mknod sys_rawio sys_tty_config };
|
|
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 |
103fe2 |
files_tmp_filetrans(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 |
1c1ac6 |
files_pid_filetrans(hald_t,hald_var_run_t,file)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
kernel_read_system_state(hald_t)
|
|
Chris PeBenito |
fdae8e |
kernel_read_network_state(hald_t)
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls(hald_t)
|
|
Chris PeBenito |
445522 |
kernel_read_fs_sysctls(hald_t)
|
|
Chris PeBenito |
a3cf80 |
kernel_rw_vm_sysctls(hald_t)
|
|
Chris PeBenito |
445522 |
kernel_write_proc_files(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
1c1ac6 |
files_search_boot(hald_t)
|
|
Chris PeBenito |
8cfa5a |
files_getattr_home_dir(hald_t)
|
|
Chris PeBenito |
8cfa5a |
|
|
Chris PeBenito |
8cfa5a |
auth_read_pam_console_data(hald_t)
|
|
Chris PeBenito |
93727e |
|
|
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 |
207c47 |
dev_manage_generic_chr_files(hald_t)
|
|
Chris PeBenito |
a3cf80 |
dev_rw_generic_usb_dev(hald_t)
|
|
Chris PeBenito |
c655ec |
dev_setattr_generic_usb_dev(hald_t)
|
|
Chris PeBenito |
c655ec |
dev_setattr_usbfs_files(hald_t)
|
|
Chris PeBenito |
a3cf80 |
|
|
Chris PeBenito |
049e11 |
# hal is now execing pm-suspend
|
|
Chris PeBenito |
049e11 |
dev_rw_sysfs(hald_t)
|
|
Chris PeBenito |
049e11 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(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 |
a77e65 |
files_manage_mnt_dirs(hald_t)
|
|
Chris PeBenito |
93727e |
files_manage_mnt_files(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 |
8cfa5a |
files_getattr_default_dirs(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
fs_getattr_all_fs(hald_t)
|
|
Chris PeBenito |
a1fcff |
fs_search_all(hald_t)
|
|
Chris PeBenito |
0f27d9 |
fs_list_auto_mountpoints(hald_t)
|
|
Chris PeBenito |
cdc86e |
files_getattr_all_mountpoints(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
a77e65 |
mls_file_read_up(hald_t)
|
|
Chris PeBenito |
a77e65 |
|
|
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 |
b0d224 |
term_dontaudit_use_generic_ptys(hald_t)
|
|
Chris PeBenito |
a3cf80 |
term_use_unallocated_ttys(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
1c1ac6 |
init_use_fds(hald_t)
|
|
Chris PeBenito |
1815ba |
init_use_script_ptys(hald_t)
|
|
Chris PeBenito |
9cca1c |
init_domtrans_script(hald_t)
|
|
Chris PeBenito |
51a89c |
init_write_initctl(hald_t)
|
|
Chris PeBenito |
51a89c |
init_read_utmp(hald_t)
|
|
Chris PeBenito |
b0d224 |
#hal runs shutdown, probably need a shutdown domain
|
|
Chris PeBenito |
b0d224 |
init_rw_utmp(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 |
8cf671 |
logging_search_logs(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 |
8cf671 |
modutils_domtrans_insmod(hald_t)
|
|
Chris PeBenito |
8cf671 |
|
|
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 |
15722e |
userdom_dontaudit_use_unpriv_user_fds(hald_t)
|
|
Chris PeBenito |
103fe2 |
userdom_dontaudit_search_sysadm_home_dirs(hald_t)
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
fdae8e |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
a3cf80 |
term_setattr_unallocated_ttys(hald_t)
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_unallocated_ttys(hald_t)
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_generic_ptys(hald_t)
|
|
Chris PeBenito |
9e04f5 |
files_dontaudit_read_root_files(hald_t)
|
|
Chris PeBenito |
0a7728 |
files_dontaudit_getattr_home_dir(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
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 |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
b0d224 |
automount_dontaudit_getattr_tmp_dirs(hald_t)
|
|
Chris PeBenito |
b0d224 |
')
|
|
Chris PeBenito |
b0d224 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
93727e |
bind_search_cache(hald_t)
|
|
Chris PeBenito |
93727e |
')
|
|
Chris PeBenito |
93727e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
9cca1c |
clock_domtrans(hald_t)
|
|
Chris PeBenito |
9cca1c |
')
|
|
Chris PeBenito |
9cca1c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
725926 |
cups_domtrans_config(hald_t)
|
|
Chris PeBenito |
9fd4b8 |
cups_signal_config(hald_t)
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
fdae8e |
dbus_system_bus_client_template(hald,hald_t)
|
|
Chris PeBenito |
1815ba |
dbus_send_system_bus(hald_t)
|
|
Chris PeBenito |
fdae8e |
dbus_connect_system_bus(hald_t)
|
|
Chris PeBenito |
93727e |
allow hald_t self:dbus send_msg;
|
|
Chris PeBenito |
d828b5 |
|
|
Chris PeBenito |
f525b4 |
init_dbus_chat_script(hald_t)
|
|
Chris PeBenito |
f525b4 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
d828b5 |
networkmanager_dbus_chat(hald_t)
|
|
Chris PeBenito |
d828b5 |
')
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
20e306 |
# For /usr/libexec/hald-probe-smbios
|
|
Chris PeBenito |
20e306 |
dmidecode_domtrans(hald_t)
|
|
Chris PeBenito |
20e306 |
')
|
|
Chris PeBenito |
20e306 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
fdae8e |
hotplug_read_config(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
a3cf80 |
lvm_domtrans(hald_t)
|
|
Chris PeBenito |
a3cf80 |
')
|
|
Chris PeBenito |
a3cf80 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
a1fcff |
mount_domtrans(hald_t)
|
|
Chris PeBenito |
a1fcff |
')
|
|
Chris PeBenito |
a1fcff |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
fdae8e |
nis_use_ypbind(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
724925 |
ntp_domtrans(hald_t)
|
|
Chris PeBenito |
724925 |
')
|
|
Chris PeBenito |
724925 |
|
|
Chris PeBenito |
724925 |
optional_policy(`
|
|
Chris PeBenito |
603f90 |
pcmcia_manage_pid(hald_t)
|
|
Chris PeBenito |
1815ba |
pcmcia_manage_pid_chr_files(hald_t)
|
|
Chris PeBenito |
603f90 |
')
|
|
Chris PeBenito |
603f90 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
a77e65 |
rpc_search_nfs_state_data(hald_t)
|
|
Chris PeBenito |
a77e65 |
')
|
|
Chris PeBenito |
a77e65 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
fdae8e |
seutil_sigchld_newrole(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
fdae8e |
udev_domtrans(hald_t)
|
|
Chris PeBenito |
fdae8e |
udev_read_db(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
fdae8e |
updfstab_domtrans(hald_t)
|
|
Chris PeBenito |
fdae8e |
')
|
|
Chris PeBenito |
fdae8e |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
9cca1c |
vbetool_domtrans(hald_t)
|
|
Chris PeBenito |
9cca1c |
')
|