Chris PeBenito 17de1b
Chris PeBenito 9570b2
policy_module(kerberos, 1.10.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 56e1b3
## <desc>
Chris PeBenito 56e1b3
## 

Chris PeBenito dd9e1d
## Allow confined applications to run with kerberos.
Chris PeBenito 56e1b3
## 

Chris PeBenito 56e1b3
## </desc>
Chris PeBenito 0bfccd
gen_tunable(allow_kerberos, false)
Chris PeBenito 56e1b3
Chris PeBenito 17de1b
type kadmind_t;
Chris PeBenito 17de1b
type kadmind_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(kadmind_t, kadmind_exec_t)
Chris PeBenito 04d286
domain_obj_id_change_exemption(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type kadmind_log_t;
Chris PeBenito 17de1b
logging_log_file(kadmind_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type kadmind_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(kadmind_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type kadmind_var_run_t;
Chris PeBenito 17de1b
files_pid_file(kadmind_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 04d286
type kerberos_initrc_exec_t;
Chris PeBenito 04d286
init_script_file(kerberos_initrc_exec_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
type kpropd_t;
Chris PeBenito 04d286
type kpropd_exec_t;
Chris PeBenito 04d286
init_daemon_domain(kpropd_t, kpropd_exec_t)
Chris PeBenito 4aa075
domain_obj_id_change_exemption(kpropd_t)
Chris PeBenito 04d286
Chris PeBenito 17de1b
type krb5_conf_t;
Chris PeBenito 17de1b
files_type(krb5_conf_t)
Chris PeBenito 17de1b
Chris PeBenito 4aa075
type krb5_home_t;
Chris PeBenito 4aa075
userdom_user_home_content(krb5_home_t)
Chris PeBenito 4aa075
Chris PeBenito 04d286
type krb5_host_rcache_t;
Chris PeBenito 04d286
files_tmp_file(krb5_host_rcache_t)
Chris PeBenito 04d286
Chris PeBenito 17de1b
# types for general configuration files in /etc
Chris PeBenito 17de1b
type krb5_keytab_t;
Chris PeBenito 17de1b
files_security_file(krb5_keytab_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# types for KDC configs and principal file(s)
Chris PeBenito 17de1b
type krb5kdc_conf_t;
Chris PeBenito 17de1b
files_type(krb5kdc_conf_t)
Chris PeBenito 17de1b
Chris PeBenito 04d286
type krb5kdc_lock_t;
Chris PeBenito 04d286
files_type(krb5kdc_lock_t)
Chris PeBenito 04d286
Chris PeBenito 17de1b
# types for KDC principal file(s)
Chris PeBenito 17de1b
type krb5kdc_principal_t;
Chris PeBenito 17de1b
files_type(krb5kdc_principal_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type krb5kdc_t;
Chris PeBenito 17de1b
type krb5kdc_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(krb5kdc_t, krb5kdc_exec_t)
Chris PeBenito 04d286
domain_obj_id_change_exemption(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type krb5kdc_log_t;
Chris PeBenito 17de1b
logging_log_file(krb5kdc_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type krb5kdc_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(krb5kdc_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type krb5kdc_var_run_t;
Chris PeBenito 17de1b
files_pid_file(krb5kdc_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# kadmind local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Use capabilities. Surplus capabilities may be allowed.
Chris PeBenito 17de1b
allow kadmind_t self:capability { setuid setgid chown fowner dac_override sys_nice };
Chris PeBenito 17de1b
dontaudit kadmind_t self:capability sys_tty_config;
Chris PeBenito 04d286
allow kadmind_t self:process { setfscreate signal_perms };
Chris PeBenito 17de1b
allow kadmind_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 17de1b
allow kadmind_t self:unix_dgram_socket { connect create write };
Chris PeBenito 17de1b
allow kadmind_t self:tcp_socket connected_stream_socket_perms;
Chris PeBenito 17de1b
allow kadmind_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow kadmind_t kadmind_log_t:file manage_file_perms;
Chris PeBenito 3f67f7
logging_log_filetrans(kadmind_t, kadmind_log_t, file)
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow kadmind_t krb5_conf_t:file read_file_perms;
Chris PeBenito 17de1b
dontaudit kadmind_t krb5_conf_t:file write;
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
read_files_pattern(kadmind_t, krb5kdc_conf_t, krb5kdc_conf_t)
Chris PeBenito ebc1e8
dontaudit kadmind_t krb5kdc_conf_t:file { write setattr };
Chris PeBenito 17de1b
Chris PeBenito 04d286
allow kadmind_t krb5kdc_lock_t:file { rw_file_perms setattr };
Chris PeBenito 04d286
Chris PeBenito 04d286
allow kadmind_t krb5kdc_principal_t:file manage_file_perms;
Chris PeBenito 04d286
filetrans_pattern(kadmind_t, krb5kdc_conf_t, krb5kdc_principal_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
can_exec(kadmind_t, kadmind_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(kadmind_t, kadmind_tmp_t, kadmind_tmp_t)
Chris PeBenito 0bfccd
manage_files_pattern(kadmind_t, kadmind_tmp_t, kadmind_tmp_t)
Chris PeBenito 17de1b
files_tmp_filetrans(kadmind_t, kadmind_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(kadmind_t, kadmind_var_run_t, kadmind_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(kadmind_t, kadmind_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(kadmind_t)
Chris PeBenito 17de1b
kernel_list_proc(kadmind_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(kadmind_t)
Chris PeBenito 04d286
kernel_read_system_state(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(kadmind_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(kadmind_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(kadmind_t)
Chris PeBenito 668b30
corenet_udp_sendrecv_generic_if(kadmind_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(kadmind_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(kadmind_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(kadmind_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(kadmind_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(kadmind_t)
Chris PeBenito c12621
corenet_udp_bind_generic_node(kadmind_t)
Chris PeBenito 17de1b
corenet_tcp_bind_kerberos_admin_port(kadmind_t)
Chris PeBenito 17de1b
corenet_udp_bind_kerberos_admin_port(kadmind_t)
Chris PeBenito 17de1b
corenet_tcp_bind_reserved_port(kadmind_t)
Chris PeBenito 17de1b
corenet_dontaudit_tcp_bind_all_reserved_ports(kadmind_t)
Chris PeBenito 17de1b
corenet_sendrecv_kerberos_admin_server_packets(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(kadmind_t)
Chris PeBenito 17de1b
dev_read_rand(kadmind_t)
Chris PeBenito 17de1b
dev_read_urand(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(kadmind_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(kadmind_t)
Chris PeBenito 04d286
files_read_usr_symlinks(kadmind_t)
Chris PeBenito 04d286
files_read_usr_files(kadmind_t)
Chris PeBenito 04d286
files_read_var_files(kadmind_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
selinux_validate_context(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 04d286
seutil_read_file_contexts(kadmind_t)
Chris PeBenito 04d286
Chris PeBenito 17de1b
sysnet_read_config(kadmind_t)
Chris PeBenito 04d286
sysnet_use_ldap(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(kadmind_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(kadmind_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(kadmind_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(kadmind_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(kadmind_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Krb5kdc local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Use capabilities. Surplus capabilities may be allowed.
Chris PeBenito 17de1b
allow krb5kdc_t self:capability { setuid setgid net_admin chown fowner dac_override sys_nice };
Chris PeBenito 17de1b
dontaudit krb5kdc_t self:capability sys_tty_config;
Chris PeBenito 04d286
allow krb5kdc_t self:process { setfscreate setsched getsched signal_perms };
Chris PeBenito 17de1b
allow krb5kdc_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito d6d16b
allow krb5kdc_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow krb5kdc_t self:udp_socket create_socket_perms;
Chris PeBenito 5b0647
allow krb5kdc_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow krb5kdc_t krb5_conf_t:file read_file_perms;
Chris PeBenito 17de1b
dontaudit krb5kdc_t krb5_conf_t:file write;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
can_exec(krb5kdc_t, krb5kdc_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
read_files_pattern(krb5kdc_t, krb5kdc_conf_t, krb5kdc_conf_t)
Chris PeBenito 17de1b
dontaudit krb5kdc_t krb5kdc_conf_t:file write;
Chris PeBenito 17de1b
Chris PeBenito 04d286
allow krb5kdc_t krb5kdc_lock_t:file { rw_file_perms setattr };
Chris PeBenito 04d286
Chris PeBenito c0868a
allow krb5kdc_t krb5kdc_log_t:file manage_file_perms;
Chris PeBenito 0bfccd
logging_log_filetrans(krb5kdc_t, krb5kdc_log_t, file)
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow krb5kdc_t krb5kdc_principal_t:file read_file_perms;
Chris PeBenito 17de1b
dontaudit krb5kdc_t krb5kdc_principal_t:file write;
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(krb5kdc_t, krb5kdc_tmp_t, krb5kdc_tmp_t)
Chris PeBenito 0bfccd
manage_files_pattern(krb5kdc_t, krb5kdc_tmp_t, krb5kdc_tmp_t)
Chris PeBenito 17de1b
files_tmp_filetrans(krb5kdc_t, krb5kdc_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(krb5kdc_t, krb5kdc_var_run_t, krb5kdc_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(krb5kdc_t, krb5kdc_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(krb5kdc_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(krb5kdc_t)
Chris PeBenito 17de1b
kernel_list_proc(krb5kdc_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(krb5kdc_t)
Chris PeBenito 17de1b
kernel_read_network_state(krb5kdc_t)
Chris PeBenito 5b0647
kernel_search_network_sysctl(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito d6d16b
corecmd_exec_bin(krb5kdc_t)
Chris PeBenito d6d16b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(krb5kdc_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(krb5kdc_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(krb5kdc_t)
Chris PeBenito 668b30
corenet_udp_sendrecv_generic_if(krb5kdc_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(krb5kdc_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(krb5kdc_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(krb5kdc_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(krb5kdc_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(krb5kdc_t)
Chris PeBenito c12621
corenet_udp_bind_generic_node(krb5kdc_t)
Chris PeBenito 17de1b
corenet_tcp_bind_kerberos_port(krb5kdc_t)
Chris PeBenito 17de1b
corenet_udp_bind_kerberos_port(krb5kdc_t)
Chris PeBenito d6d16b
corenet_tcp_connect_ocsp_port(krb5kdc_t)
Chris PeBenito 17de1b
corenet_sendrecv_kerberos_server_packets(krb5kdc_t)
Chris PeBenito d6d16b
corenet_sendrecv_ocsp_client_packets(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(krb5kdc_t)
Chris PeBenito 17de1b
dev_read_urand(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(krb5kdc_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(krb5kdc_t)
Chris PeBenito d6d16b
files_read_usr_symlinks(krb5kdc_t)
Chris PeBenito d6d16b
files_read_var_files(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 04d286
selinux_validate_context(krb5kdc_t)
Chris PeBenito 04d286
Chris PeBenito 17de1b
logging_send_syslog_msg(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 04d286
seutil_read_file_contexts(krb5kdc_t)
Chris PeBenito 04d286
Chris PeBenito 17de1b
sysnet_read_config(krb5kdc_t)
Chris PeBenito 04d286
sysnet_use_ldap(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(krb5kdc_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(krb5kdc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(krb5kdc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(krb5kdc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(krb5kdc_t)
Chris PeBenito 17de1b
')
Chris PeBenito 04d286
Chris PeBenito 04d286
########################################
Chris PeBenito 04d286
#
Chris PeBenito 04d286
# kpropd local policy
Chris PeBenito 04d286
#
Chris PeBenito 04d286
Chris PeBenito 04d286
allow kpropd_t self:capability net_bind_service;
Chris PeBenito 04d286
allow kpropd_t self:fifo_file rw_file_perms;
Chris PeBenito 04d286
allow kpropd_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 04d286
allow kpropd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 04d286
Chris PeBenito 04d286
allow kpropd_t krb5_host_rcache_t:file rw_file_perms;
Chris PeBenito 04d286
Chris PeBenito 04d286
allow kpropd_t krb5_keytab_t:file read_file_perms;
Chris PeBenito 04d286
Chris PeBenito 4aa075
manage_files_pattern(kpropd_t, krb5kdc_conf_t, krb5kdc_lock_t)
Chris PeBenito 4aa075
Chris PeBenito 04d286
manage_files_pattern(kpropd_t, krb5kdc_conf_t, krb5kdc_principal_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
corecmd_exec_bin(kpropd_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
corenet_all_recvfrom_unlabeled(kpropd_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(kpropd_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(kpropd_t)
Chris PeBenito 04d286
corenet_tcp_sendrecv_all_ports(kpropd_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(kpropd_t)
Chris PeBenito 8f800d
corenet_tcp_bind_kprop_port(kpropd_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
dev_read_urand(kpropd_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
files_read_etc_files(kpropd_t)
Chris PeBenito 04d286
files_search_tmp(kpropd_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
logging_send_syslog_msg(kpropd_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
miscfiles_read_localization(kpropd_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
sysnet_dns_name_resolve(kpropd_t)
Chris PeBenito 04d286
Chris PeBenito 04d286
kerberos_use(kpropd_t)