1motion_selinux(8) SELinux Policy motion motion_selinux(8)
2
3
4
6 motion_selinux - Security Enhanced Linux Policy for the motion pro‐
7 cesses
8
10 Security-Enhanced Linux secures the motion processes via flexible
11 mandatory access control.
12
13 The motion processes execute with the motion_t SELinux type. You can
14 check if you have these processes running by executing the ps command
15 with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep motion_t
20
21
22
24 The motion_t SELinux type can be entered via the motion_exec_t file
25 type.
26
27 The default entrypoint paths for the motion_t domain are the following:
28
29 /usr/bin/motion
30
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 motion policy is very flexible allowing users to setup their motion
39 processes in as secure a method as possible.
40
41 The following process types are defined for motion:
42
43 motion_t
44
45 Note: semanage permissive -a motion_t can be used to make the process
46 type motion_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
52 SELinux policy is customizable based on least access required. motion
53 policy is extremely flexible and has several booleans that allow you to
54 manipulate the policy and run motion with the tightest access possible.
55
56
57
58 If you want to allow all daemons to write corefiles to /, you must turn
59 on the daemons_dump_core boolean. Disabled by default.
60
61 setsebool -P daemons_dump_core 1
62
63
64
65 If you want to enable cluster mode for daemons, you must turn on the
66 daemons_enable_cluster_mode boolean. Enabled by default.
67
68 setsebool -P daemons_enable_cluster_mode 1
69
70
71
72 If you want to allow all daemons to use tcp wrappers, you must turn on
73 the daemons_use_tcp_wrapper boolean. Disabled by default.
74
75 setsebool -P daemons_use_tcp_wrapper 1
76
77
78
79 If you want to allow all daemons the ability to read/write terminals,
80 you must turn on the daemons_use_tty boolean. Disabled by default.
81
82 setsebool -P daemons_use_tty 1
83
84
85
86 If you want to deny any process from ptracing or debugging any other
87 processes, you must turn on the deny_ptrace boolean. Enabled by
88 default.
89
90 setsebool -P deny_ptrace 1
91
92
93
94 If you want to allow any process to mmap any file on system with
95 attribute file_type, you must turn on the domain_can_mmap_files bool‐
96 ean. Enabled by default.
97
98 setsebool -P domain_can_mmap_files 1
99
100
101
102 If you want to allow all domains write to kmsg_device, while kernel is
103 executed with systemd.log_target=kmsg parameter, you must turn on the
104 domain_can_write_kmsg boolean. Disabled by default.
105
106 setsebool -P domain_can_write_kmsg 1
107
108
109
110 If you want to allow all domains to use other domains file descriptors,
111 you must turn on the domain_fd_use boolean. Enabled by default.
112
113 setsebool -P domain_fd_use 1
114
115
116
117 If you want to allow all domains to have the kernel load modules, you
118 must turn on the domain_kernel_load_modules boolean. Disabled by
119 default.
120
121 setsebool -P domain_kernel_load_modules 1
122
123
124
125 If you want to allow all domains to execute in fips_mode, you must turn
126 on the fips_mode boolean. Enabled by default.
127
128 setsebool -P fips_mode 1
129
130
131
132 If you want to enable reading of urandom for all domains, you must turn
133 on the global_ssp boolean. Disabled by default.
134
135 setsebool -P global_ssp 1
136
137
138
139 If you want to support ecryptfs home directories, you must turn on the
140 use_ecryptfs_home_dirs boolean. Disabled by default.
141
142 setsebool -P use_ecryptfs_home_dirs 1
143
144
145
146 If you want to support fusefs home directories, you must turn on the
147 use_fusefs_home_dirs boolean. Disabled by default.
148
149 setsebool -P use_fusefs_home_dirs 1
150
151
152
153 If you want to support NFS home directories, you must turn on the
154 use_nfs_home_dirs boolean. Disabled by default.
155
156 setsebool -P use_nfs_home_dirs 1
157
158
159
160 If you want to support SAMBA home directories, you must turn on the
161 use_samba_home_dirs boolean. Disabled by default.
162
163 setsebool -P use_samba_home_dirs 1
164
165
166
168 The SELinux process type motion_t can manage files labeled with the
169 following file types. The paths listed are the default paths for these
170 file types. Note the processes UID still need to have DAC permissions.
171
172 cifs_t
173
174
175 cluster_conf_t
176
177 /etc/cluster(/.*)?
178
179 cluster_var_lib_t
180
181 /var/lib/pcsd(/.*)?
182 /var/lib/cluster(/.*)?
183 /var/lib/openais(/.*)?
184 /var/lib/pengine(/.*)?
185 /var/lib/corosync(/.*)?
186 /usr/lib/heartbeat(/.*)?
187 /var/lib/heartbeat(/.*)?
188 /var/lib/pacemaker(/.*)?
189
190 cluster_var_run_t
191
192 /var/run/crm(/.*)?
193 /var/run/cman_.*
194 /var/run/rsctmp(/.*)?
195 /var/run/aisexec.*
196 /var/run/heartbeat(/.*)?
197 /var/run/corosync-qnetd(/.*)?
198 /var/run/corosync-qdevice(/.*)?
199 /var/run/cpglockd.pid
200 /var/run/corosync.pid
201 /var/run/rgmanager.pid
202 /var/run/cluster/rgmanager.sk
203
204 ecryptfs_t
205
206 /home/[^/]+/.Private(/.*)?
207 /home/[^/]+/.ecryptfs(/.*)?
208
209 fusefs_t
210
211 /var/run/user/[^/]*/gvfs
212
213 motion_data_t
214
215 /var/motion(/.*)?
216
217 motion_log_t
218
219 /var/log/motion.log.*
220
221 motion_var_run_t
222
223 /var/run/motion.pid
224
225 nfs_t
226
227
228 root_t
229
230 /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
231 /
232 /initrd
233
234 zoneminder_var_lib_t
235
236 /var/lib/zoneminder(/.*)?
237
238
240 SELinux requires files to have an extended attribute to define the file
241 type.
242
243 You can see the context of a file using the -Z option to ls
244
245 Policy governs the access confined processes have to these files.
246 SELinux motion policy is very flexible allowing users to setup their
247 motion processes in as secure a method as possible.
248
249 STANDARD FILE CONTEXT
250
251 SELinux defines the file context types for the motion, if you wanted to
252 store files with these types in a diffent paths, you need to execute
253 the semanage command to sepecify alternate labeling and then use
254 restorecon to put the labels on disk.
255
256 semanage fcontext -a -t motion_var_run_t '/srv/mymotion_content(/.*)?'
257 restorecon -R -v /srv/mymotion_content
258
259 Note: SELinux often uses regular expressions to specify labels that
260 match multiple files.
261
262 The following file types are defined for motion:
263
264
265
266 motion_data_t
267
268 - Set files with the motion_data_t type, if you want to treat the files
269 as motion content.
270
271
272
273 motion_exec_t
274
275 - Set files with the motion_exec_t type, if you want to transition an
276 executable to the motion_t domain.
277
278
279
280 motion_log_t
281
282 - Set files with the motion_log_t type, if you want to treat the data
283 as motion log data, usually stored under the /var/log directory.
284
285
286
287 motion_unit_file_t
288
289 - Set files with the motion_unit_file_t type, if you want to treat the
290 files as motion unit content.
291
292
293
294 motion_var_run_t
295
296 - Set files with the motion_var_run_t type, if you want to store the
297 motion files under the /run or /var/run directory.
298
299
300
301 Note: File context can be temporarily modified with the chcon command.
302 If you want to permanently change the file context you need to use the
303 semanage fcontext command. This will modify the SELinux labeling data‐
304 base. You will need to use restorecon to apply the labels.
305
306
308 semanage fcontext can also be used to manipulate default file context
309 mappings.
310
311 semanage permissive can also be used to manipulate whether or not a
312 process type is permissive.
313
314 semanage module can also be used to enable/disable/install/remove pol‐
315 icy modules.
316
317 semanage boolean can also be used to manipulate the booleans
318
319
320 system-config-selinux is a GUI tool available to customize SELinux pol‐
321 icy settings.
322
323
325 This manual page was auto-generated using sepolicy manpage .
326
327
329 selinux(8), motion(8), semanage(8), restorecon(8), chcon(1), sepol‐
330 icy(8) , setsebool(8)
331
332
333
334motion 19-04-25 motion_selinux(8)