Chris PeBenito a5ef55
Chris PeBenito a5ef55
policy_module(ifplugd, 1.0.0)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
########################################
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
# Declarations
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
Chris PeBenito a5ef55
type ifplugd_t;
Chris PeBenito a5ef55
type ifplugd_exec_t;
Chris PeBenito a5ef55
init_daemon_domain(ifplugd_t, ifplugd_exec_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# config files
Chris PeBenito a5ef55
type ifplugd_etc_t;
Chris PeBenito a5ef55
files_type(ifplugd_etc_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
type ifplugd_initrc_exec_t;
Chris PeBenito a5ef55
init_script_file(ifplugd_initrc_exec_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# pid files
Chris PeBenito a5ef55
type ifplugd_var_run_t;
Chris PeBenito a5ef55
files_pid_file(ifplugd_var_run_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
########################################
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
# ifplugd local policy
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
Chris PeBenito a5ef55
allow ifplugd_t self:capability { net_admin sys_nice net_bind_service };
Chris PeBenito a5ef55
dontaudit ifplugd_t self:capability { sys_tty_config sys_ptrace };
Chris PeBenito a5ef55
allow ifplugd_t self:process { signal signull };
Chris PeBenito a5ef55
allow ifplugd_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito a5ef55
allow ifplugd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito a5ef55
allow ifplugd_t self:udp_socket create_socket_perms;
Chris PeBenito a5ef55
allow ifplugd_t self:packet_socket create_socket_perms;
Chris PeBenito a5ef55
allow ifplugd_t self:netlink_route_socket create_netlink_socket_perms;
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# pid file
Chris PeBenito a5ef55
manage_files_pattern(ifplugd_t, ifplugd_var_run_t, ifplugd_var_run_t)
Chris PeBenito a5ef55
manage_sock_files_pattern(ifplugd_t, ifplugd_var_run_t, ifplugd_var_run_t)
Chris PeBenito a5ef55
files_pid_filetrans(ifplugd_t, ifplugd_var_run_t, { file sock_file })
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# config files
Chris PeBenito a5ef55
read_files_pattern(ifplugd_t, ifplugd_etc_t, ifplugd_etc_t)
Chris PeBenito a5ef55
exec_files_pattern(ifplugd_t, ifplugd_etc_t, ifplugd_etc_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
kernel_read_system_state(ifplugd_t)
Chris PeBenito a5ef55
kernel_read_network_state(ifplugd_t)
Chris PeBenito a5ef55
kernel_rw_net_sysctls(ifplugd_t)
Chris PeBenito a5ef55
kernel_read_kernel_sysctls(ifplugd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
corecmd_exec_shell(ifplugd_t)
Chris PeBenito a5ef55
corecmd_exec_bin(ifplugd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# reading of hardware information
Chris PeBenito a5ef55
dev_read_sysfs(ifplugd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
domain_read_confined_domains_state(ifplugd_t)
Chris PeBenito a5ef55
domain_dontaudit_read_all_domains_state(ifplugd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
auth_use_nsswitch(ifplugd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
logging_send_syslog_msg(ifplugd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
miscfiles_read_localization(ifplugd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
netutils_domtrans(ifplugd_t)
Chris PeBenito a5ef55
# transition to ifconfig & dhcpc
Chris PeBenito a5ef55
sysnet_domtrans_ifconfig(ifplugd_t)
Chris PeBenito a5ef55
sysnet_domtrans_dhcpc(ifplugd_t)
Chris PeBenito a5ef55
sysnet_delete_dhcpc_pid(ifplugd_t)
Chris PeBenito a5ef55
sysnet_read_dhcpc_pid(ifplugd_t)
Chris PeBenito a5ef55
sysnet_signal_dhcpc(ifplugd_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
optional_policy(`
Chris PeBenito a5ef55
        consoletype_exec(ifplugd_t)
Chris PeBenito a5ef55
')