Chris PeBenito 9570b2
policy_module(jabber, 1.8.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Dan Walsh 5fb4db
attribute jabberd_domain;
Dan Walsh 5fb4db
Dan Walsh 5fb4db
type jabberd_t, jabberd_domain;
Chris PeBenito 17de1b
type jabberd_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(jabberd_t, jabberd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito e87221
type jabberd_initrc_exec_t;
Chris PeBenito e87221
init_script_file(jabberd_initrc_exec_t)
Chris PeBenito e87221
Dan Walsh 5fb4db
type jabberd_router_t, jabberd_domain;
Dan Walsh 5fb4db
type jabberd_router_exec_t;
Dan Walsh 5fb4db
init_daemon_domain(jabberd_router_t, jabberd_router_exec_t)
Dan Walsh 5fb4db
Chris PeBenito 17de1b
type jabberd_log_t;
Chris PeBenito 17de1b
logging_log_file(jabberd_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type jabberd_var_lib_t;
Chris PeBenito 17de1b
files_type(jabberd_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type jabberd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(jabberd_var_run_t)
Chris PeBenito 17de1b
Dan Walsh 5fb4db
permissive jabberd_router_t;
Dan Walsh 5fb4db
permissive jabberd_t;
Dan Walsh 5fb4db
Dan Walsh 5fb4db
#######################################
Chris PeBenito 17de1b
#
Dan Walsh 5fb4db
# Local policy for jabberd domains
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Dan Walsh 5fb4db
allow jabberd_domain self:process signal_perms;
Dan Walsh 5fb4db
allow jabberd_domain self:fifo_file read_fifo_file_perms;
Dan Walsh 5fb4db
allow jabberd_domain self:tcp_socket create_stream_socket_perms;
Dan Walsh 5fb4db
allow jabberd_domain self:udp_socket create_socket_perms;
Dan Walsh 5fb4db
Dan Walsh 5fb4db
manage_files_pattern(jabberd_domain, jabberd_var_lib_t, jabberd_var_lib_t)
Dan Walsh 5fb4db
manage_dirs_pattern(jabberd_domain, jabberd_var_lib_t, jabberd_var_lib_t)
Dan Walsh 5fb4db
Dan Walsh 5fb4db
# log and pid files are moved into /var/lib/jabberd in the newer version of jabberd
Dan Walsh 5fb4db
manage_files_pattern(jabberd_domain, jabberd_log_t, jabberd_log_t)
Dan Walsh 5fb4db
logging_log_filetrans(jabberd_domain, jabberd_log_t, { file dir })
Dan Walsh 5fb4db
Dan Walsh 5fb4db
manage_files_pattern(jabberd_domain, jabberd_var_run_t, jabberd_var_run_t)
Dan Walsh 5fb4db
files_pid_filetrans(jabberd_domain, jabberd_var_run_t, file)
Dan Walsh 5fb4db
Dan Walsh 5fb4db
corenet_all_recvfrom_unlabeled(jabberd_domain)
Dan Walsh 5fb4db
corenet_all_recvfrom_netlabel(jabberd_domain)
Dan Walsh 5fb4db
corenet_tcp_sendrecv_generic_if(jabberd_domain)
Dan Walsh 5fb4db
corenet_udp_sendrecv_generic_if(jabberd_domain)
Dan Walsh 5fb4db
corenet_tcp_sendrecv_generic_node(jabberd_domain)
Dan Walsh 5fb4db
corenet_udp_sendrecv_generic_node(jabberd_domain)
Dan Walsh 5fb4db
corenet_tcp_sendrecv_all_ports(jabberd_domain)
Dan Walsh 5fb4db
corenet_udp_sendrecv_all_ports(jabberd_domain)
Dan Walsh 5fb4db
corenet_tcp_bind_generic_node(jabberd_domain)
Dan Walsh 5fb4db
Dan Walsh 5fb4db
dev_read_urand(jabberd_domain)
Dan Walsh 5fb4db
dev_read_urand(jabberd_domain)
Dan Walsh 5fb4db
Dan Walsh 5fb4db
files_read_etc_files(jabberd_domain)
Dan Walsh 5fb4db
files_read_etc_runtime_files(jabberd_domain)
Dan Walsh 5fb4db
Dan Walsh 5fb4db
logging_send_syslog_msg(jabberd_domain)
Dan Walsh 5fb4db
Dan Walsh 5fb4db
miscfiles_read_localization(jabberd_domain)
Dan Walsh 5fb4db
Dan Walsh 5fb4db
sysnet_read_config(jabberd_domain)
Chris PeBenito 17de1b
Dan Walsh 5fb4db
######################################
Dan Walsh 5fb4db
#
Dan Walsh 5fb4db
# Local policy for jabberd-router
Dan Walsh 5fb4db
#
Dan Walsh 5fb4db
Dan Walsh 5fb4db
allow jabberd_router_t self:netlink_route_socket r_netlink_socket_perms;
Dan Walsh 5fb4db
Dan Walsh 5fb4db
corenet_tcp_bind_jabber_router_port(jabberd_router_t)
Dan Walsh 5fb4db
corenet_sendrecv_jabber_router_server_packets(jabberd_router_t)
Chris PeBenito 17de1b
Dan Walsh 5fb4db
optional_policy(`
Dominick Grift 68ac47
	kerberos_use(jabberd_router_t)
Dan Walsh 5fb4db
')
Dan Walsh 5fb4db
Dan Walsh 5fb4db
########################################
Dan Walsh 5fb4db
#
Dan Walsh 5fb4db
# Local policy for jabberd
Dan Walsh 5fb4db
#
Chris PeBenito 17de1b
Dan Walsh 5fb4db
allow jabberd_t self:capability dac_override;
Dan Walsh 5fb4db
dontaudit jabberd_t self:capability sys_tty_config;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(jabberd_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(jabberd_t)
Dan Walsh 5fb4db
kernel_read_system_state(jabberd_t)
Chris PeBenito 17de1b
Dan Walsh 5fb4db
corenet_tcp_connect_jabber_router_port(jabberd_t)
Chris PeBenito 17de1b
corenet_tcp_bind_jabber_client_port(jabberd_t)
Chris PeBenito 17de1b
corenet_tcp_bind_jabber_interserver_port(jabberd_t)
Chris PeBenito 17de1b
corenet_sendrecv_jabber_client_server_packets(jabberd_t)
Chris PeBenito 17de1b
corenet_sendrecv_jabber_interserver_server_packets(jabberd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(jabberd_t)
Chris PeBenito 17de1b
# For SSL
Chris PeBenito 17de1b
dev_read_rand(jabberd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(jabberd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(jabberd_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(jabberd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(jabberd_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(jabberd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(jabberd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(jabberd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(jabberd_t)
Chris PeBenito 17de1b
')