1shutdown_selinux(8) SELinux Policy shutdown shutdown_selinux(8)
2
3
4
6 shutdown_selinux - Security Enhanced Linux Policy for the shutdown pro‐
7 cesses
8
10 Security-Enhanced Linux secures the shutdown processes via flexible
11 mandatory access control.
12
13 The shutdown processes execute with the shutdown_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 shutdown_t
20
21
22
24 The shutdown_t SELinux type can be entered via the shutdown_exec_t file
25 type.
26
27 The default entrypoint paths for the shutdown_t domain are the follow‐
28 ing:
29
30 /sbin/shutdown, /usr/sbin/shutdown, /lib/upstart/shutdown,
31 /usr/lib/upstart/shutdown
32
34 SELinux defines process types (domains) for each process running on the
35 system
36
37 You can see the context of a process using the -Z option to ps
38
39 Policy governs the access confined processes have to files. SELinux
40 shutdown policy is very flexible allowing users to setup their shutdown
41 processes in as secure a method as possible.
42
43 The following process types are defined for shutdown:
44
45 shutdown_t
46
47 Note: semanage permissive -a shutdown_t can be used to make the process
48 type shutdown_t permissive. SELinux does not deny access to permissive
49 process types, but the AVC (SELinux denials) messages are still gener‐
50 ated.
51
52
54 SELinux policy is customizable based on least access required. shut‐
55 down policy is extremely flexible and has several booleans that allow
56 you to manipulate the policy and run shutdown with the tightest access
57 possible.
58
59
60
61 If you want to allow all domains to use other domains file descriptors,
62 you must turn on the allow_domain_fd_use boolean. Enabled by default.
63
64 setsebool -P allow_domain_fd_use 1
65
66
67
68 If you want to allow confined applications to run with kerberos, you
69 must turn on the allow_kerberos boolean. Enabled by default.
70
71 setsebool -P allow_kerberos 1
72
73
74
75 If you want to allow sysadm to debug or ptrace all processes, you must
76 turn on the allow_ptrace boolean. Disabled by default.
77
78 setsebool -P allow_ptrace 1
79
80
81
82 If you want to allow system to run with NIS, you must turn on the
83 allow_ypbind boolean. Disabled by default.
84
85 setsebool -P allow_ypbind 1
86
87
88
89 If you want to allow all domains to have the kernel load modules, you
90 must turn on the domain_kernel_load_modules boolean. Disabled by
91 default.
92
93 setsebool -P domain_kernel_load_modules 1
94
95
96
97 If you want to allow all domains to execute in fips_mode, you must turn
98 on the fips_mode boolean. Enabled by default.
99
100 setsebool -P fips_mode 1
101
102
103
104 If you want to enable reading of urandom for all domains, you must turn
105 on the global_ssp boolean. Disabled by default.
106
107 setsebool -P global_ssp 1
108
109
110
111 If you want to enable support for upstart as the init program, you must
112 turn on the init_upstart boolean. Enabled by default.
113
114 setsebool -P init_upstart 1
115
116
117
118 If you want to allow confined applications to use nscd shared memory,
119 you must turn on the nscd_use_shm boolean. Enabled by default.
120
121 setsebool -P nscd_use_shm 1
122
123
124
125 If you want to support NFS home directories, you must turn on the
126 use_nfs_home_dirs boolean. Disabled by default.
127
128 setsebool -P use_nfs_home_dirs 1
129
130
131
132 If you want to support SAMBA home directories, you must turn on the
133 use_samba_home_dirs boolean. Disabled by default.
134
135 setsebool -P use_samba_home_dirs 1
136
137
138
140 The SELinux process type shutdown_t can manage files labeled with the
141 following file types. The paths listed are the default paths for these
142 file types. Note the processes UID still need to have DAC permissions.
143
144 initrc_tmp_t
145
146
147 initrc_var_run_t
148
149 /var/run/utmp
150 /var/run/random-seed
151 /var/run/runlevel.dir
152 /var/run/setmixer_flag
153
154 mnt_t
155
156 /mnt(/[^/]*)
157 /mnt(/[^/]*)?
158 /rhev(/[^/]*)?
159 /media(/[^/]*)
160 /media(/[^/]*)?
161 /etc/rhgb(/.*)?
162 /media/.hal-.*
163 /net
164 /afs
165 /rhev
166 /misc
167
168 shutdown_etc_t
169
170 /etc/nologin
171
172 shutdown_var_run_t
173
174 /var/run/shutdown.pid
175
176 tmp_t
177
178 /tmp
179 /usr/tmp
180 /var/tmp
181 /tmp-inst
182 /var/tmp-inst
183 /var/tmp/vi.recover
184
185 wtmp_t
186
187 /var/log/wtmp.*
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 shutdown policy is very flexible allowing users to setup their
198 shutdown processes in as secure a method as possible.
199
200 STANDARD FILE CONTEXT
201
202 SELinux defines the file context types for the shutdown, 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 shutdown_var_run_t '/srv/myshutdown_con‐
208 tent(/.*)?'
209 restorecon -R -v /srv/myshutdown_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 shutdown:
215
216
217
218 shutdown_etc_t
219
220 - Set files with the shutdown_etc_t type, if you want to store shutdown
221 files in the /etc directories.
222
223
224
225 shutdown_exec_t
226
227 - Set files with the shutdown_exec_t type, if you want to transition an
228 executable to the shutdown_t domain.
229
230
231 Paths:
232 /sbin/shutdown, /usr/sbin/shutdown, /lib/upstart/shutdown,
233 /usr/lib/upstart/shutdown
234
235
236 shutdown_var_run_t
237
238 - Set files with the shutdown_var_run_t type, if you want to store the
239 shutdown files under the /run or /var/run directory.
240
241
242
243 Note: File context can be temporarily modified with the chcon command.
244 If you want to permanently change the file context you need to use the
245 semanage fcontext command. This will modify the SELinux labeling data‐
246 base. You will need to use restorecon to apply the labels.
247
248
250 semanage fcontext can also be used to manipulate default file context
251 mappings.
252
253 semanage permissive can also be used to manipulate whether or not a
254 process type is permissive.
255
256 semanage module can also be used to enable/disable/install/remove pol‐
257 icy modules.
258
259 semanage boolean can also be used to manipulate the booleans
260
261
262 system-config-selinux is a GUI tool available to customize SELinux pol‐
263 icy settings.
264
265
267 This manual page was auto-generated using sepolicy manpage .
268
269
271 selinux(8), shutdown(8), semanage(8), restorecon(8), chcon(1) , setse‐
272 bool(8)
273
274
275
276shutdown 15-06-03 shutdown_selinux(8)