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