1firstboot_selinux(8) SELinux Policy firstboot firstboot_selinux(8)
2
3
4
6 firstboot_selinux - Security Enhanced Linux Policy for the firstboot
7 processes
8
10 Security-Enhanced Linux secures the firstboot processes via flexible
11 mandatory access control.
12
13 The firstboot processes execute with the firstboot_t SELinux type. You
14 can check if you have these processes running by executing the ps com‐
15 mand with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep firstboot_t
20
21
22
24 The firstboot_t SELinux type can be entered via the file_type, unla‐
25 beled_t, proc_type, filesystem_type, mtrr_device_t, sysctl_type, first‐
26 boot_exec_t file types.
27
28 The default entrypoint paths for the firstboot_t domain are the follow‐
29 ing:
30
31 all files on the system, /dev/cpu/mtrr, /usr/sbin/firstboot,
32 /usr/share/firstboot/firstboot.py
33
35 SELinux defines process types (domains) for each process running on the
36 system
37
38 You can see the context of a process using the -Z option to ps
39
40 Policy governs the access confined processes have to files. SELinux
41 firstboot policy is very flexible allowing users to setup their first‐
42 boot processes in as secure a method as possible.
43
44 The following process types are defined for firstboot:
45
46 firstboot_t
47
48 Note: semanage permissive -a firstboot_t can be used to make the
49 process type firstboot_t permissive. SELinux does not deny access to
50 permissive process types, but the AVC (SELinux denials) messages are
51 still generated.
52
53
55 SELinux policy is customizable based on least access required. first‐
56 boot policy is extremely flexible and has several booleans that allow
57 you to manipulate the policy and run firstboot with the tightest access
58 possible.
59
60
61
62 If you want to allow all daemons the ability to read/write terminals,
63 you must turn on the allow_daemons_use_tty boolean. Disabled by
64 default.
65
66 setsebool -P allow_daemons_use_tty 1
67
68
69
70 If you want to allow all domains to use other domains file descriptors,
71 you must turn on the allow_domain_fd_use boolean. Enabled by default.
72
73 setsebool -P allow_domain_fd_use 1
74
75
76
77 If you want to allow unconfined executables to make their heap memory
78 executable. Doing this is a really bad idea. Probably indicates a
79 badly coded executable, but could indicate an attack. This executable
80 should be reported in bugzilla, you must turn on the allow_execheap
81 boolean. Disabled by default.
82
83 setsebool -P allow_execheap 1
84
85
86
87 If you want to allow unconfined executables to map a memory region as
88 both executable and writable, this is dangerous and the executable
89 should be reported in bugzilla), you must turn on the allow_execmem
90 boolean. Enabled by default.
91
92 setsebool -P allow_execmem 1
93
94
95
96 If you want to allow all unconfined executables to use libraries
97 requiring text relocation that are not labeled textrel_shlib_t), you
98 must turn on the allow_execmod boolean. Enabled by default.
99
100 setsebool -P allow_execmod 1
101
102
103
104 If you want to allow unconfined executables to make their stack exe‐
105 cutable. This should never, ever be necessary. Probably indicates a
106 badly coded executable, but could indicate an attack. This executable
107 should be reported in bugzilla), you must turn on the allow_execstack
108 boolean. Enabled by default.
109
110 setsebool -P allow_execstack 1
111
112
113
114 If you want to allow sysadm to debug or ptrace all processes, you must
115 turn on the allow_ptrace boolean. Disabled by default.
116
117 setsebool -P allow_ptrace 1
118
119
120
121 If you want to allow system to run with NIS, you must turn on the
122 allow_ypbind boolean. Disabled by default.
123
124 setsebool -P allow_ypbind 1
125
126
127
128 If you want to allow all domains to have the kernel load modules, you
129 must turn on the domain_kernel_load_modules boolean. Disabled by
130 default.
131
132 setsebool -P domain_kernel_load_modules 1
133
134
135
136 If you want to allow all domains to execute in fips_mode, you must turn
137 on the fips_mode boolean. Enabled by default.
138
139 setsebool -P fips_mode 1
140
141
142
143 If you want to enable reading of urandom for all domains, you must turn
144 on the global_ssp boolean. Disabled by default.
145
146 setsebool -P global_ssp 1
147
148
149
150 If you want to allow certain domains to map low memory in the kernel,
151 you must turn on the mmap_low_allowed boolean. Disabled by default.
152
153 setsebool -P mmap_low_allowed 1
154
155
156
157 If you want to disable transitions to insmod, you must turn on the
158 secure_mode_insmod boolean. Disabled by default.
159
160 setsebool -P secure_mode_insmod 1
161
162
163
164 If you want to boolean to determine whether the system permits loading
165 policy, setting enforcing mode, and changing boolean values. Set this
166 to true and you have to reboot to set it back, you must turn on the
167 secure_mode_policyload boolean. Disabled by default.
168
169 setsebool -P secure_mode_policyload 1
170
171
172
173 If you want to support X userspace object manager, you must turn on the
174 xserver_object_manager boolean. Disabled by default.
175
176 setsebool -P xserver_object_manager 1
177
178
179
181 The SELinux process type firstboot_t can manage files labeled with the
182 following file types. The paths listed are the default paths for these
183 file types. Note the processes UID still need to have DAC permissions.
184
185 file_type
186
187 all files on the system
188
189
191 SELinux requires files to have an extended attribute to define the file
192 type.
193
194 You can see the context of a file using the -Z option to ls
195
196 Policy governs the access confined processes have to these files.
197 SELinux firstboot policy is very flexible allowing users to setup their
198 firstboot processes in as secure a method as possible.
199
200 STANDARD FILE CONTEXT
201
202 SELinux defines the file context types for the firstboot, if you wanted
203 to store files with these types in a diffent paths, you need to execute
204 the semanage command to sepecify alternate labeling and then use
205 restorecon to put the labels on disk.
206
207 semanage fcontext -a -t firstboot_etc_t '/srv/myfirstboot_con‐
208 tent(/.*)?'
209 restorecon -R -v /srv/myfirstboot_content
210
211 Note: SELinux often uses regular expressions to specify labels that
212 match multiple files.
213
214 The following file types are defined for firstboot:
215
216
217
218 firstboot_etc_t
219
220 - Set files with the firstboot_etc_t type, if you want to store first‐
221 boot files in the /etc directories.
222
223
224
225 firstboot_exec_t
226
227 - Set files with the firstboot_exec_t type, if you want to transition
228 an executable to the firstboot_t domain.
229
230
231 Paths:
232 /usr/sbin/firstboot, /usr/share/firstboot/firstboot.py
233
234
235 Note: File context can be temporarily modified with the chcon command.
236 If you want to permanently change the file context you need to use the
237 semanage fcontext command. This will modify the SELinux labeling data‐
238 base. You will need to use restorecon to apply the labels.
239
240
242 semanage fcontext can also be used to manipulate default file context
243 mappings.
244
245 semanage permissive can also be used to manipulate whether or not a
246 process type is permissive.
247
248 semanage module can also be used to enable/disable/install/remove pol‐
249 icy modules.
250
251 semanage boolean can also be used to manipulate the booleans
252
253
254 system-config-selinux is a GUI tool available to customize SELinux pol‐
255 icy settings.
256
257
259 This manual page was auto-generated using sepolicy manpage .
260
261
263 selinux(8), firstboot(8), semanage(8), restorecon(8), chcon(1) , setse‐
264 bool(8)
265
266
267
268firstboot 15-06-03 firstboot_selinux(8)