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 file_type,  unlabeled_t,
24       proc_type,  filesystem_type,  mtrr_device_t,  init_exec_t,  sysctl_type
25       file types.
26
27       The default entrypoint paths for the init_t domain are the following:
28
29       all files on the system, /dev/cpu/mtrr, /sbin/init(ng)?
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       initrc_t, init_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 enable support for upstart as the init program, you must
59       turn on the init_upstart boolean. Enabled by default.
60
61       setsebool -P init_upstart 1
62
63
64
65       If you want to allow all domains to use other domains file descriptors,
66       you must turn on the allow_domain_fd_use boolean. Enabled by default.
67
68       setsebool -P allow_domain_fd_use 1
69
70
71
72       If you want to allow unconfined executables to make their  heap  memory
73       executable.   Doing  this  is  a  really bad idea. Probably indicates a
74       badly coded executable, but could indicate an attack.  This  executable
75       should  be  reported  in  bugzilla, you must turn on the allow_execheap
76       boolean. Disabled by default.
77
78       setsebool -P allow_execheap 1
79
80
81
82       If you want to allow unconfined executables to map a memory  region  as
83       both  executable  and  writable,  this  is dangerous and the executable
84       should be reported in bugzilla), you must  turn  on  the  allow_execmem
85       boolean. Enabled by default.
86
87       setsebool -P allow_execmem 1
88
89
90
91       If  you  want  to  allow  all  unconfined  executables to use libraries
92       requiring text relocation that are not  labeled  textrel_shlib_t),  you
93       must turn on the allow_execmod boolean. Enabled by default.
94
95       setsebool -P allow_execmod 1
96
97
98
99       If  you  want  to allow unconfined executables to make their stack exe‐
100       cutable.  This should never, ever be necessary.  Probably  indicates  a
101       badly  coded  executable, but could indicate an attack. This executable
102       should be reported in bugzilla), you must turn on  the  allow_execstack
103       boolean. Enabled by default.
104
105       setsebool -P allow_execstack 1
106
107
108
109       If  you want to allow sysadm to debug or ptrace all processes, you must
110       turn on the allow_ptrace boolean. Disabled by default.
111
112       setsebool -P allow_ptrace 1
113
114
115
116       If you want to allow all domains to have the kernel load  modules,  you
117       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
118       default.
119
120       setsebool -P domain_kernel_load_modules 1
121
122
123
124       If you want to allow all domains to execute in fips_mode, you must turn
125       on the fips_mode boolean. Enabled by default.
126
127       setsebool -P fips_mode 1
128
129
130
131       If you want to enable reading of urandom for all domains, you must turn
132       on the global_ssp boolean. Disabled by default.
133
134       setsebool -P global_ssp 1
135
136
137
138       If you want to allow certain domains to map low memory in  the  kernel,
139       you must turn on the mmap_low_allowed boolean. Disabled by default.
140
141       setsebool -P mmap_low_allowed 1
142
143
144
145       If  you want to boolean to determine whether the system permits loading
146       policy, setting enforcing mode, and changing boolean values.  Set  this
147       to  true  and  you  have to reboot to set it back, you must turn on the
148       secure_mode_policyload boolean. Disabled by default.
149
150       setsebool -P secure_mode_policyload 1
151
152
153
154       If you want to support X userspace object manager, you must turn on the
155       xserver_object_manager boolean. Disabled by default.
156
157       setsebool -P xserver_object_manager 1
158
159
160

MANAGED FILES

162       The  SELinux process type init_t can manage files labeled with the fol‐
163       lowing file types.  The paths listed are the default  paths  for  these
164       file types.  Note the processes UID still need to have DAC permissions.
165
166       file_type
167
168            all files on the system
169
170

FILE CONTEXTS

172       SELinux requires files to have an extended attribute to define the file
173       type.
174
175       You can see the context of a file using the -Z option to ls
176
177       Policy governs the access  confined  processes  have  to  these  files.
178       SELinux init policy is very flexible allowing users to setup their init
179       processes in as secure a method as possible.
180
181       STANDARD FILE CONTEXT
182
183       SELinux defines the file context types for the init, if you  wanted  to
184       store  files  with  these types in a diffent paths, you need to execute
185       the semanage command  to  sepecify  alternate  labeling  and  then  use
186       restorecon to put the labels on disk.
187
188       semanage fcontext -a -t initrc_var_run_t '/srv/myinit_content(/.*)?'
189       restorecon -R -v /srv/myinit_content
190
191       Note:  SELinux  often  uses  regular expressions to specify labels that
192       match multiple files.
193
194       The following file types are defined for init:
195
196
197
198       init_exec_t
199
200       - Set files with the init_exec_t type, if you  want  to  transition  an
201       executable to the init_t domain.
202
203
204
205       init_var_run_t
206
207       - Set files with the init_var_run_t type, if you want to store the init
208       files under the /run or /var/run directory.
209
210
211
212       initctl_t
213
214       - Set files with the initctl_t type, if you want to treat the files  as
215       initctl data.
216
217
218
219       initrc_devpts_t
220
221       -  Set  files  with  the initrc_devpts_t type, if you want to treat the
222       files as initrc devpts data.
223
224
225
226       initrc_exec_t
227
228       - Set files with the initrc_exec_t type, if you want to  transition  an
229       executable to the initrc_t domain.
230
231
232       Paths:
233            /etc/init.d/.*,      /etc/rc.d/rc.[^/]+,      /etc/rc.d/init.d/.*,
234            /usr/libexec/dcc/stop-.*, /usr/libexec/dcc/start-.*, /etc/rc.d/rc,
235            /etc/X11/prefdm,        /usr/sbin/startx,       /usr/bin/sepg_ctl,
236            /usr/sbin/apachectl, /usr/sbin/ldap-agent, /usr/sbin/start-dirsrv,
237            /usr/sbin/open_init_pty,   /usr/sbin/restart-dirsrv,  /etc/syscon‐
238            fig/network-scripts/ifup-ipsec,      /usr/share/system-config-ser‐
239            vices/system-config-services-mechanism.py
240
241
242       initrc_state_t
243
244       -  Set  files  with  the  initrc_state_t type, if you want to treat the
245       files as initrc state data.
246
247
248
249       initrc_tmp_t
250
251       - Set files with the initrc_tmp_t type, if you  want  to  store  initrc
252       temporary files in the /tmp directories.
253
254
255
256       initrc_var_run_t
257
258       -  Set  files  with the initrc_var_run_t type, if you want to store the
259       initrc files under the /run or /var/run directory.
260
261
262       Paths:
263            /var/run/utmp,    /var/run/random-seed,     /var/run/runlevel.dir,
264            /var/run/setmixer_flag
265
266
267       Note:  File context can be temporarily modified with the chcon command.
268       If you want to permanently change the file context you need to use  the
269       semanage fcontext command.  This will modify the SELinux labeling data‐
270       base.  You will need to use restorecon to apply the labels.
271
272

COMMANDS

274       semanage fcontext can also be used to manipulate default  file  context
275       mappings.
276
277       semanage  permissive  can  also  be used to manipulate whether or not a
278       process type is permissive.
279
280       semanage module can also be used to enable/disable/install/remove  pol‐
281       icy modules.
282
283       semanage boolean can also be used to manipulate the booleans
284
285
286       system-config-selinux is a GUI tool available to customize SELinux pol‐
287       icy settings.
288
289

AUTHOR

291       This manual page was auto-generated using sepolicy manpage .
292
293

SEE ALSO

295       selinux(8), init(8),  semanage(8),  restorecon(8),  chcon(1)  ,  setse‐
296       bool(8)
297
298
299
300init                               15-06-03                    init_selinux(8)
Impressum