|
Chris PeBenito |
9570b2 |
policy_module(irc, 2.1.0)
|
|
Chris PeBenito |
8cffa7 |
|
|
Chris PeBenito |
8cffa7 |
########################################
|
|
Chris PeBenito |
8cffa7 |
#
|
|
Chris PeBenito |
8cffa7 |
# Declarations
|
|
Chris PeBenito |
8cffa7 |
#
|
|
Chris PeBenito |
8cffa7 |
|
|
Chris PeBenito |
296273 |
type irc_t;
|
|
Chris PeBenito |
8cffa7 |
type irc_exec_t;
|
|
Chris PeBenito |
296273 |
typealias irc_t alias { user_irc_t staff_irc_t sysadm_irc_t };
|
|
Chris PeBenito |
296273 |
typealias irc_t alias { auditadm_irc_t secadm_irc_t };
|
|
Chris PeBenito |
296273 |
application_domain(irc_t, irc_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type irc_home_t;
|
|
Chris PeBenito |
296273 |
typealias irc_home_t alias { user_irc_home_t staff_irc_home_t sysadm_irc_home_t };
|
|
Chris PeBenito |
296273 |
typealias irc_home_t alias { auditadm_irc_home_t secadm_irc_home_t };
|
|
Chris PeBenito |
296273 |
userdom_user_home_content(irc_home_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type irc_tmp_t;
|
|
Chris PeBenito |
296273 |
typealias irc_tmp_t alias { user_irc_tmp_t staff_irc_tmp_t sysadm_irc_tmp_t };
|
|
Chris PeBenito |
296273 |
typealias irc_tmp_t alias { auditadm_irc_tmp_t secadm_irc_tmp_t };
|
|
Chris PeBenito |
296273 |
userdom_user_home_content(irc_tmp_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
296273 |
#
|
|
Dan Walsh |
3eaa99 |
# Irssi personal declarations.
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
## <desc>
|
|
Dan Walsh |
3eaa99 |
##
|
|
Dan Walsh |
3eaa99 |
## Allow the Irssi IRC Client to connect to any port,
|
|
Dan Walsh |
3eaa99 |
## and to bind to any unreserved port.
|
|
Dan Walsh |
3eaa99 |
##
|
|
Dan Walsh |
3eaa99 |
## </desc>
|
|
Dan Walsh |
3eaa99 |
gen_tunable(irssi_use_full_network, false)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type irssi_t;
|
|
Dan Walsh |
3eaa99 |
type irssi_exec_t;
|
|
Dan Walsh |
3eaa99 |
application_domain(irssi_t, irssi_exec_t)
|
|
Dan Walsh |
3eaa99 |
ubac_constrained(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type irssi_etc_t;
|
|
Dan Walsh |
3eaa99 |
files_config_file(irssi_etc_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type irssi_home_t;
|
|
Dan Walsh |
3eaa99 |
userdom_user_home_content(irssi_home_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Chris PeBenito |
296273 |
# Local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow irc_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
296273 |
allow irc_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
allow irc_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern(irc_t, irc_home_t, irc_home_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern(irc_t, irc_home_t, irc_home_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern(irc_t, irc_home_t, irc_home_t)
|
|
Chris PeBenito |
296273 |
userdom_user_home_dir_filetrans(irc_t, irc_home_t, { dir file lnk_file })
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# access files under /tmp
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern(irc_t, irc_tmp_t, irc_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern(irc_t, irc_tmp_t, irc_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern(irc_t, irc_tmp_t, irc_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_fifo_files_pattern(irc_t, irc_tmp_t, irc_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern(irc_t, irc_tmp_t, irc_tmp_t)
|
|
Chris PeBenito |
296273 |
files_tmp_filetrans(irc_t, irc_tmp_t, { file dir lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
kernel_read_proc_symlinks(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
corenet_all_recvfrom_unlabeled(irc_t)
|
|
Chris PeBenito |
296273 |
corenet_all_recvfrom_netlabel(irc_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_sendrecv_generic_if(irc_t)
|
|
Chris PeBenito |
296273 |
corenet_udp_sendrecv_generic_if(irc_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(irc_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(irc_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_sendrecv_all_ports(irc_t)
|
|
Chris PeBenito |
296273 |
corenet_udp_sendrecv_all_ports(irc_t)
|
|
Chris PeBenito |
296273 |
corenet_sendrecv_ircd_client_packets(irc_t)
|
|
Chris PeBenito |
296273 |
# cjp: this seems excessive:
|
|
Chris PeBenito |
296273 |
corenet_tcp_connect_all_ports(irc_t)
|
|
Chris PeBenito |
296273 |
corenet_sendrecv_all_client_packets(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
domain_use_interactive_fds(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_dontaudit_search_pids(irc_t)
|
|
Chris PeBenito |
296273 |
files_search_var(irc_t)
|
|
Chris PeBenito |
296273 |
files_read_etc_files(irc_t)
|
|
Chris PeBenito |
296273 |
files_read_usr_files(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
fs_getattr_xattr_fs(irc_t)
|
|
Chris PeBenito |
296273 |
fs_search_auto_mountpoints(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
term_use_controlling_term(irc_t)
|
|
Chris PeBenito |
296273 |
term_list_ptys(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# allow utmp access
|
|
Chris PeBenito |
296273 |
init_read_utmp(irc_t)
|
|
Chris PeBenito |
296273 |
init_dontaudit_lock_utmp(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
miscfiles_read_localization(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Inherit and use descriptors from newrole.
|
|
Chris PeBenito |
296273 |
seutil_use_newrole_fds(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
sysnet_read_config(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Write to the user domain tty.
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(irc_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_dirs(irc_t)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_files(irc_t)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_symlinks(irc_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_dirs(irc_t)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_files(irc_t)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_symlinks(irc_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
nis_use_ypbind(irc_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# Irssi personal declarations.
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow irssi_t self:process { signal sigkill };
|
|
Dan Walsh |
3eaa99 |
allow irssi_t self:fifo_file rw_fifo_file_perms;
|
|
Dan Walsh |
3eaa99 |
allow irssi_t self:netlink_route_socket create_netlink_socket_perms;
|
|
Dan Walsh |
3eaa99 |
allow irssi_t self:tcp_socket create_stream_socket_perms;
|
|
Dan Walsh |
3eaa99 |
allow irssi_t self:udp_socket create_socket_perms;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
read_files_pattern(irssi_t, irssi_etc_t, irssi_etc_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern(irssi_t, irssi_home_t, irssi_home_t)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern(irssi_t, irssi_home_t, irssi_home_t)
|
|
Dan Walsh |
3eaa99 |
manage_lnk_files_pattern(irssi_t, irssi_home_t, irssi_home_t)
|
|
Dan Walsh |
3eaa99 |
userdom_user_home_dir_filetrans(irssi_t, irssi_home_t, { dir file lnk_file })
|
|
Dan Walsh |
3eaa99 |
userdom_search_user_home_dirs(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corecmd_search_bin(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corecmd_read_bin_symlinks(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_connect_ircd_port(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_sendrecv_ircd_client_packets(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
# Privoxy
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_connect_http_cache_port(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_sendrecv_http_cache_client_packets(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corenet_all_recvfrom_netlabel(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_all_recvfrom_unlabeled(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_sendrecv_generic_if(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_sendrecv_generic_node(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_sendrecv_generic_port(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_bind_generic_node(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_udp_bind_generic_node(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
dev_read_urand(irssi_t)
|
|
Dan Walsh |
3eaa99 |
# irssi-otr genkey.
|
|
Dan Walsh |
3eaa99 |
dev_read_rand(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_read_etc_files(irssi_t)
|
|
Dan Walsh |
3eaa99 |
files_read_usr_files(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
fs_search_auto_mountpoints(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
miscfiles_read_localization(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
sysnet_read_config(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
userdom_use_user_terminals(irssi_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`irssi_use_full_network', `
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_bind_all_unreserved_ports(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_connect_all_ports(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_sendrecv_generic_server_packets(irssi_t)
|
|
Dan Walsh |
3eaa99 |
corenet_sendrecv_all_client_packets(irssi_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`use_nfs_home_dirs', `
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_dirs(irssi_t)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_files(irssi_t)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_symlinks(irssi_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`use_samba_home_dirs', `
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_dirs(irssi_t)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_files(irssi_t)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_symlinks(irssi_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
automount_dontaudit_getattr_tmp_dirs(irssi_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
nis_use_ypbind(irssi_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|