1antivirus_selinux(8)       SELinux Policy antivirus       antivirus_selinux(8)
2
3
4

NAME

6       antivirus_selinux  -  Security  Enhanced Linux Policy for the antivirus
7       processes
8

DESCRIPTION

10       Security-Enhanced Linux secures the antivirus  processes  via  flexible
11       mandatory access control.
12
13       The  antivirus processes execute with the antivirus_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 antivirus_t
20
21
22

ENTRYPOINTS

24       The  antivirus_t  SELinux  type can be entered via the antivirus_exec_t
25       file type.
26
27       The default entrypoint paths for the antivirus_t domain are the follow‐
28       ing:
29
30       /usr/sbin/amavisd.*,  /usr/sbin/amavi,  /usr/sbin/clamd, /usr/bin/clam‐
31       scan, /usr/bin/clamdscan, /usr/bin/freshclam,  /usr/sbin/clamav-milter,
32       /usr/lib/AntiVir/antivir
33

PROCESS TYPES

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       antivirus  policy  is  very  flexible  allowing  users  to  setup their
42       antivirus processes in as secure a method as possible.
43
44       The following process types are defined for antivirus:
45
46       antivirus_t
47
48       Note: semanage permissive -a  antivirus_t  can  be  used  to  make  the
49       process  type  antivirus_t  permissive. SELinux does not deny access to
50       permissive process types, but the AVC (SELinux  denials)  messages  are
51       still generated.
52
53

BOOLEANS

55       SELinux   policy  is  customizable  based  on  least  access  required.
56       antivirus policy is extremely flexible and has  several  booleans  that
57       allow  you to manipulate the policy and run antivirus with the tightest
58       access possible.
59
60
61
62       If you want to allow antivirus programs to read non security files on a
63       system,  you  must  turn on the antivirus_can_scan_system boolean. Dis‐
64       abled by default.
65
66       setsebool -P antivirus_can_scan_system 1
67
68
69
70       If you want to determine whether can antivirus programs  use  JIT  com‐
71       piler,  you  must  turn  on  the antivirus_use_jit boolean. Disabled by
72       default.
73
74       setsebool -P antivirus_use_jit 1
75
76
77
78       If you want to allow users to resolve user passwd entries directly from
79       ldap  rather  then  using  a  sssd server, you must turn on the authlo‐
80       gin_nsswitch_use_ldap boolean. Disabled by default.
81
82       setsebool -P authlogin_nsswitch_use_ldap 1
83
84
85
86       If you want to allow all daemons to write corefiles to /, you must turn
87       on the daemons_dump_core boolean. Disabled by default.
88
89       setsebool -P daemons_dump_core 1
90
91
92
93       If  you  want  to enable cluster mode for daemons, you must turn on the
94       daemons_enable_cluster_mode boolean. Enabled by default.
95
96       setsebool -P daemons_enable_cluster_mode 1
97
98
99
100       If you want to allow all daemons to use tcp wrappers, you must turn  on
101       the daemons_use_tcp_wrapper boolean. Disabled by default.
102
103       setsebool -P daemons_use_tcp_wrapper 1
104
105
106
107       If  you  want to allow all daemons the ability to read/write terminals,
108       you must turn on the daemons_use_tty boolean. Disabled by default.
109
110       setsebool -P daemons_use_tty 1
111
112
113
114       If you want to deny any process from ptracing or  debugging  any  other
115       processes,  you  must  turn  on  the  deny_ptrace  boolean.  Enabled by
116       default.
117
118       setsebool -P deny_ptrace 1
119
120
121
122       If you want to allow any process  to  mmap  any  file  on  system  with
123       attribute  file_type,  you must turn on the domain_can_mmap_files bool‐
124       ean. Enabled by default.
125
126       setsebool -P domain_can_mmap_files 1
127
128
129
130       If you want to allow all domains write to kmsg_device, while kernel  is
131       executed  with  systemd.log_target=kmsg parameter, you must turn on the
132       domain_can_write_kmsg boolean. Disabled by default.
133
134       setsebool -P domain_can_write_kmsg 1
135
136
137
138       If you want to allow all domains to use other domains file descriptors,
139       you must turn on the domain_fd_use boolean. Enabled by default.
140
141       setsebool -P domain_fd_use 1
142
143
144
145       If  you  want to allow all domains to have the kernel load modules, you
146       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
147       default.
148
149       setsebool -P domain_kernel_load_modules 1
150
151
152
153       If you want to allow all domains to execute in fips_mode, you must turn
154       on the fips_mode boolean. Enabled by default.
155
156       setsebool -P fips_mode 1
157
158
159
160       If you want to enable reading of urandom for all domains, you must turn
161       on the global_ssp boolean. Disabled by default.
162
163       setsebool -P global_ssp 1
164
165
166
167       If  you  want  to allow confined applications to run with kerberos, you
168       must turn on the kerberos_enabled boolean. Enabled by default.
169
170       setsebool -P kerberos_enabled 1
171
172
173
174       If you want to allow system to run with  NIS,  you  must  turn  on  the
175       nis_enabled boolean. Disabled by default.
176
177       setsebool -P nis_enabled 1
178
179
180
181       If  you  want to allow confined applications to use nscd shared memory,
182       you must turn on the nscd_use_shm boolean. Disabled by default.
183
184       setsebool -P nscd_use_shm 1
185
186
187

NSSWITCH DOMAIN

189       If you want to allow users to resolve user passwd entries directly from
190       ldap rather then using a sssd server for the antivirus_t, you must turn
191       on the authlogin_nsswitch_use_ldap boolean.
192
193       setsebool -P authlogin_nsswitch_use_ldap 1
194
195
196       If you want to allow confined applications to run with kerberos for the
197       antivirus_t, you must turn on the kerberos_enabled boolean.
198
199       setsebool -P kerberos_enabled 1
200
201

MANAGED FILES

203       The  SELinux process type antivirus_t can manage files labeled with the
204       following file types.  The paths listed are the default paths for these
205       file types.  Note the processes UID still need to have DAC permissions.
206
207       antivirus_db_t
208
209            /var/clamav(/.*)?
210            /var/amavis(/.*)?
211            /var/lib/clamd.*
212            /var/lib/amavis(/.*)?
213            /var/lib/clamav(/.*)?
214            /var/virusmails(/.*)?
215            /var/opt/f-secure(/.*)?
216            /var/spool/amavisd(/.*)?
217            /var/lib/clamav-unofficial-sigs(/.*)?
218
219       antivirus_home_t
220
221
222       antivirus_log_t
223
224            /var/log/clamd.*
225            /var/log/clamav.*
226            /var/log/freshclam.*
227            /var/log/amavisd.log.*
228            /var/log/clamav/freshclam.*
229
230       antivirus_tmp_t
231
232
233       antivirus_var_run_t
234
235            /var/run/clamd.*
236            /var/run/clamav.*
237            /var/run/amavis(d)?(/.*)?
238            /var/run/amavis(d)?/clamd.pid
239            /var/run/amavisd-snmp-subagent.pid
240
241       cluster_conf_t
242
243            /etc/cluster(/.*)?
244
245       cluster_var_lib_t
246
247            /var/lib/pcsd(/.*)?
248            /var/lib/cluster(/.*)?
249            /var/lib/openais(/.*)?
250            /var/lib/pengine(/.*)?
251            /var/lib/corosync(/.*)?
252            /usr/lib/heartbeat(/.*)?
253            /var/lib/heartbeat(/.*)?
254            /var/lib/pacemaker(/.*)?
255
256       cluster_var_run_t
257
258            /var/run/crm(/.*)?
259            /var/run/cman_.*
260            /var/run/rsctmp(/.*)?
261            /var/run/aisexec.*
262            /var/run/heartbeat(/.*)?
263            /var/run/corosync-qnetd(/.*)?
264            /var/run/corosync-qdevice(/.*)?
265            /var/run/cpglockd.pid
266            /var/run/corosync.pid
267            /var/run/rgmanager.pid
268            /var/run/cluster/rgmanager.sk
269
270       root_t
271
272            /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
273            /
274            /initrd
275
276       snmpd_var_lib_t
277
278            /var/agentx(/.*)?
279            /var/net-snmp(/.*)
280            /var/lib/snmp(/.*)?
281            /var/net-snmp(/.*)?
282            /var/lib/net-snmp(/.*)?
283            /var/spool/snmptt(/.*)?
284            /usr/share/snmp/mibs/.index
285
286       systemd_passwd_var_run_t
287
288            /var/run/systemd/ask-password(/.*)?
289            /var/run/systemd/ask-password-block(/.*)?
290
291

FILE CONTEXTS

293       SELinux requires files to have an extended attribute to define the file
294       type.
295
296       You can see the context of a file using the -Z option to ls
297
298       Policy governs the access  confined  processes  have  to  these  files.
299       SELinux antivirus policy is very flexible allowing users to setup their
300       antivirus processes in as secure a method as possible.
301
302       EQUIVALENCE DIRECTORIES
303
304
305       antivirus policy stores data with multiple different file context types
306       under  the  /var/lib/clamav  directory.  If you would like to store the
307       data in a different directory you can use the semanage command to  cre‐
308       ate an equivalence mapping.  If you wanted to store this data under the
309       /srv dirctory you would execute the following command:
310
311       semanage fcontext -a -e /var/lib/clamav /srv/clamav
312       restorecon -R -v /srv/clamav
313
314       antivirus policy stores data with multiple different file context types
315       under  the  /var/run/amavis(d)?  directory.  If you would like to store
316       the data in a different directory you can use the semanage  command  to
317       create  an equivalence mapping.  If you wanted to store this data under
318       the /srv dirctory you would execute the following command:
319
320       semanage fcontext -a -e /var/run/amavis(d)? /srv/amavis(d)?
321       restorecon -R -v /srv/amavis(d)?
322
323       STANDARD FILE CONTEXT
324
325       SELinux defines the file context types for the antivirus, if you wanted
326       to store files with these types in a diffent paths, you need to execute
327       the semanage command  to  sepecify  alternate  labeling  and  then  use
328       restorecon to put the labels on disk.
329
330       semanage  fcontext  -a  -t  antivirus_var_run_t  '/srv/myantivirus_con‐
331       tent(/.*)?'
332       restorecon -R -v /srv/myantivirus_content
333
334       Note: SELinux often uses regular expressions  to  specify  labels  that
335       match multiple files.
336
337       The following file types are defined for antivirus:
338
339
340
341       antivirus_conf_t
342
343       -  Set  files  with the antivirus_conf_t type, if you want to treat the
344       files as antivirus configuration data, usually stored  under  the  /etc
345       directory.
346
347
348       Paths:
349            /etc/amavis(d)?.conf, /etc/amavisd(/.*)?
350
351
352       antivirus_db_t
353
354       -  Set  files  with  the  antivirus_db_t type, if you want to treat the
355       files as antivirus database content.
356
357
358       Paths:
359            /var/clamav(/.*)?,      /var/amavis(/.*)?,       /var/lib/clamd.*,
360            /var/lib/amavis(/.*)?,      /var/lib/clamav(/.*)?,     /var/virus‐
361            mails(/.*)?,  /var/opt/f-secure(/.*)?,   /var/spool/amavisd(/.*)?,
362            /var/lib/clamav-unofficial-sigs(/.*)?
363
364
365       antivirus_exec_t
366
367       -  Set  files with the antivirus_exec_t type, if you want to transition
368       an executable to the antivirus_t domain.
369
370
371       Paths:
372            /usr/sbin/amavisd.*,       /usr/sbin/amavi,       /usr/sbin/clamd,
373            /usr/bin/clamscan,     /usr/bin/clamdscan,     /usr/bin/freshclam,
374            /usr/sbin/clamav-milter, /usr/lib/AntiVir/antivir
375
376
377       antivirus_home_t
378
379       - Set files with the  antivirus_home_t  type,  if  you  want  to  store
380       antivirus files in the users home directory.
381
382
383
384       antivirus_initrc_exec_t
385
386       - Set files with the antivirus_initrc_exec_t type, if you want to tran‐
387       sition an executable to the antivirus_initrc_t domain.
388
389
390       Paths:
391            /etc/rc.d/init.d/clamd.*,                 /etc/rc.d/init.d/amavis,
392            /etc/rc.d/init.d/amavisd-snmp
393
394
395       antivirus_log_t
396
397       -  Set  files  with  the antivirus_log_t type, if you want to treat the
398       data as antivirus log data, usually stored under  the  /var/log  direc‐
399       tory.
400
401
402       Paths:
403            /var/log/clamd.*,     /var/log/clamav.*,     /var/log/freshclam.*,
404            /var/log/amavisd.log.*, /var/log/clamav/freshclam.*
405
406
407       antivirus_tmp_t
408
409       - Set files with  the  antivirus_tmp_t  type,  if  you  want  to  store
410       antivirus temporary files in the /tmp directories.
411
412
413
414       antivirus_unit_file_t
415
416       -  Set  files with the antivirus_unit_file_t type, if you want to treat
417       the files as antivirus unit content.
418
419
420
421       antivirus_var_run_t
422
423       - Set files with the antivirus_var_run_t type, if you want to store the
424       antivirus files under the /run or /var/run directory.
425
426
427       Paths:
428            /var/run/clamd.*,   /var/run/clamav.*,  /var/run/amavis(d)?(/.*)?,
429            /var/run/amavis(d)?/clamd.pid, /var/run/amavisd-snmp-subagent.pid
430
431
432       Note: File context can be temporarily modified with the chcon  command.
433       If  you want to permanently change the file context you need to use the
434       semanage fcontext command.  This will modify the SELinux labeling data‐
435       base.  You will need to use restorecon to apply the labels.
436
437

COMMANDS

439       semanage  fcontext  can also be used to manipulate default file context
440       mappings.
441
442       semanage permissive can also be used to manipulate  whether  or  not  a
443       process type is permissive.
444
445       semanage  module can also be used to enable/disable/install/remove pol‐
446       icy modules.
447
448       semanage boolean can also be used to manipulate the booleans
449
450
451       system-config-selinux is a GUI tool available to customize SELinux pol‐
452       icy settings.
453
454

AUTHOR

456       This manual page was auto-generated using sepolicy manpage .
457
458

SEE ALSO

460       selinux(8),  antivirus(8), semanage(8), restorecon(8), chcon(1), sepol‐
461       icy(8) , setsebool(8)
462
463
464
465antivirus                          19-04-25               antivirus_selinux(8)
Impressum