File tree 5 files changed +42
-4
lines changed
5 files changed +42
-4
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,25 @@ ExecStart=@prefix@/sbin/clamd --foreground=true
11
11
# Reload the database
12
12
ExecReload=/bin/kill -USR2 $MAINPID
13
13
TimeoutStartSec=420
14
- # Security options
15
- # Remove ProtectSystem, ProtectHome, and ReadWritePaths..
16
- # if you want clamav to be able to remove infected files.
14
+
15
+ ##
16
+ ## Security Hardening Options
17
+ ##
18
+
19
+ # Remove `ProtectSystem`, `ProtectHome`, and `ReadWritePaths`
20
+ # if you want ClamAV to be able to remove infected files.
17
21
ProtectSystem=strict
18
22
ProtectHome=read-only
19
23
ReadWritePaths=/var/log/
24
+
20
25
NoExecPaths=/
26
+ # If you want to run commands or execute binaries on event,
27
+ # append the full path of the binary or executable to `ExecPaths`
28
+ # Commonly, this is used for `VirusEvent` in clamd.conf or `VirusAction`
29
+ # in clamav-milter.conf.The binaries must be space separated like so:
30
+ ;ExecPaths=@prefix@/sbin/clamd /bin/kill /usr/local/bin/send_sms /usr/local/bin/my_infected_message_handler
21
31
ExecPaths=@prefix@/sbin/clamd /bin/kill
32
+
22
33
ProtectClock=yes
23
34
ProtectKernelTunables=yes
24
35
ProtectKernelModules=yes
Original file line number Diff line number Diff line change @@ -202,6 +202,9 @@ Example
202
202
# Note #2: the process is invoked in the context of clamav-milter
203
203
# Note #3: clamav-milter will wait for the process to exit. Be quick or fork to
204
204
# avoid unnecessary delays in email delivery
205
+ # Note #4: When using systemd to manage ClamAv daemon, ensure that the full path to
206
+ # the VirusAction target binary / executable is listed in ExecPaths in the service
207
+ # file clamav-daemon.service in order for the process to be able to execute it.
205
208
# Default: disabled
206
209
#VirusAction /usr/local/bin/my_infected_message_handler
207
210
Original file line number Diff line number Diff line change @@ -213,6 +213,9 @@ Example
213
213
# be replaced with the virus name and %f will be replaced with the file name.
214
214
# Additionally, two environment variables will be defined: $CLAM_VIRUSEVENT_FILENAME
215
215
# and $CLAM_VIRUSEVENT_VIRUSNAME.
216
+ # Note: When using systemd to manage ClamAV daemon, ensure that the full path to
217
+ # the VirusEvent target binary / executable is listed in ExecPaths in the service
218
+ # file clamav-daemon.service in order for the process to be able to execute it.
216
219
# Default: no
217
220
#VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v in %f"
218
221
Original file line number Diff line number Diff line change @@ -151,15 +151,27 @@ DatabaseMirror database.clamav.net
151
151
152
152
# Run command after successful database update.
153
153
# Use EXIT_1 to return 1 after successful database update.
154
+ # Note: When using systemd to manage FreshClam service, append the
155
+ # full path to the OnUpdateExecute target command to `ExecPaths` in the
156
+ # service file clamav-freshclam.service in order for the process to
157
+ # be able to execute it.
154
158
# Default: disabled
155
159
#OnUpdateExecute command
156
160
157
161
# Run command when database update process fails.
162
+ # Note: When using systemd to manage FreshClam service, append the
163
+ # full path to the OnErrorExecute target command to `ExecPaths` in the
164
+ # service file clamav-freshclam.service in order for the process to
165
+ # be able to execute it.
158
166
# Default: disabled
159
167
#OnErrorExecute command
160
168
161
169
# Run command when freshclam reports outdated version.
162
170
# In the command string %v will be replaced by the new version number.
171
+ # Note: When using systemd to manage FreshClam service, append the
172
+ # full path to the OnOutdatedExecute target command to `ExecPaths`
173
+ # in the service file clamav-freshclam.service in order for the process to
174
+ # be able to execute it.
163
175
# Default: disabled
164
176
#OnOutdatedExecute command
165
177
Original file line number Diff line number Diff line change @@ -8,15 +8,24 @@ After=network-online.target
8
8
9
9
[Service]
10
10
ExecStart=@prefix@/bin/freshclam -d --foreground=true
11
- # Security Options
11
+
12
+ ##
13
+ ## Security Hardening Options
14
+ ##
12
15
ProtectSystem=full
13
16
ProtectHome=tmpfs
14
17
ProtectClock=yes
15
18
ProtectKernelTunables=yes
16
19
ProtectKernelModules=yes
17
20
ProtectKernelLogs=yes
18
21
ProtectControlGroups=yes
22
+
19
23
NoExecPaths=/
24
+ # If you want to run commands on event, append the full path of the command or
25
+ # executable to `ExecPaths`. Commonly, this is used for `OnUpdateExecute`,
26
+ # `OnErrorExecute`, and `OnOutdatedExecute` options in freshclam.conf. Make sure
27
+ # there is only one `ExecPaths` option. The binaries must be space separated like so:
28
+ ;ExecPaths=@prefix@/sbin/freshclam /usr/local/bin/OnOutdated.sh /usr/local/bin/OnErrorExecute.sh
20
29
ExecPaths=@prefix@/bin/freshclam
21
30
22
31
[Install]
You can’t perform that action at this time.
0 commit comments