Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Authors:  Stephen Smalley <sds@epoch.ncsc.mil> and Timothy Fraser  
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#######################################
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# General file-related types
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# unlabeled_t is the type of unlabeled objects.
Chris PeBenito 31b7c0
# Objects that have no known labeling information or that
Chris PeBenito 31b7c0
# have labels that are no longer valid are treated as having this type.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type unlabeled_t, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# fs_t is the default type for conventional filesystems.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type fs_t, fs_type;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# needs more work
Chris PeBenito 31b7c0
type eventpollfs_t, fs_type;
Chris PeBenito 31b7c0
type futexfs_t, fs_type;
Chris PeBenito 31b7c0
type bdev_t, fs_type;
Chris PeBenito 31b7c0
type usbfs_t, mount_point, fs_type;
Chris PeBenito 31b7c0
type nfsd_fs_t, fs_type;
Chris PeBenito 31b7c0
type rpc_pipefs_t, fs_type;
Chris PeBenito 31b7c0
type binfmt_misc_fs_t, mount_point, fs_type;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# file_t is the default type of a file that has not yet been
Chris PeBenito 31b7c0
# assigned an extended attribute (EA) value (when using a filesystem
Chris PeBenito 31b7c0
# that supports EAs).
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type file_t, file_type, mount_point, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# default_t is the default type for files that do not
Chris PeBenito 31b7c0
# match any specification in the file_contexts configuration
Chris PeBenito 31b7c0
# other than the generic /.* specification.
Chris PeBenito 31b7c0
type default_t, file_type, mount_point, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# root_t is the type for the root directory.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type root_t, file_type, mount_point, polyparent, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# mnt_t is the type for mount points such as /mnt/cdrom
Chris PeBenito 31b7c0
type mnt_t, file_type, mount_point, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# home_root_t is the type for the directory where user home directories
Chris PeBenito 31b7c0
# are created
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type home_root_t, file_type, mount_point, polyparent, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# lost_found_t is the type for the lost+found directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type lost_found_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# boot_t is the type for files in /boot,
Chris PeBenito 31b7c0
# including the kernel.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type boot_t, file_type, mount_point, sysadmfile;
Chris PeBenito 31b7c0
# system_map_t is for the system.map files in /boot
Chris PeBenito 31b7c0
type system_map_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# boot_runtime_t is the type for /boot/kernel.h,
Chris PeBenito 31b7c0
# which is automatically generated at boot time.
Chris PeBenito 31b7c0
# only for red hat
Chris PeBenito 31b7c0
type boot_runtime_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# tmp_t is the type of /tmp and /var/tmp.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type tmp_t, file_type, mount_point, sysadmfile, polydir, tmpfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# etc_t is the type of the system etc directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type etc_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# etc_mail_t is the type of /etc/mail.
Chris PeBenito 31b7c0
type etc_mail_t, file_type, sysadmfile, usercanread;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# shadow_t is the type of the /etc/shadow file
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type shadow_t, file_type, secure_file_type;
Chris PeBenito 31b7c0
allow auth shadow_t:file { getattr read };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# ld_so_cache_t is the type of /etc/ld.so.cache.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type ld_so_cache_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# etc_runtime_t is the type of various
Chris PeBenito 31b7c0
# files in /etc that are automatically
Chris PeBenito 31b7c0
# generated during initialization.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type etc_runtime_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# fonts_runtime_t is the type of various
Chris PeBenito 31b7c0
# fonts files in /usr that are automatically
Chris PeBenito 31b7c0
# generated during initialization.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type fonts_t, file_type, sysadmfile, usercanread;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# etc_aliases_t is the type of the aliases database.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type etc_aliases_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# net_conf_t is the type of the /etc/resolv.conf file.
Chris PeBenito 31b7c0
# all DHCP clients and PPP need write access to this file.
Chris PeBenito 31b7c0
type net_conf_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# lib_t is the type of files in the system lib directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type lib_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# shlib_t is the type of shared objects in the system lib
Chris PeBenito 31b7c0
# directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
ifdef(`targeted_policy', `
Chris PeBenito 31b7c0
typealias lib_t alias shlib_t;
Chris PeBenito 31b7c0
', `
Chris PeBenito 31b7c0
type shlib_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# texrel_shlib_t is the type of shared objects in the system lib
Chris PeBenito 31b7c0
# directories, which require text relocation.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
ifdef(`targeted_policy', `
Chris PeBenito 31b7c0
typealias lib_t alias texrel_shlib_t;
Chris PeBenito 31b7c0
', `
Chris PeBenito 31b7c0
type texrel_shlib_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# ld_so_t is the type of the system dynamic loaders.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type ld_so_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# bin_t is the type of files in the system bin directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type bin_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# cert_t is the type of files in the system certs directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type cert_t, file_type, sysadmfile, secure_file_type;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# ls_exec_t is the type of the ls program.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type ls_exec_t, file_type, exec_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# shell_exec_t is the type of user shells such as /bin/bash.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type shell_exec_t, file_type, exec_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# sbin_t is the type of files in the system sbin directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type sbin_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# usr_t is the type for /usr.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type usr_t, file_type, mount_point, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# src_t is the type of files in the system src directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type src_t, file_type, mount_point, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# var_t is the type for /var.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type var_t, file_type, mount_point, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Types for subdirectories of /var.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type var_run_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
type var_log_t, file_type, sysadmfile, logfile;
Chris PeBenito 31b7c0
typealias var_log_t alias crond_log_t;
Chris PeBenito 31b7c0
type faillog_t, file_type, sysadmfile, logfile;
Chris PeBenito 31b7c0
type var_lock_t, file_type, sysadmfile, lockfile;
Chris PeBenito 31b7c0
type var_lib_t, mount_point, file_type, sysadmfile;
Chris PeBenito 31b7c0
type var_auth_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
# for /var/{spool,lib}/texmf index files
Chris PeBenito 31b7c0
type tetex_data_t, file_type, sysadmfile, tmpfile;
Chris PeBenito 31b7c0
type var_spool_t, file_type, sysadmfile, tmpfile;
Chris PeBenito 31b7c0
type var_yp_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Type for /var/log/ksyms.
Chris PeBenito 31b7c0
type var_log_ksyms_t, file_type, sysadmfile, logfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Type for /var/log/lastlog.
Chris PeBenito 31b7c0
type lastlog_t, file_type, sysadmfile, logfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Type for /var/lib/nfs.
Chris PeBenito 31b7c0
type var_lib_nfs_t, file_type, mount_point, sysadmfile, usercanread;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# wtmp_t is the type of /var/log/wtmp.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type wtmp_t, file_type, sysadmfile, logfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# cron_spool_t is the type for /var/spool/cron.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type cron_spool_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# print_spool_t is the type for /var/spool/lpd and /var/spool/cups.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type print_spool_t, file_type, sysadmfile, tmpfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# mail_spool_t is the type for /var/spool/mail.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type mail_spool_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# mqueue_spool_t is the type for /var/spool/mqueue.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type mqueue_spool_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# man_t is the type for the man directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type man_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
typealias man_t alias catman_t;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# readable_t is a general type for
Chris PeBenito 31b7c0
# files that are readable by all domains.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type readable_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# 
Chris PeBenito 31b7c0
# Base type for the tests directory.
Chris PeBenito 31b7c0
# 
Chris PeBenito 31b7c0
type test_file_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# poly_t is the type for the polyinstantiated directories.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type poly_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# swapfile_t is for swap files
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type swapfile_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# locale_t is the type for system localization
Chris PeBenito 31b7c0
# 
Chris PeBenito 31b7c0
type locale_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Allow each file type to be associated with 
Chris PeBenito 31b7c0
# the default file system type.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
allow { file_type device_type ttyfile } fs_t:filesystem associate;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
type tmpfs_t, file_type, mount_point, sysadmfile, fs_type;
Chris PeBenito 31b7c0
allow { logfile tmpfs_t tmpfile home_type } tmpfs_t:filesystem associate;
Chris PeBenito 31b7c0
allow { logfile tmpfile home_type } tmp_t:filesystem associate;
Chris PeBenito 31b7c0
ifdef(`distro_redhat', `
Chris PeBenito 31b7c0
allow { dev_fs ttyfile } { tmpfs_t tmp_t }:filesystem associate;
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
type autofs_t, fs_type, noexattrfile, sysadmfile;
Chris PeBenito 31b7c0
type usbdevfs_t, fs_type, mount_point, noexattrfile, sysadmfile;
Chris PeBenito 31b7c0
type sysfs_t, mount_point, fs_type,  sysadmfile;
Chris PeBenito 31b7c0
type iso9660_t, fs_type, noexattrfile, sysadmfile;
Chris PeBenito 31b7c0
type romfs_t, fs_type, sysadmfile;
Chris PeBenito 31b7c0
type ramfs_t, fs_type, sysadmfile;
Chris PeBenito 31b7c0
type dosfs_t, fs_type, noexattrfile, sysadmfile;
Chris PeBenito 31b7c0
type hugetlbfs_t, mount_point, fs_type,  sysadmfile;
Chris PeBenito 31b7c0
typealias file_t alias  mqueue_t;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# udev_runtime_t is the type of the udev table file
Chris PeBenito 31b7c0
type udev_runtime_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# krb5_conf_t is the type of the /etc/krb5.conf file
Chris PeBenito 31b7c0
type krb5_conf_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
type cifs_t, fs_type, noexattrfile, sysadmfile;
Chris PeBenito 31b7c0
type debugfs_t, fs_type, sysadmfile;
Chris PeBenito 31b7c0
type configfs_t, fs_type, sysadmfile;
Chris PeBenito 31b7c0
type inotifyfs_t, fs_type, sysadmfile;
Chris PeBenito 31b7c0
type capifs_t, fs_type, sysadmfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# removable_t is the default type of all removable media
Chris PeBenito 31b7c0
type removable_t, file_type, sysadmfile, usercanread;
Chris PeBenito 31b7c0
allow file_type removable_t:filesystem associate;
Chris PeBenito 31b7c0
allow file_type noexattrfile:filesystem associate;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Type for anonymous FTP data, used by ftp and rsync
Chris PeBenito 31b7c0
type public_content_t, file_type, sysadmfile, customizable;
Chris PeBenito 31b7c0
type public_content_rw_t, file_type, sysadmfile, customizable;
Chris PeBenito 31b7c0
typealias public_content_t alias ftpd_anon_t;
Chris PeBenito 31b7c0
typealias public_content_rw_t alias ftpd_anon_rw_t;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# type for /tmp/.ICE-unix
Chris PeBenito 31b7c0
type ice_tmp_t, file_type, sysadmfile, tmpfile;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# type for /usr/share/hwdata
Chris PeBenito 31b7c0
type hwdata_t, file_type, sysadmfile;
Chris PeBenito 31b7c0
allow { fs_type file_type } self:filesystem associate;
Chris PeBenito 31b7c0