1init_selinux(8)               SELinux Policy init              init_selinux(8)
2
3
4

NAME

6       init_selinux - Security Enhanced Linux Policy for the init processes
7

DESCRIPTION

9       Security-Enhanced  Linux secures the init processes via flexible manda‐
10       tory access control.
11
12       The init processes execute with the init_t SELinux type. You can  check
13       if  you  have  these processes running by executing the ps command with
14       the -Z qualifier.
15
16       For example:
17
18       ps -eZ | grep init_t
19
20
21

ENTRYPOINTS

23       The init_t SELinux type can be entered via the init_exec_t file type.
24
25       The default entrypoint paths for the init_t domain are the following:
26
27       /sbin/init(ng)?,      /usr/sbin/init(ng)?,      /usr/lib/systemd/[^/]*,
28       /usr/lib/systemd/system-generators/[^/]*,  /bin/systemd, /sbin/upstart,
29       /usr/bin/systemd, /usr/sbin/upstart
30

PROCESS TYPES

32       SELinux defines process types (domains) for each process running on the
33       system
34
35       You can see the context of a process using the -Z option to ps
36
37       Policy  governs  the  access confined processes have to files.  SELinux
38       init policy is very flexible allowing users to setup  their  init  pro‐
39       cesses in as secure a method as possible.
40
41       The following process types are defined for init:
42
43       init_t, initrc_t
44
45       Note:  semanage  permissive  -a  init_t can be used to make the process
46       type init_t permissive. SELinux does  not  deny  access  to  permissive
47       process  types, but the AVC (SELinux denials) messages are still gener‐
48       ated.
49
50

BOOLEANS

52       SELinux policy is customizable based on least  access  required.   init
53       policy is extremely flexible and has several booleans that allow you to
54       manipulate the policy and run init with the tightest access possible.
55
56
57
58       If you want to allow users to resolve user passwd entries directly from
59       ldap  rather  then  using  a  sssd server, you must turn on the authlo‐
60       gin_nsswitch_use_ldap boolean. Disabled by default.
61
62       setsebool -P authlogin_nsswitch_use_ldap 1
63
64
65
66       If you want to deny user domains applications to map a memory region as
67       both  executable  and  writable,  this  is dangerous and the executable
68       should be reported in bugzilla, you must turn on the deny_execmem bool‐
69       ean. Enabled by default.
70
71       setsebool -P deny_execmem 1
72
73
74
75       If  you  want  to deny any process from ptracing or debugging any other
76       processes, you  must  turn  on  the  deny_ptrace  boolean.  Enabled  by
77       default.
78
79       setsebool -P deny_ptrace 1
80
81
82
83       If  you  want  to  allow  any  process  to mmap any file on system with
84       attribute file_type, you must turn on the  domain_can_mmap_files  bool‐
85       ean. Enabled by default.
86
87       setsebool -P domain_can_mmap_files 1
88
89
90
91       If  you want to allow all domains write to kmsg_device, while kernel is
92       executed with systemd.log_target=kmsg parameter, you must turn  on  the
93       domain_can_write_kmsg boolean. Disabled by default.
94
95       setsebool -P domain_can_write_kmsg 1
96
97
98
99       If you want to allow all domains to use other domains file descriptors,
100       you must turn on the domain_fd_use boolean. Enabled by default.
101
102       setsebool -P domain_fd_use 1
103
104
105
106       If you want to allow all domains to have the kernel load  modules,  you
107       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
108       default.
109
110       setsebool -P domain_kernel_load_modules 1
111
112
113
114       If you want to allow all domains to execute in fips_mode, you must turn
115       on the fips_mode boolean. Enabled by default.
116
117       setsebool -P fips_mode 1
118
119
120
121       If you want to enable reading of urandom for all domains, you must turn
122       on the global_ssp boolean. Disabled by default.
123
124       setsebool -P global_ssp 1
125
126
127
128       If you want to allow confined applications to run  with  kerberos,  you
129       must turn on the kerberos_enabled boolean. Enabled by default.
130
131       setsebool -P kerberos_enabled 1
132
133
134
135       If  you  want  to control the ability to mmap a low area of the address
136       space, as configured by /proc/sys/vm/mmap_min_addr, you  must  turn  on
137       the mmap_low_allowed boolean. Disabled by default.
138
139       setsebool -P mmap_low_allowed 1
140
141
142
143       If  you  want  to  allow  system  to run with NIS, you must turn on the
144       nis_enabled boolean. Disabled by default.
145
146       setsebool -P nis_enabled 1
147
148
149
150       If you want to allow confined applications to use nscd  shared  memory,
151       you must turn on the nscd_use_shm boolean. Disabled by default.
152
153       setsebool -P nscd_use_shm 1
154
155
156
157       If  you  want  to  disable  kernel module loading, you must turn on the
158       secure_mode_insmod boolean. Enabled 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. Enabled by default.
168
169       setsebool -P secure_mode_policyload 1
170
171
172
173       If  you  want to allow unconfined executables to make their heap memory
174       executable.  Doing this is a really  bad  idea.  Probably  indicates  a
175       badly  coded  executable, but could indicate an attack. This executable
176       should  be  reported  in  bugzilla,  you  must  turn  on   the   selin‐
177       uxuser_execheap boolean. Disabled by default.
178
179       setsebool -P selinuxuser_execheap 1
180
181
182
183       If  you  want  to  allow  all  unconfined  executables to use libraries
184       requiring text relocation that are  not  labeled  textrel_shlib_t,  you
185       must turn on the selinuxuser_execmod boolean. Enabled by default.
186
187       setsebool -P selinuxuser_execmod 1
188
189
190
191       If  you  want  to allow unconfined executables to make their stack exe‐
192       cutable.  This should never, ever be necessary.  Probably  indicates  a
193       badly  coded  executable, but could indicate an attack. This executable
194       should be reported in bugzilla, you must turn on the  selinuxuser_exec‐
195       stack boolean. Enabled by default.
196
197       setsebool -P selinuxuser_execstack 1
198
199
200
201       If you want to support X userspace object manager, you must turn on the
202       xserver_object_manager boolean. Enabled by default.
203
204       setsebool -P xserver_object_manager 1
205
206
207

MANAGED FILES

209       The SELinux process type init_t can manage files labeled with the  fol‐
210       lowing  file  types.   The paths listed are the default paths for these
211       file types.  Note the processes UID still need to have DAC permissions.
212
213       file_type
214
215            all files on the system
216
217

FILE CONTEXTS

219       SELinux requires files to have an extended attribute to define the file
220       type.
221
222       You can see the context of a file using the -Z option to ls
223
224       Policy  governs  the  access  confined  processes  have to these files.
225       SELinux init policy is very flexible allowing users to setup their init
226       processes in as secure a method as possible.
227
228       EQUIVALENCE DIRECTORIES
229
230
231       init  policy  stores  data  with  multiple different file context types
232       under the /var/run/systemd directory.  If you would like to  store  the
233       data  in a different directory you can use the semanage command to cre‐
234       ate an equivalence mapping.  If you wanted to store this data under the
235       /srv dirctory you would execute the following command:
236
237       semanage fcontext -a -e /var/run/systemd /srv/systemd
238       restorecon -R -v /srv/systemd
239
240       STANDARD FILE CONTEXT
241
242       SELinux  defines  the file context types for the init, if you wanted to
243       store files with these types in a diffent paths, you  need  to  execute
244       the  semanage  command  to  sepecify  alternate  labeling  and then use
245       restorecon to put the labels on disk.
246
247       semanage fcontext -a -t initrc_var_run_t '/srv/myinit_content(/.*)?'
248       restorecon -R -v /srv/myinit_content
249
250       Note: SELinux often uses regular expressions  to  specify  labels  that
251       match multiple files.
252
253       The following file types are defined for init:
254
255
256
257       init_exec_t
258
259       -  Set  files  with  the init_exec_t type, if you want to transition an
260       executable to the init_t domain.
261
262
263       Paths:
264            /sbin/init(ng)?,   /usr/sbin/init(ng)?,    /usr/lib/systemd/[^/]*,
265            /usr/lib/systemd/system-generators/[^/]*,            /bin/systemd,
266            /sbin/upstart, /usr/bin/systemd, /usr/sbin/upstart
267
268
269       init_tmp_t
270
271       - Set files with the init_tmp_t type, if you want to store init  tempo‐
272       rary files in the /tmp directories.
273
274
275
276       init_var_lib_t
277
278       - Set files with the init_var_lib_t type, if you want to store the init
279       files under the /var/lib directory.
280
281
282
283       init_var_run_t
284
285       - Set files with the init_var_run_t type, if you want to store the init
286       files under the /run or /var/run directory.
287
288
289
290       initctl_t
291
292       -  Set files with the initctl_t type, if you want to treat the files as
293       initctl data.
294
295
296       Paths:
297            /dev/initctl, /var/run/initctl, /var/run/systemd/initctl/fifo
298
299
300       initrc_devpts_t
301
302       - Set files with the initrc_devpts_t type, if you  want  to  treat  the
303       files as initrc devpts data.
304
305
306
307       initrc_exec_t
308
309       -  Set  files with the initrc_exec_t type, if you want to transition an
310       executable to the initrc_t domain.
311
312
313       Paths:
314            /etc/init.d/.*,      /etc/rc.d/rc.[^/]+,      /etc/rc.d/init.d/.*,
315            /opt/nfast/sbin/init.d-ncipher,        /usr/lib/systemd/rhel[^/]*,
316            /usr/libexec/dcc/stop-.*,               /usr/libexec/dcc/start-.*,
317            /opt/nfast/scripts/init.d/(.*),   /etc/rc.d/rc,   /etc/X11/prefdm,
318            /usr/sbin/startx,     /usr/bin/sepg_ctl,      /usr/sbin/apachectl,
319            /usr/sbin/start-dirsrv,                   /usr/sbin/open_init_pty,
320            /usr/sbin/restart-dirsrv,     /etc/sysconfig/network-scripts/ifup-
321            ipsec,   /usr/share/system-config-services/system-config-services-
322            mechanism.py
323
324
325       initrc_state_t
326
327       - Set files with the initrc_state_t type, if  you  want  to  treat  the
328       files as initrc state data.
329
330
331
332       initrc_tmp_t
333
334       -  Set  files  with  the initrc_tmp_t type, if you want to store initrc
335       temporary files in the /tmp directories.
336
337
338
339       initrc_var_log_t
340
341       - Set files with the initrc_var_log_t type, if you want  to  treat  the
342       data  as  initrc var log data, usually stored under the /var/log direc‐
343       tory.
344
345
346
347       initrc_var_run_t
348
349       - Set files with the initrc_var_run_t type, if you want  to  store  the
350       initrc files under the /run or /var/run directory.
351
352
353       Paths:
354            /var/run/utmp,     /var/run/random-seed,    /var/run/runlevel.dir,
355            /var/run/setmixer_flag
356
357
358       Note: File context can be temporarily modified with the chcon  command.
359       If  you want to permanently change the file context you need to use the
360       semanage fcontext command.  This will modify the SELinux labeling data‐
361       base.  You will need to use restorecon to apply the labels.
362
363

COMMANDS

365       semanage  fcontext  can also be used to manipulate default file context
366       mappings.
367
368       semanage permissive can also be used to manipulate  whether  or  not  a
369       process type is permissive.
370
371       semanage  module can also be used to enable/disable/install/remove pol‐
372       icy modules.
373
374       semanage boolean can also be used to manipulate the booleans
375
376
377       system-config-selinux is a GUI tool available to customize SELinux pol‐
378       icy settings.
379
380

AUTHOR

382       This manual page was auto-generated using sepolicy manpage .
383
384

SEE ALSO

386       selinux(8),  init(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)
387       , setsebool(8)
388
389
390
391init                               19-04-25                    init_selinux(8)
Impressum