|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
2b3c99 |
policy_module(hotplug,1.2.0)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
6b9383 |
########################################
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
6b9383 |
# Declarations
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
6b9383 |
type hotplug_t;
|
|
Chris PeBenito |
6b9383 |
type hotplug_exec_t;
|
|
Chris PeBenito |
270d42 |
kernel_domtrans_to(hotplug_t,hotplug_exec_t)
|
|
Chris PeBenito |
b53f93 |
init_daemon_domain(hotplug_t,hotplug_exec_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
9bbc75 |
type hotplug_etc_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(hotplug_etc_t)
|
|
Chris PeBenito |
725926 |
init_daemon_domain(hotplug_t,hotplug_etc_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
6b9383 |
type hotplug_var_run_t;
|
|
Chris PeBenito |
c9428d |
files_pid_file(hotplug_var_run_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
6b9383 |
########################################
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
6b9383 |
# Local policy
|
|
Chris PeBenito |
6b9383 |
#
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
98a8ea |
allow hotplug_t self:capability { net_admin sys_tty_config mknod sys_rawio };
|
|
Chris PeBenito |
6b9383 |
dontaudit hotplug_t self:capability { sys_module sys_admin sys_tty_config };
|
|
Chris PeBenito |
6b9383 |
# for access("/etc/bashrc", X_OK) on Red Hat
|
|
Chris PeBenito |
6b9383 |
dontaudit hotplug_t self:capability { dac_override dac_read_search };
|
|
Chris PeBenito |
e6a2ea |
allow hotplug_t self:process { getsession getattr signal_perms };
|
|
Chris PeBenito |
0fd9dc |
allow hotplug_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
98a8ea |
allow hotplug_t self:netlink_route_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
dd8229 |
allow hotplug_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
dd8229 |
allow hotplug_t self:tcp_socket connected_stream_socket_perms;
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
dd8229 |
allow hotplug_t hotplug_etc_t:file r_file_perms;
|
|
Chris PeBenito |
dd8229 |
allow hotplug_t hotplug_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
dd8229 |
allow hotplug_t hotplug_etc_t:lnk_file r_file_perms;
|
|
Chris PeBenito |
e6a2ea |
can_exec(hotplug_t,hotplug_etc_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
e6a2ea |
can_exec(hotplug_t,hotplug_exec_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
e6a2ea |
allow hotplug_t hotplug_var_run_t:file manage_file_perms;
|
|
Chris PeBenito |
ce0ff1 |
allow hotplug_t hotplug_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
1c1ac6 |
files_pid_filetrans(hotplug_t,hotplug_var_run_t,file)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
7a2f20 |
kernel_sigchld(hotplug_t)
|
|
Chris PeBenito |
98a8ea |
kernel_setpgid(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
kernel_read_system_state(hotplug_t)
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls(hotplug_t)
|
|
Chris PeBenito |
445522 |
kernel_read_net_sysctls(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
1c1ac6 |
files_read_kernel_modules(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_if(hotplug_t)
|
|
Chris PeBenito |
b53f93 |
corenet_udp_sendrecv_all_if(hotplug_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_if(hotplug_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_nodes(hotplug_t)
|
|
Chris PeBenito |
b53f93 |
corenet_udp_sendrecv_all_nodes(hotplug_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_nodes(hotplug_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_ports(hotplug_t)
|
|
Chris PeBenito |
b53f93 |
corenet_udp_sendrecv_all_ports(hotplug_t)
|
|
Chris PeBenito |
bd7037 |
corenet_non_ipsec_sendrecv(hotplug_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_bind_all_nodes(hotplug_t)
|
|
Chris PeBenito |
b53f93 |
corenet_udp_bind_all_nodes(hotplug_t)
|
|
Chris PeBenito |
dc771f |
|
|
Chris PeBenito |
98a8ea |
dev_rw_sysfs(hotplug_t)
|
|
Chris PeBenito |
d35c62 |
dev_read_usbfs(hotplug_t)
|
|
Chris PeBenito |
207c47 |
dev_setattr_printer_dev(hotplug_t)
|
|
Chris PeBenito |
207c47 |
dev_setattr_sound_dev(hotplug_t)
|
|
Chris PeBenito |
d35c62 |
# for SSP:
|
|
Karl MacMillan |
f0c985 |
dev_read_urand(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_all_fs(hotplug_t)
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
1815ba |
storage_setattr_fixed_disk_dev(hotplug_t)
|
|
Chris PeBenito |
1815ba |
storage_setattr_removable_dev(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
0fd9dc |
term_dontaudit_use_console(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
c9428d |
corecmd_exec_bin(hotplug_t)
|
|
Chris PeBenito |
c9428d |
corecmd_exec_shell(hotplug_t)
|
|
Chris PeBenito |
c9428d |
corecmd_exec_sbin(hotplug_t)
|
|
Chris PeBenito |
9ca7e7 |
corecmd_exec_ls(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(hotplug_t)
|
|
Chris PeBenito |
3774e4 |
# for ps
|
|
Chris PeBenito |
3774e4 |
domain_dontaudit_read_all_domains_state(hotplug_t)
|
|
Chris PeBenito |
ac9aa2 |
domain_dontaudit_getattr_all_domains(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(hotplug_t)
|
|
Chris PeBenito |
c9428d |
files_manage_etc_runtime_files(hotplug_t)
|
|
Chris PeBenito |
6714c2 |
files_etc_filetrans_etc_runtime(hotplug_t,file)
|
|
Chris PeBenito |
8fd367 |
files_exec_etc_files(hotplug_t)
|
|
Chris PeBenito |
3b857e |
# for when filesystems are not mounted early in the boot:
|
|
Chris PeBenito |
9e04f5 |
files_dontaudit_search_isid_type_dirs(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
1c1ac6 |
init_use_fds(hotplug_t)
|
|
Chris PeBenito |
1815ba |
init_use_script_ptys(hotplug_t)
|
|
Chris PeBenito |
1815ba |
init_read_script_state(hotplug_t)
|
|
Chris PeBenito |
daa0e0 |
# Allow hotplug (including /sbin/ifup-local) to start/stop services and
|
|
Chris PeBenito |
daa0e0 |
# run sendmail -q
|
|
Chris PeBenito |
c9428d |
init_domtrans_script(hotplug_t)
|
|
Chris PeBenito |
daa0e0 |
# kernel threads inherit from shared descriptor table used by init
|
|
Chris PeBenito |
1815ba |
init_dontaudit_rw_initctl(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(hotplug_t)
|
|
Chris PeBenito |
c9428d |
logging_search_logs(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(hotplug_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(hotplug_t)
|
|
Chris PeBenito |
118186 |
# Read /usr/lib/gconv/.*
|
|
Chris PeBenito |
1815ba |
libs_read_lib_files(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
77f6e2 |
miscfiles_read_hwdata(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
miscfiles_read_localization(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
ce0ff1 |
modutils_domtrans_insmod(hotplug_t)
|
|
Chris PeBenito |
1815ba |
modutils_read_module_deps(hotplug_t)
|
|
Chris PeBenito |
ce0ff1 |
|
|
Chris PeBenito |
98a8ea |
seutil_dontaudit_search_config(hotplug_t)
|
|
Chris PeBenito |
98a8ea |
|
|
Chris PeBenito |
c9428d |
sysnet_read_config(hotplug_t)
|
|
Chris PeBenito |
dc771f |
|
|
Chris PeBenito |
15722e |
userdom_dontaudit_use_unpriv_user_fds(hotplug_t)
|
|
Chris PeBenito |
103fe2 |
userdom_dontaudit_search_sysadm_home_dirs(hotplug_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
254bbc |
ifdef(`distro_redhat', `
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
0c73cd |
# for arping used for static IP addresses on PCMCIA ethernet
|
|
Chris PeBenito |
c9428d |
netutils_domtrans(hotplug_t)
|
|
Chris PeBenito |
4d851f |
fs_rw_tmpfs_chr_files(hotplug_t)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
8fd367 |
files_getattr_generic_locks(hotplug_t)
|
|
Chris PeBenito |
0c73cd |
')
|
|
Chris PeBenito |
dc771f |
|
|
Chris PeBenito |
254bbc |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_unallocated_ttys(hotplug_t)
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_generic_ptys(hotplug_t)
|
|
Chris PeBenito |
9ca7e7 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
605ba2 |
consoletype_domtrans(hotplug_t)
|
|
Chris PeBenito |
605ba2 |
')
|
|
Chris PeBenito |
6b9383 |
')
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
0c3d17 |
dbus_system_bus_client_template(hotplug,hotplug_t)
|
|
Chris PeBenito |
0c3d17 |
')
|
|
Chris PeBenito |
0c3d17 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
58c3da |
fstools_domtrans(hotplug_t)
|
|
Chris PeBenito |
58c3da |
')
|
|
Chris PeBenito |
58c3da |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1c1ac6 |
hal_dgram_send(hotplug_t)
|
|
Chris PeBenito |
725926 |
')
|
|
Chris PeBenito |
725926 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
c9428d |
hostname_exec(hotplug_t)
|
|
Chris PeBenito |
13e94c |
')
|
|
Chris PeBenito |
13e94c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
c9428d |
iptables_domtrans(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
')
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
2705f9 |
mount_domtrans(hotplug_t)
|
|
Chris PeBenito |
2705f9 |
')
|
|
Chris PeBenito |
2705f9 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
0c73cd |
mta_send_mail(hotplug_t)
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(hotplug_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use(hotplug_t)
|
|
Chris PeBenito |
77f6e2 |
')
|
|
Chris PeBenito |
77f6e2 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
8fd367 |
seutil_sigchld_newrole(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
')
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ebdc3b |
sysnet_domtrans_dhcpc(hotplug_t)
|
|
Chris PeBenito |
ebdc3b |
sysnet_signal_dhcpc(hotplug_t)
|
|
Chris PeBenito |
ebdc3b |
sysnet_kill_dhcpc(hotplug_t)
|
|
Chris PeBenito |
ebdc3b |
sysnet_signull_dhcpc(hotplug_t)
|
|
Chris PeBenito |
ebdc3b |
sysnet_sigstop_dhcpc(hotplug_t)
|
|
Chris PeBenito |
ebdc3b |
sysnet_sigchld_dhcpc(hotplug_t)
|
|
Chris PeBenito |
ebdc3b |
sysnet_read_dhcpc_pid(hotplug_t)
|
|
Chris PeBenito |
ebdc3b |
sysnet_rw_dhcp_config(hotplug_t)
|
|
Chris PeBenito |
c9428d |
sysnet_domtrans_ifconfig(hotplug_t)
|
|
Chris PeBenito |
13e94c |
')
|
|
Chris PeBenito |
13e94c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
c9428d |
udev_domtrans(hotplug_t)
|
|
Chris PeBenito |
0500e0 |
udev_helper_domtrans(hotplug_t)
|
|
Chris PeBenito |
c9428d |
udev_read_db(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
')
|
|
Chris PeBenito |
6b9383 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
dce68d |
updfstab_domtrans(hotplug_t)
|
|
Chris PeBenito |
6b9383 |
')
|
|
Chris PeBenito |
44f490 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
44f490 |
usbmodules_domtrans(hotplug_t)
|
|
Chris PeBenito |
44f490 |
')
|