]> git.ipfire.org Git - people/stevee/selinux-policy.git/blame - refpolicy/policy/modules/system/files.te
fix can_exec
[people/stevee/selinux-policy.git] / refpolicy / policy / modules / system / files.te
CommitLineData
e181fe05 1
960373dd
CP
2policy_module(files,1.0)
3
b4cd1533
CP
4attribute file_type;
5attribute lockfile;
46410fd2 6attribute mountpoint;
b4cd1533
CP
7attribute pidfile;
8attribute tmpfile;
46410fd2 9attribute tmpfsfile;
b4cd1533
CP
10
11# default_t is the default type for files that do not
12# match any specification in the file_contexts configuration
13# other than the generic /.* specification.
a2d8246b 14type default_t, file_type, mountpoint;
763c441e
CP
15fs_associate(default_t)
16fs_noxattr_associate(default_t)
b4cd1533
CP
17
18#
19# etc_t is the type of the system etc directories.
20#
21type etc_t, file_type;
763c441e
CP
22fs_associate(etc_t)
23fs_noxattr_associate(etc_t)
b4cd1533
CP
24
25#
26# etc_runtime_t is the type of various
27# files in /etc that are automatically
28# generated during initialization.
29#
30type etc_runtime_t, file_type;
763c441e
CP
31fs_associate(etc_runtime_t)
32fs_noxattr_associate(etc_runtime_t)
b4cd1533
CP
33
34#
35# file_t is the default type of a file that has not yet been
36# assigned an extended attribute (EA) value (when using a filesystem
37# that supports EAs).
38#
a2d8246b 39type file_t, file_type, mountpoint;
763c441e
CP
40fs_associate(file_t)
41fs_noxattr_associate(file_t)
42kernel_make_root_fs_mountpoint(file_t)
cabfa520 43sid file context_template(system_u:object_r:file_t,s0)
b4cd1533 44
b4cd1533
CP
45#
46# home_root_t is the type for the directory where user home directories
47# are created
48#
a2d8246b 49type home_root_t, file_type, mountpoint;
763c441e
CP
50fs_associate(home_root_t)
51fs_noxattr_associate(home_root_t)
b4cd1533
CP
52
53#
54# lost_found_t is the type for the lost+found directories.
55#
56type lost_found_t, file_type;
763c441e
CP
57fs_associate(lost_found_t)
58fs_noxattr_associate(lost_found_t)
b4cd1533
CP
59
60#
61# mnt_t is the type for mount points such as /mnt/cdrom
62#
a2d8246b 63type mnt_t, file_type, mountpoint;
763c441e
CP
64fs_associate(mnt_t)
65fs_noxattr_associate(mnt_t)
b4cd1533 66
219bcf7a 67type no_access_t, file_type;
763c441e
CP
68fs_associate(no_access_t)
69fs_noxattr_associate(no_access_t)
219bcf7a
CP
70
71type poly_t, file_type;
763c441e
CP
72fs_associate(poly_t)
73fs_noxattr_associate(poly_t)
219bcf7a
CP
74
75type readable_t, file_type;
763c441e
CP
76fs_associate(readable_t)
77fs_noxattr_associate(readable_t)
219bcf7a 78
a2d8246b
CP
79#
80# root_t is the type for rootfs and the root directory.
81#
82type root_t, file_type, mountpoint;
763c441e
CP
83fs_associate(root_t)
84fs_noxattr_associate(root_t)
763c441e 85kernel_make_root_fs_mountpoint(root_t)
e32c0d3b 86genfscon rootfs / context_template(system_u:object_r:root_t,s0)
a2d8246b 87
b4cd1533
CP
88#
89# src_t is the type of files in the system src directories.
90#
91type src_t, file_type;
763c441e
CP
92fs_associate(src_t)
93fs_noxattr_associate(src_t)
b4cd1533
CP
94
95#
96# tmp_t is the type of the temporary directories
97#
a2d8246b 98type tmp_t, file_type, tmpfile, mountpoint;
763c441e
CP
99fs_associate(tmp_t)
100fs_noxattr_associate(tmp_t)
b4cd1533
CP
101
102#
103# usr_t is the type for /usr.
104#
a2d8246b 105type usr_t, file_type, mountpoint;
763c441e
CP
106fs_associate(usr_t)
107fs_noxattr_associate(usr_t)
b4cd1533
CP
108
109#
110# var_t is the type of /var
111#
a2d8246b 112type var_t, file_type, mountpoint;
763c441e
CP
113fs_associate(var_t)
114fs_noxattr_associate(var_t)
b4cd1533
CP
115
116#
117# var_lib_t is the type of /var/lib
118#
119type var_lib_t, file_type;
763c441e
CP
120fs_associate(var_lib_t)
121fs_noxattr_associate(var_lib_t)
b4cd1533
CP
122
123#
124# var_lock_t is tye type of /var/lock
125#
126type var_lock_t, file_type, lockfile;
763c441e
CP
127fs_associate(var_lock_t)
128fs_noxattr_associate(var_lock_t)
b4cd1533
CP
129
130#
131# var_run_t is the type of /var/run, usually
132# used for pid and other runtime files.
133#
134type var_run_t, file_type, pidfile;
763c441e
CP
135fs_associate(var_run_t)
136fs_noxattr_associate(var_run_t)
b4cd1533
CP
137
138#
139# var_spool_t is the type of /var/spool
140#
141type var_spool_t, file_type;
763c441e
CP
142fs_associate(var_spool_t)
143fs_noxattr_associate(var_spool_t)