2005-06-30 21:11:54 +00:00
|
|
|
|
2006-06-12 21:36:38 +00:00
|
|
|
policy_module(kerberos,1.1.3)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type kadmind_t;
|
|
|
|
type kadmind_exec_t;
|
|
|
|
init_daemon_domain(kadmind_t,kadmind_exec_t)
|
|
|
|
|
|
|
|
type kadmind_log_t;
|
|
|
|
logging_log_file(kadmind_log_t)
|
|
|
|
|
|
|
|
type kadmind_tmp_t;
|
|
|
|
files_tmp_file(kadmind_tmp_t)
|
|
|
|
|
|
|
|
type kadmind_var_run_t;
|
|
|
|
files_pid_file(kadmind_var_run_t)
|
|
|
|
|
|
|
|
type krb5_conf_t;
|
|
|
|
files_type(krb5_conf_t)
|
|
|
|
|
|
|
|
# types for general configuration files in /etc
|
2005-09-28 19:07:22 +00:00
|
|
|
type krb5_keytab_t;
|
|
|
|
files_security_file(krb5_keytab_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
# types for KDC configs and principal file(s)
|
|
|
|
type krb5kdc_conf_t;
|
|
|
|
files_type(krb5kdc_conf_t)
|
|
|
|
|
|
|
|
# types for KDC principal file(s)
|
|
|
|
type krb5kdc_principal_t;
|
|
|
|
files_type(krb5kdc_principal_t)
|
|
|
|
|
|
|
|
type krb5kdc_t;
|
|
|
|
type krb5kdc_exec_t;
|
|
|
|
init_daemon_domain(krb5kdc_t,krb5kdc_exec_t)
|
|
|
|
|
|
|
|
type krb5kdc_log_t;
|
|
|
|
logging_log_file(krb5kdc_log_t)
|
|
|
|
|
|
|
|
type krb5kdc_tmp_t;
|
|
|
|
files_tmp_file(krb5kdc_tmp_t)
|
|
|
|
|
|
|
|
type krb5kdc_var_run_t;
|
|
|
|
files_pid_file(krb5kdc_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# kadmind local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# Use capabilities. Surplus capabilities may be allowed.
|
|
|
|
allow kadmind_t self:capability { setuid setgid chown fowner dac_override sys_nice };
|
|
|
|
dontaudit kadmind_t self:capability sys_tty_config;
|
2005-11-10 21:37:54 +00:00
|
|
|
allow kadmind_t self:process signal_perms;
|
2005-06-30 21:11:54 +00:00
|
|
|
allow kadmind_t self:netlink_route_socket r_netlink_socket_perms;
|
|
|
|
allow kadmind_t self:unix_dgram_socket { connect create write };
|
2005-10-26 18:07:20 +00:00
|
|
|
allow kadmind_t self:tcp_socket connected_stream_socket_perms;
|
|
|
|
allow kadmind_t self:udp_socket create_socket_perms;
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
allow kadmind_t kadmind_log_t:file create_file_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
logging_log_filetrans(kadmind_t,kadmind_log_t,file)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
allow kadmind_t krb5_conf_t:file r_file_perms;
|
|
|
|
dontaudit kadmind_t krb5_conf_t:file write;
|
|
|
|
|
|
|
|
allow kadmind_t krb5kdc_conf_t:dir search;
|
|
|
|
allow kadmind_t krb5kdc_conf_t:file r_file_perms;
|
|
|
|
dontaudit kadmind_t krb5kdc_conf_t:file write;
|
|
|
|
|
|
|
|
allow kadmind_t krb5kdc_principal_t:file { getattr lock read write setattr };
|
|
|
|
|
|
|
|
can_exec(kadmind_t, kadmind_exec_t)
|
|
|
|
|
|
|
|
allow kadmind_t kadmind_tmp_t:dir create_dir_perms;
|
|
|
|
allow kadmind_t kadmind_tmp_t:file create_file_perms;
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(kadmind_t, kadmind_tmp_t, { file dir })
|
2005-06-30 21:11:54 +00:00
|
|
|
|
2005-10-26 18:07:20 +00:00
|
|
|
allow kadmind_t kadmind_var_run_t:file create_file_perms;
|
|
|
|
allow kadmind_t kadmind_var_run_t:dir rw_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(kadmind_t,kadmind_var_run_t,file)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(kadmind_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
kernel_list_proc(kadmind_t)
|
|
|
|
kernel_read_proc_symlinks(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
2006-05-17 20:55:12 +00:00
|
|
|
corenet_non_ipsec_sendrecv(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_sendrecv_all_if(kadmind_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_if(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_sendrecv_all_nodes(kadmind_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_nodes(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(kadmind_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_ports(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_bind_all_nodes(kadmind_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_bind_all_nodes(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_bind_kerberos_admin_port(kadmind_t)
|
|
|
|
corenet_udp_bind_kerberos_admin_port(kadmind_t)
|
|
|
|
corenet_tcp_bind_reserved_port(kadmind_t)
|
|
|
|
corenet_dontaudit_tcp_bind_all_reserved_ports(kadmind_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_kerberos_admin_server_packets(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(kadmind_t)
|
|
|
|
dev_read_rand(kadmind_t)
|
|
|
|
dev_read_urand(kadmind_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(kadmind_t)
|
|
|
|
fs_search_auto_mountpoints(kadmind_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(kadmind_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
files_read_etc_files(kadmind_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(kadmind_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(kadmind_t)
|
|
|
|
libs_use_shared_libs(kadmind_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(kadmind_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(kadmind_t)
|
|
|
|
|
|
|
|
sysnet_read_config(kadmind_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(kadmind_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy', `
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(kadmind_t)
|
|
|
|
term_dontaudit_use_generic_ptys(kadmind_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(kadmind_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-06-30 21:11:54 +00:00
|
|
|
nis_use_ypbind(kadmind_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-06-30 21:11:54 +00:00
|
|
|
seutil_sigchld_newrole(kadmind_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-06-30 21:11:54 +00:00
|
|
|
udev_read_db(kadmind_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Krb5kdc local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# Use capabilities. Surplus capabilities may be allowed.
|
|
|
|
allow krb5kdc_t self:capability { setuid setgid net_admin chown fowner dac_override sys_nice };
|
|
|
|
dontaudit krb5kdc_t self:capability sys_tty_config;
|
2005-11-10 21:37:54 +00:00
|
|
|
allow krb5kdc_t self:process signal_perms;
|
2005-06-30 21:11:54 +00:00
|
|
|
allow krb5kdc_t self:netlink_route_socket r_netlink_socket_perms;
|
2005-10-26 16:00:13 +00:00
|
|
|
allow krb5kdc_t self:tcp_socket connected_stream_socket_perms;
|
|
|
|
allow krb5kdc_t self:udp_socket create_socket_perms;
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
allow krb5kdc_t krb5_conf_t:file r_file_perms;
|
|
|
|
dontaudit krb5kdc_t krb5_conf_t:file write;
|
|
|
|
|
|
|
|
can_exec(krb5kdc_t, krb5kdc_exec_t)
|
|
|
|
|
|
|
|
allow krb5kdc_t krb5kdc_conf_t:dir search;
|
|
|
|
allow krb5kdc_t krb5kdc_conf_t:file r_file_perms;
|
|
|
|
dontaudit krb5kdc_t krb5kdc_conf_t:file write;
|
|
|
|
|
|
|
|
allow krb5kdc_t krb5kdc_log_t:file create_file_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
logging_log_filetrans(krb5kdc_t,krb5kdc_log_t,file)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
allow krb5kdc_t krb5kdc_principal_t:file r_file_perms;
|
|
|
|
dontaudit krb5kdc_t krb5kdc_principal_t:file write;
|
|
|
|
|
|
|
|
allow krb5kdc_t krb5kdc_tmp_t:dir create_dir_perms;
|
|
|
|
allow krb5kdc_t krb5kdc_tmp_t:file create_file_perms;
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(krb5kdc_t, krb5kdc_tmp_t, { file dir })
|
2005-06-30 21:11:54 +00:00
|
|
|
|
2005-10-26 16:00:13 +00:00
|
|
|
allow krb5kdc_t krb5kdc_var_run_t:file create_file_perms;
|
|
|
|
allow krb5kdc_t krb5kdc_var_run_t:dir rw_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(krb5kdc_t,krb5kdc_var_run_t,file)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(krb5kdc_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(krb5kdc_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
kernel_list_proc(krb5kdc_t)
|
|
|
|
kernel_read_proc_symlinks(krb5kdc_t)
|
2006-06-12 21:36:38 +00:00
|
|
|
kernel_read_network_state(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
2006-05-17 20:55:12 +00:00
|
|
|
corenet_non_ipsec_sendrecv(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_sendrecv_all_if(krb5kdc_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_if(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_sendrecv_all_nodes(krb5kdc_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_nodes(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(krb5kdc_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_ports(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_bind_all_nodes(krb5kdc_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_bind_all_nodes(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
corenet_tcp_bind_kerberos_port(krb5kdc_t)
|
|
|
|
corenet_udp_bind_kerberos_port(krb5kdc_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_kerberos_server_packets(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(krb5kdc_t)
|
|
|
|
dev_read_urand(krb5kdc_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(krb5kdc_t)
|
|
|
|
fs_search_auto_mountpoints(krb5kdc_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(krb5kdc_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
files_read_etc_files(krb5kdc_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(krb5kdc_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(krb5kdc_t)
|
|
|
|
libs_use_shared_libs(krb5kdc_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(krb5kdc_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(krb5kdc_t)
|
|
|
|
|
|
|
|
sysnet_read_config(krb5kdc_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(krb5kdc_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy', `
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(krb5kdc_t)
|
|
|
|
term_dontaudit_use_generic_ptys(krb5kdc_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(krb5kdc_t)
|
2005-06-30 21:11:54 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-06-30 21:11:54 +00:00
|
|
|
nis_use_ypbind(krb5kdc_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-06-30 21:11:54 +00:00
|
|
|
seutil_sigchld_newrole(krb5kdc_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-06-30 21:11:54 +00:00
|
|
|
udev_read_db(krb5kdc_t)
|
|
|
|
')
|