Chris PeBenito 0fbfa5
#DESC Automount - Automount daemon
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Authors:  Stephen Smalley <sds@epoch.ncsc.mil>
Chris PeBenito 0fbfa5
# Modified by Russell Coker <russell@coker.com.au>
Chris PeBenito 0fbfa5
# X-Debian-Packages: amd am-utils autofs
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#################################
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Rules for the automount_t domain.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
daemon_domain(automount)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
etc_domain(automount)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# for SSP
Chris PeBenito 0fbfa5
allow automount_t urandom_device_t:chr_file read;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# for if the mount point is not labelled
Chris PeBenito 0fbfa5
allow automount_t file_t:dir getattr;
Chris PeBenito 0fbfa5
allow automount_t default_t:dir getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow automount_t autofs_t:dir { create_dir_perms ioctl };
Chris PeBenito 0fbfa5
allow automount_t fs_type:dir getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow automount_t { etc_t etc_runtime_t }:file { getattr read };
Chris PeBenito 0fbfa5
allow automount_t proc_t:file { getattr read };
Chris PeBenito 0fbfa5
allow automount_t self:process { setpgid setsched };
Chris PeBenito 0fbfa5
allow automount_t self:capability sys_nice;
Chris PeBenito 0fbfa5
allow automount_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 0fbfa5
allow automount_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# because config files can be shell scripts
Chris PeBenito 0fbfa5
can_exec(automount_t, { etc_t automount_etc_t })
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
can_network_server(automount_t)
Chris PeBenito 0fbfa5
can_ypbind(automount_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`fsadm.te', `
Chris PeBenito 0fbfa5
domain_auto_trans(automount_t, fsadm_exec_t, fsadm_t)
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
lock_domain(automount)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
tmp_domain(automount)
Chris PeBenito 0fbfa5
allow automount_t self:fifo_file rw_file_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Run mount in the mount_t domain.
Chris PeBenito 0fbfa5
domain_auto_trans(automount_t, mount_exec_t, mount_t)
Chris PeBenito 0fbfa5
allow mount_t autofs_t:dir { search mounton read };
Chris PeBenito 0fbfa5
allow mount_t automount_tmp_t:dir mounton;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`apmd.te',
Chris PeBenito 0fbfa5
`domain_auto_trans(apmd_t, automount_exec_t, automount_t)
Chris PeBenito 0fbfa5
can_exec(automount_t, bin_t)')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow automount_t { bin_t sbin_t }:dir search;
Chris PeBenito 0fbfa5
can_exec(automount_t, mount_exec_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow mount_t autofs_t:dir getattr;
Chris PeBenito 0fbfa5
dontaudit automount_t var_t:dir write;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow userdomain autofs_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
allow kernel_t autofs_t:dir { getattr ioctl read search };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow automount_t home_root_t:dir getattr;
Chris PeBenito 0fbfa5
allow automount_t mnt_t:dir { getattr search };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow initrc_t automount_etc_t:file { getattr read };