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