|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
9570b2 |
policy_module(netutils, 1.9.0)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
4fc915 |
########################################
|
|
Chris PeBenito |
4fc915 |
#
|
|
Chris PeBenito |
4fc915 |
# Declarations
|
|
Chris PeBenito |
4fc915 |
#
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
56e1b3 |
## <desc>
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## Control users use of ping and traceroute
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## </desc>
|
|
Chris PeBenito |
0bfccd |
gen_tunable(user_ping, false)
|
|
Chris PeBenito |
56e1b3 |
|
|
Chris PeBenito |
4fc915 |
type netutils_t;
|
|
Chris PeBenito |
4fc915 |
type netutils_exec_t;
|
|
Chris PeBenito |
0bfccd |
init_system_domain(netutils_t, netutils_exec_t)
|
|
Chris PeBenito |
4fc915 |
role system_r types netutils_t;
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
4fc915 |
type netutils_tmp_t;
|
|
Chris PeBenito |
c9428d |
files_tmp_file(netutils_tmp_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
493d6c |
type ping_t;
|
|
Chris PeBenito |
4fc915 |
type ping_exec_t;
|
|
Chris PeBenito |
0bfccd |
init_system_domain(ping_t, ping_exec_t)
|
|
Chris PeBenito |
4fc915 |
role system_r types ping_t;
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
493d6c |
type traceroute_t;
|
|
Chris PeBenito |
4fc915 |
type traceroute_exec_t;
|
|
Chris PeBenito |
0bfccd |
init_system_domain(traceroute_t, traceroute_exec_t)
|
|
Chris PeBenito |
4fc915 |
role system_r types traceroute_t;
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
4fc915 |
########################################
|
|
Chris PeBenito |
4fc915 |
#
|
|
Chris PeBenito |
4fc915 |
# Netutils local policy
|
|
Chris PeBenito |
4fc915 |
#
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
4fc915 |
# Perform network administration operations and have raw access to the network.
|
|
Chris PeBenito |
4fc915 |
allow netutils_t self:capability { net_admin net_raw setuid setgid };
|
|
Chris PeBenito |
27c570 |
dontaudit netutils_t self:capability sys_tty_config;
|
|
Chris PeBenito |
4fc915 |
allow netutils_t self:process { sigkill sigstop signull signal };
|
|
Chris PeBenito |
4fc915 |
allow netutils_t self:netlink_route_socket { bind create getattr nlmsg_read nlmsg_write read write };
|
|
Chris PeBenito |
dc67f7 |
allow netutils_t self:packet_socket create_socket_perms;
|
|
Chris PeBenito |
dc67f7 |
allow netutils_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
2e0a88 |
allow netutils_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
0bfccd |
manage_dirs_pattern(netutils_t, netutils_tmp_t, netutils_tmp_t)
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(netutils_t, netutils_tmp_t, netutils_tmp_t)
|
|
Chris PeBenito |
103fe2 |
files_tmp_filetrans(netutils_t, netutils_tmp_t, { file dir })
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
b24f35 |
kernel_search_proc(netutils_t)
|
|
Chris PeBenito |
a65fd9 |
kernel_read_all_sysctls(netutils_t)
|
|
Chris PeBenito |
b24f35 |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled(netutils_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(netutils_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(netutils_t)
|
|
Chris PeBenito |
668b30 |
corenet_raw_sendrecv_generic_if(netutils_t)
|
|
Chris PeBenito |
668b30 |
corenet_udp_sendrecv_generic_if(netutils_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(netutils_t)
|
|
Chris PeBenito |
c12621 |
corenet_raw_sendrecv_generic_node(netutils_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(netutils_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_ports(netutils_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_ports(netutils_t)
|
|
Chris PeBenito |
0907bd |
corenet_tcp_connect_all_ports(netutils_t)
|
|
Chris PeBenito |
9d0c9b |
corenet_sendrecv_all_client_packets(netutils_t)
|
|
Chris PeBenito |
123a99 |
corenet_udp_bind_generic_node(netutils_t)
|
|
Chris PeBenito |
0fd9dc |
|
|
Chris PeBenito |
9e8f65 |
dev_read_sysfs(netutils_t)
|
|
Chris PeBenito |
9e8f65 |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(netutils_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(netutils_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(netutils_t)
|
|
Chris PeBenito |
4fc915 |
# for nscd
|
|
Chris PeBenito |
c9428d |
files_dontaudit_search_var(netutils_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
1c1ac6 |
init_use_fds(netutils_t)
|
|
Chris PeBenito |
1815ba |
init_use_script_ptys(netutils_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
74993c |
auth_use_nsswitch(netutils_t)
|
|
Chris PeBenito |
74993c |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(netutils_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
4fc915 |
miscfiles_read_localization(netutils_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(netutils_t)
|
|
Chris PeBenito |
15722e |
userdom_use_all_users_fds(netutils_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(netutils_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
d9845a |
optional_policy(`
|
|
Chris PeBenito |
74993c |
vmware_append_log(netutils_t)
|
|
Chris PeBenito |
74993c |
')
|
|
Chris PeBenito |
74993c |
|
|
Chris PeBenito |
74993c |
optional_policy(`
|
|
Chris PeBenito |
d9845a |
xen_append_log(netutils_t)
|
|
Chris PeBenito |
d9845a |
')
|
|
Chris PeBenito |
d9845a |
|
|
Chris PeBenito |
4fc915 |
########################################
|
|
Chris PeBenito |
4fc915 |
#
|
|
Chris PeBenito |
4fc915 |
# Ping local policy
|
|
Chris PeBenito |
4fc915 |
#
|
|
Chris PeBenito |
4fc915 |
|
|
Don Miner |
8f882f |
allow ping_t self:capability { setuid net_raw };
|
|
Chris PeBenito |
4fc915 |
dontaudit ping_t self:capability sys_tty_config;
|
|
Chris PeBenito |
dc67f7 |
allow ping_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
4fc915 |
allow ping_t self:rawip_socket { create ioctl read write bind getopt setopt };
|
|
Chris PeBenito |
0e1c46 |
allow ping_t self:packet_socket { create ioctl read write bind getopt setopt };
|
|
Chris PeBenito |
74993c |
allow ping_t self:netlink_route_socket create_netlink_socket_perms;
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled(ping_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(ping_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(ping_t)
|
|
Chris PeBenito |
668b30 |
corenet_raw_sendrecv_generic_if(ping_t)
|
|
Chris PeBenito |
c12621 |
corenet_raw_sendrecv_generic_node(ping_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(ping_t)
|
|
Chris PeBenito |
c12621 |
corenet_raw_bind_generic_node(ping_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_ports(ping_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
0fd9dc |
fs_dontaudit_getattr_xattr_fs(ping_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(ping_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(ping_t)
|
|
Chris PeBenito |
c9428d |
files_dontaudit_search_var(ping_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
da0423 |
kernel_read_system_state(ping_t)
|
|
Chris PeBenito |
da0423 |
|
|
Chris PeBenito |
74993c |
auth_use_nsswitch(ping_t)
|
|
Chris PeBenito |
74993c |
|
|
Chris PeBenito |
c0868a |
logging_send_syslog_msg(ping_t)
|
|
Chris PeBenito |
c0868a |
|
|
Chris PeBenito |
27c570 |
miscfiles_read_localization(ping_t)
|
|
Chris PeBenito |
27c570 |
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(ping_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
cf6a7d |
ifdef(`hide_broken_symptoms',`
|
|
Chris PeBenito |
1c1ac6 |
init_dontaudit_use_fds(ping_t)
|
|
Chris PeBenito |
a65fd9 |
|
|
Chris PeBenito |
a65fd9 |
optional_policy(`
|
|
Chris PeBenito |
a65fd9 |
nagios_dontaudit_rw_pipes(ping_t)
|
|
Chris PeBenito |
a65fd9 |
')
|
|
Chris PeBenito |
cf6a7d |
')
|
|
Chris PeBenito |
cf6a7d |
|
|
Chris PeBenito |
350b6a |
tunable_policy(`user_ping',`
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ttys(ping_t)
|
|
Chris PeBenito |
0fd9dc |
term_use_all_user_ptys(ping_t)
|
|
Chris PeBenito |
3eed10 |
')
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
da0423 |
munin_append_log(ping_t)
|
|
Chris PeBenito |
da0423 |
')
|
|
Chris PeBenito |
da0423 |
|
|
Chris PeBenito |
da0423 |
optional_policy(`
|
|
Chris PeBenito |
15722e |
pcmcia_use_cardmgr_fds(ping_t)
|
|
Chris PeBenito |
cf6a7d |
')
|
|
Chris PeBenito |
cf6a7d |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1c1ac6 |
hotplug_use_fds(ping_t)
|
|
Chris PeBenito |
ebdc3b |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
4fc915 |
########################################
|
|
Chris PeBenito |
4fc915 |
#
|
|
Chris PeBenito |
4fc915 |
# Traceroute local policy
|
|
Chris PeBenito |
4fc915 |
#
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
4fc915 |
allow traceroute_t self:capability { net_admin net_raw setuid setgid };
|
|
Chris PeBenito |
dc67f7 |
allow traceroute_t self:rawip_socket create_socket_perms;
|
|
Chris PeBenito |
dc67f7 |
allow traceroute_t self:packet_socket create_socket_perms;
|
|
Don Miner |
8f882f |
allow traceroute_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
4fc915 |
kernel_read_system_state(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
kernel_read_network_state(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled(traceroute_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(traceroute_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(traceroute_t)
|
|
Chris PeBenito |
668b30 |
corenet_udp_sendrecv_generic_if(traceroute_t)
|
|
Chris PeBenito |
668b30 |
corenet_raw_sendrecv_generic_if(traceroute_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(traceroute_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(traceroute_t)
|
|
Chris PeBenito |
c12621 |
corenet_raw_sendrecv_generic_node(traceroute_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_tcp_sendrecv_all_ports(traceroute_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_ports(traceroute_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_bind_generic_node(traceroute_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_bind_generic_node(traceroute_t)
|
|
Don Miner |
8f882f |
# traceroute needs this but not tracepath
|
|
Chris PeBenito |
c12621 |
corenet_raw_bind_generic_node(traceroute_t)
|
|
Chris PeBenito |
165b42 |
corenet_udp_bind_traceroute_port(traceroute_t)
|
|
Chris PeBenito |
2705f9 |
corenet_tcp_connect_all_ports(traceroute_t)
|
|
Chris PeBenito |
9d0c9b |
corenet_sendrecv_all_client_packets(traceroute_t)
|
|
Chris PeBenito |
9d0c9b |
corenet_sendrecv_traceroute_server_packets(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
0fd9dc |
fs_dontaudit_getattr_xattr_fs(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(traceroute_t)
|
|
Chris PeBenito |
c9428d |
files_dontaudit_search_var(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
165b42 |
init_use_fds(traceroute_t)
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
74993c |
auth_use_nsswitch(traceroute_t)
|
|
Chris PeBenito |
74993c |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
4fc915 |
miscfiles_read_localization(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(traceroute_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
4fc915 |
#rules needed for nmap
|
|
Karl MacMillan |
f0c985 |
dev_read_rand(traceroute_t)
|
|
Karl MacMillan |
f0c985 |
dev_read_urand(traceroute_t)
|
|
Chris PeBenito |
c9428d |
files_read_usr_files(traceroute_t)
|
|
Chris PeBenito |
4fc915 |
|
|
Chris PeBenito |
350b6a |
tunable_policy(`user_ping',`
|
|
Chris PeBenito |
350b6a |
term_use_all_user_ttys(traceroute_t)
|
|
Chris PeBenito |
350b6a |
term_use_all_user_ptys(traceroute_t)
|
|
Chris PeBenito |
3eed10 |
')
|