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 determine whether antivirus programs can  use  JIT  com‐
63       piler,  you  must  turn  on  the antivirus_use_jit boolean. Disabled by
64       default.
65
66       setsebool -P antivirus_use_jit 1
67
68
69
70       If you want to allow all domains to execute in fips_mode, you must turn
71       on the fips_mode boolean. Enabled by default.
72
73       setsebool -P fips_mode 1
74
75
76

NSSWITCH DOMAIN

78       If you want to allow users to resolve user passwd entries directly from
79       ldap rather then using a sssd server for the antivirus_t, you must turn
80       on the authlogin_nsswitch_use_ldap boolean.
81
82       setsebool -P authlogin_nsswitch_use_ldap 1
83
84
85       If you want to allow confined applications to run with kerberos for the
86       antivirus_t, you must turn on the kerberos_enabled boolean.
87
88       setsebool -P kerberos_enabled 1
89
90

MANAGED FILES

92       The SELinux process type antivirus_t can manage files labeled with  the
93       following file types.  The paths listed are the default paths for these
94       file types.  Note the processes UID still need to have DAC permissions.
95
96       antivirus_db_t
97
98            /var/amavis(/.*)?
99            /var/clamav(/.*)?
100            /var/lib/clamd.*
101            /var/lib/amavis(/.*)?
102            /var/lib/clamav(/.*)?
103            /var/virusmails(/.*)?
104            /var/opt/f-secure(/.*)?
105            /var/spool/amavisd(/.*)?
106            /var/lib/clamav-unofficial-sigs(/.*)?
107
108       antivirus_home_t
109
110
111       antivirus_log_t
112
113            /var/log/clamd.*
114            /var/log/clamav.*
115            /var/log/freshclam.*
116            /var/log/amavisd.log.*
117            /var/log/clamav/freshclam.*
118
119       antivirus_var_run_t
120
121            /var/run/clamd.*
122            /var/run/clamav.*
123            /var/run/amavis(d)?(/.*)?
124            /var/run/amavis(d)?/clamd.pid
125            /var/run/amavisd-snmp-subagent.pid
126
127       cluster_conf_t
128
129            /etc/cluster(/.*)?
130
131       cluster_var_lib_t
132
133            /var/lib/pcsd(/.*)?
134            /var/lib/cluster(/.*)?
135            /var/lib/openais(/.*)?
136            /var/lib/pengine(/.*)?
137            /var/lib/corosync(/.*)?
138            /usr/lib/heartbeat(/.*)?
139            /var/lib/heartbeat(/.*)?
140            /var/lib/pacemaker(/.*)?
141
142       cluster_var_run_t
143
144            /var/run/crm(/.*)?
145            /var/run/cman_.*
146            /var/run/rsctmp(/.*)?
147            /var/run/aisexec.*
148            /var/run/heartbeat(/.*)?
149            /var/run/corosync-qnetd(/.*)?
150            /var/run/corosync-qdevice(/.*)?
151            /var/run/corosync.pid
152            /var/run/cpglockd.pid
153            /var/run/rgmanager.pid
154            /var/run/cluster/rgmanager.sk
155
156       root_t
157
158            /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
159            /
160            /initrd
161
162       snmpd_var_lib_t
163
164            /var/agentx(/.*)?
165            /var/net-snmp(/.*)
166            /var/lib/snmp(/.*)?
167            /var/net-snmp(/.*)?
168            /var/lib/net-snmp(/.*)?
169            /var/spool/snmptt(/.*)?
170            /usr/share/snmp/mibs/.index
171
172       systemd_passwd_var_run_t
173
174            /var/run/systemd/ask-password(/.*)?
175            /var/run/systemd/ask-password-block(/.*)?
176
177

FILE CONTEXTS

179       SELinux requires files to have an extended attribute to define the file
180       type.
181
182       You can see the context of a file using the -Z option to ls
183
184       Policy  governs  the  access  confined  processes  have to these files.
185       SELinux antivirus policy is very flexible allowing users to setup their
186       antivirus processes in as secure a method as possible.
187
188       EQUIVALENCE DIRECTORIES
189
190
191       antivirus policy stores data with multiple different file context types
192       under the /var/lib/clamav directory.  If you would like  to  store  the
193       data  in a different directory you can use the semanage command to cre‐
194       ate an equivalence mapping.  If you wanted to store this data under the
195       /srv directory you would execute the following command:
196
197       semanage fcontext -a -e /var/lib/clamav /srv/clamav
198       restorecon -R -v /srv/clamav
199
200       antivirus policy stores data with multiple different file context types
201       under the /var/run/amavis(d)? directory.  If you would  like  to  store
202       the  data  in a different directory you can use the semanage command to
203       create an equivalence mapping.  If you wanted to store this data  under
204       the /srv directory you would execute the following command:
205
206       semanage fcontext -a -e /var/run/amavis(d)? /srv/amavis(d)?
207       restorecon -R -v /srv/amavis(d)?
208
209       STANDARD FILE CONTEXT
210
211       SELinux defines the file context types for the antivirus, if you wanted
212       to store files with these types in a diffent paths, you need to execute
213       the  semanage  command  to  sepecify  alternate  labeling  and then use
214       restorecon to put the labels on disk.
215
216       semanage  fcontext   -a   -t   antivirus_tmp_t   '/srv/myantivirus_con‐
217       tent(/.*)?'
218       restorecon -R -v /srv/myantivirus_content
219
220       Note:  SELinux  often  uses  regular expressions to specify labels that
221       match multiple files.
222
223       The following file types are defined for antivirus:
224
225
226
227       antivirus_conf_t
228
229       - Set files with the antivirus_conf_t type, if you want  to  treat  the
230       files  as  antivirus  configuration data, usually stored under the /etc
231       directory.
232
233
234       Paths:
235            /etc/amavis(d)?.conf, /etc/amavisd(/.*)?
236
237
238       antivirus_db_t
239
240       - Set files with the antivirus_db_t type, if  you  want  to  treat  the
241       files as antivirus database content.
242
243
244       Paths:
245            /var/amavis(/.*)?,       /var/clamav(/.*)?,      /var/lib/clamd.*,
246            /var/lib/amavis(/.*)?,     /var/lib/clamav(/.*)?,      /var/virus‐
247            mails(/.*)?,   /var/opt/f-secure(/.*)?,  /var/spool/amavisd(/.*)?,
248            /var/lib/clamav-unofficial-sigs(/.*)?
249
250
251       antivirus_exec_t
252
253       - Set files with the antivirus_exec_t type, if you want  to  transition
254       an executable to the antivirus_t domain.
255
256
257       Paths:
258            /usr/sbin/amavisd.*,       /usr/sbin/amavi,       /usr/sbin/clamd,
259            /usr/bin/clamscan,     /usr/bin/clamdscan,     /usr/bin/freshclam,
260            /usr/sbin/clamav-milter, /usr/lib/AntiVir/antivir
261
262
263       antivirus_home_t
264
265       -  Set  files  with  the  antivirus_home_t  type,  if you want to store
266       antivirus files in the users home directory.
267
268
269
270       antivirus_initrc_exec_t
271
272       - Set files with the antivirus_initrc_exec_t type, if you want to tran‐
273       sition an executable to the antivirus_initrc_t domain.
274
275
276       Paths:
277            /etc/rc.d/init.d/clamd.*,                 /etc/rc.d/init.d/amavis,
278            /etc/rc.d/init.d/amavisd-snmp
279
280
281       antivirus_log_t
282
283       - Set files with the antivirus_log_t type, if you  want  to  treat  the
284       data  as  antivirus  log data, usually stored under the /var/log direc‐
285       tory.
286
287
288       Paths:
289            /var/log/clamd.*,     /var/log/clamav.*,     /var/log/freshclam.*,
290            /var/log/amavisd.log.*, /var/log/clamav/freshclam.*
291
292
293       antivirus_tmp_t
294
295       -  Set  files  with  the  antivirus_tmp_t  type,  if  you want to store
296       antivirus temporary files in the /tmp directories.
297
298
299
300       antivirus_unit_file_t
301
302       - Set files with the antivirus_unit_file_t type, if you want  to  treat
303       the files as antivirus unit content.
304
305
306       Paths:
307            /usr/lib/systemd/system/clamd.*, /usr/lib/systemd/system/amavisd.*
308
309
310       antivirus_var_run_t
311
312       - Set files with the antivirus_var_run_t type, if you want to store the
313       antivirus files under the /run or /var/run directory.
314
315
316       Paths:
317            /var/run/clamd.*,  /var/run/clamav.*,   /var/run/amavis(d)?(/.*)?,
318            /var/run/amavis(d)?/clamd.pid, /var/run/amavisd-snmp-subagent.pid
319
320
321       Note:  File context can be temporarily modified with the chcon command.
322       If you want to permanently change the file context you need to use  the
323       semanage fcontext command.  This will modify the SELinux labeling data‐
324       base.  You will need to use restorecon to apply the labels.
325
326

COMMANDS

328       semanage fcontext can also be used to manipulate default  file  context
329       mappings.
330
331       semanage  permissive  can  also  be used to manipulate whether or not a
332       process type is permissive.
333
334       semanage module can also be used to enable/disable/install/remove  pol‐
335       icy modules.
336
337       semanage boolean can also be used to manipulate the booleans
338
339
340       system-config-selinux is a GUI tool available to customize SELinux pol‐
341       icy settings.
342
343

AUTHOR

345       This manual page was auto-generated using sepolicy manpage .
346
347

SEE ALSO

349       selinux(8), antivirus(8), semanage(8), restorecon(8), chcon(1),  sepol‐
350       icy(8), setsebool(8)
351
352
353
354antivirus                          21-03-26               antivirus_selinux(8)
Impressum