Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito e181fe
Chris PeBenito 960373
policy_module(files,1.0)
Chris PeBenito 960373
Chris PeBenito b4cd15
attribute file_type;
Chris PeBenito b4cd15
attribute lockfile;
Chris PeBenito b4cd15
attribute pidfile;
Chris PeBenito b4cd15
attribute tmpfile;
Chris PeBenito a2d824
attribute mountpoint;
Chris PeBenito b4cd15
Chris PeBenito b4cd15
# default_t is the default type for files that do not
Chris PeBenito b4cd15
# match any specification in the file_contexts configuration
Chris PeBenito b4cd15
# other than the generic /.* specification.
Chris PeBenito a2d824
type default_t, file_type, mountpoint;
Chris PeBenito b4cd15
filesystem_associate(default_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(default_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# etc_t is the type of the system etc directories.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type etc_t, file_type;
Chris PeBenito b4cd15
filesystem_associate(etc_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(etc_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# etc_runtime_t is the type of various
Chris PeBenito b4cd15
# files in /etc that are automatically
Chris PeBenito b4cd15
# generated during initialization.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type etc_runtime_t, file_type;
Chris PeBenito b4cd15
filesystem_associate(etc_runtime_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(etc_runtime_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# file_t is the default type of a file that has not yet been
Chris PeBenito b4cd15
# assigned an extended attribute (EA) value (when using a filesystem
Chris PeBenito b4cd15
# that supports EAs).
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
type file_t, file_type, mountpoint;
Chris PeBenito b4cd15
filesystem_associate(file_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(file_t)
Chris PeBenito b4cd15
kernel_make_root_filesystem_mountpoint(file_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# home_root_t is the type for the directory where user home directories
Chris PeBenito b4cd15
# are created
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
type home_root_t, file_type, mountpoint;
Chris PeBenito b4cd15
filesystem_associate(home_root_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(home_root_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# lost_found_t is the type for the lost+found directories.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type lost_found_t, file_type;
Chris PeBenito b4cd15
filesystem_associate(lost_found_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(lost_found_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# mnt_t is the type for mount points such as /mnt/cdrom
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
type mnt_t, file_type, mountpoint;
Chris PeBenito b4cd15
filesystem_associate(mnt_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(mnt_t)
Chris PeBenito b4cd15
Chris PeBenito 219bcf
type no_access_t, file_type;
Chris PeBenito 219bcf
filesystem_associate(no_access_t)
Chris PeBenito 219bcf
filesystem_noxattr_associate(no_access_t)
Chris PeBenito 219bcf
Chris PeBenito 219bcf
type poly_t, file_type;
Chris PeBenito 219bcf
filesystem_associate(poly_t)
Chris PeBenito 219bcf
filesystem_noxattr_associate(poly_t)
Chris PeBenito 219bcf
Chris PeBenito 219bcf
type readable_t, file_type;
Chris PeBenito 219bcf
filesystem_associate(readable_t)
Chris PeBenito 219bcf
filesystem_noxattr_associate(readable_t)
Chris PeBenito 219bcf
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
# root_t is the type for rootfs and the root directory.
Chris PeBenito a2d824
#
Chris PeBenito a2d824
type root_t, file_type, mountpoint;
Chris PeBenito a2d824
filesystem_associate(root_t)
Chris PeBenito a2d824
filesystem_noxattr_associate(root_t)
Chris PeBenito a2d824
kernel_read_directory_from(root_t)
Chris PeBenito a2d824
kernel_make_root_filesystem_mountpoint(root_t)
Chris PeBenito a2d824
genfscon rootfs / system_u:object_r:root_t
Chris PeBenito a2d824
Chris PeBenito a2d824
#
Chris PeBenito b4cd15
# src_t is the type of files in the system src directories.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type src_t, file_type;
Chris PeBenito b4cd15
filesystem_associate(src_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(src_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# tmp_t is the type of the temporary directories
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
type tmp_t, file_type, tmpfile, mountpoint;
Chris PeBenito b4cd15
filesystem_associate(tmp_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(tmp_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# usr_t is the type for /usr.
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
type usr_t, file_type, mountpoint;
Chris PeBenito b4cd15
filesystem_associate(usr_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(usr_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# var_t is the type of /var
Chris PeBenito b4cd15
#
Chris PeBenito a2d824
type var_t, file_type, mountpoint;
Chris PeBenito b4cd15
filesystem_associate(var_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(var_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# var_lib_t is the type of /var/lib
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type var_lib_t, file_type;
Chris PeBenito b4cd15
filesystem_associate(var_lib_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(var_lib_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# var_lock_t is tye type of /var/lock
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type var_lock_t, file_type, lockfile;
Chris PeBenito b4cd15
filesystem_associate(var_lock_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(var_lock_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# var_run_t is the type of /var/run, usually
Chris PeBenito b4cd15
# used for pid and other runtime files.
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type var_run_t, file_type, pidfile;
Chris PeBenito b4cd15
filesystem_associate(var_run_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(var_run_t)
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# var_spool_t is the type of /var/spool
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
type var_spool_t, file_type;
Chris PeBenito b4cd15
filesystem_associate(var_spool_t)
Chris PeBenito 33bc0d
filesystem_noxattr_associate(var_spool_t)