|
Chris PeBenito |
31b7c0 |
#DESC Kerberos5 - MIT Kerberos5
|
|
Chris PeBenito |
31b7c0 |
# supports krb5kdc and kadmind daemons
|
|
Chris PeBenito |
31b7c0 |
# kinit, kdestroy, klist clients
|
|
Chris PeBenito |
31b7c0 |
# ksu support not complete
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# includes rules for OpenSSH daemon compiled with both
|
|
Chris PeBenito |
31b7c0 |
# kerberos5 and SELinux support
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Not supported : telnetd, ftpd, kprop/kpropd daemons
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Author: Kerry Thompson <kerry@crypt.gen.nz>
|
|
Chris PeBenito |
31b7c0 |
# Modified by Colin Walters <walters@redhat.com>
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#################################
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Rules for the krb5kdc_t,kadmind_t domains.
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
daemon_domain(krb5kdc)
|
|
Chris PeBenito |
31b7c0 |
daemon_domain(kadmind)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
can_exec(krb5kdc_t, krb5kdc_exec_t)
|
|
Chris PeBenito |
31b7c0 |
can_exec(kadmind_t, kadmind_exec_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# types for general configuration files in /etc
|
|
Chris PeBenito |
31b7c0 |
type krb5_keytab_t, file_type, sysadmfile, secure_file_type;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# types for KDC configs and principal file(s)
|
|
Chris PeBenito |
31b7c0 |
type krb5kdc_conf_t, file_type, sysadmfile;
|
|
Chris PeBenito |
31b7c0 |
type krb5kdc_principal_t, file_type, sysadmfile;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Use capabilities. Surplus capabilities may be allowed.
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t self:capability { setuid setgid net_admin net_bind_service chown fowner dac_override sys_nice };
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t self:capability { setuid setgid net_bind_service chown fowner dac_override sys_nice };
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# krb5kdc and kadmind can use network
|
|
Chris PeBenito |
31b7c0 |
can_network_server( { krb5kdc_t kadmind_t } )
|
|
Chris PeBenito |
31b7c0 |
can_ypbind( { krb5kdc_t kadmind_t } )
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# allow UDP transfer to/from any program
|
|
Chris PeBenito |
31b7c0 |
can_udp_send(kerberos_port_t, krb5kdc_t)
|
|
Chris PeBenito |
31b7c0 |
can_udp_send(krb5kdc_t, kerberos_port_t)
|
|
Chris PeBenito |
31b7c0 |
can_tcp_connect(kerberos_port_t, krb5kdc_t)
|
|
Chris PeBenito |
31b7c0 |
can_tcp_connect(kerberos_admin_port_t, kadmind_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Bind to the kerberos, kerberos-adm ports.
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t kerberos_port_t:{ udp_socket tcp_socket } name_bind;
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t kerberos_admin_port_t:{ udp_socket tcp_socket } name_bind;
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t reserved_port_t:tcp_socket name_bind;
|
|
Chris PeBenito |
31b7c0 |
dontaudit kadmind_t reserved_port_type:tcp_socket name_bind;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Rules for Kerberos5 KDC daemon
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t krb5kdc_conf_t:dir search;
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t krb5kdc_conf_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t krb5kdc_principal_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
dontaudit krb5kdc_t krb5kdc_principal_t:file write;
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t locale_t:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
dontaudit krb5kdc_t krb5kdc_conf_t:file write;
|
|
Chris PeBenito |
31b7c0 |
allow { kadmind_t krb5kdc_t } etc_t:dir { getattr search };
|
|
Chris PeBenito |
31b7c0 |
allow { kadmind_t krb5kdc_t } etc_t:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
allow { kadmind_t krb5kdc_t } krb5_conf_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
dontaudit { kadmind_t krb5kdc_t } krb5_conf_t:file write;
|
|
Chris PeBenito |
31b7c0 |
tmp_domain(krb5kdc)
|
|
Chris PeBenito |
31b7c0 |
log_domain(krb5kdc)
|
|
Chris PeBenito |
31b7c0 |
allow { kadmind_t krb5kdc_t } urandom_device_t:chr_file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t random_device_t:chr_file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t self:netlink_route_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t self:netlink_route_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t proc_t:dir r_dir_perms;
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t proc_t:file { getattr read };
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Rules for Kerberos5 Kadmin daemon
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t self:unix_dgram_socket { connect create write };
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t krb5kdc_conf_t:dir search;
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t krb5kdc_conf_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
allow kadmind_t krb5kdc_principal_t:file { getattr lock read write setattr };
|
|
Chris PeBenito |
31b7c0 |
read_locale(kadmind_t)
|
|
Chris PeBenito |
31b7c0 |
dontaudit kadmind_t krb5kdc_conf_t:file write;
|
|
Chris PeBenito |
31b7c0 |
tmp_domain(kadmind)
|
|
Chris PeBenito |
31b7c0 |
log_domain(kadmind)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Allow user programs to talk to KDC
|
|
Chris PeBenito |
31b7c0 |
allow krb5kdc_t userdomain:udp_socket recvfrom;
|
|
Chris PeBenito |
31b7c0 |
allow userdomain krb5kdc_t:udp_socket recvfrom;
|
|
Chris PeBenito |
31b7c0 |
allow initrc_t krb5_conf_t:file ioctl;
|