Add ClamAV virusfilter support for Samba configuration and installation
This commit is contained in:
@@ -412,10 +412,19 @@
|
||||
#
|
||||
wide links = yes
|
||||
{% endif %}
|
||||
{%- set vfs_objects_parts = [] %}
|
||||
{% if item.vfs_object_recycle is defined and item.vfs_object_recycle|bool and item.recycle_path is defined and item.recycle_path|length > 0 %}
|
||||
{%- set _ = vfs_objects_parts.append('recycle') %}
|
||||
{% endif %}
|
||||
{% if item.vfs_object_virusfilter is defined and item.vfs_object_virusfilter|bool %}
|
||||
{%- set _ = vfs_objects_parts.append('virusfilter') %}
|
||||
{% endif %}
|
||||
{% if vfs_objects_parts | length > 0 %}
|
||||
|
||||
vfs objects = {{ vfs_objects_parts | join(' ') }}
|
||||
{% endif %}
|
||||
{% if item.vfs_object_recycle is defined and item.vfs_object_recycle|bool %}
|
||||
{% if item.recycle_path is defined and item.recycle_path|length > 0 %}
|
||||
|
||||
vfs objects = recycle
|
||||
recycle:keeptree = yes
|
||||
# touch access time from this file
|
||||
# note: this is not the modified time, which is
|
||||
@@ -438,8 +447,8 @@
|
||||
recycle:excludedir = /tmp,/temp,/cache,.Trash
|
||||
recycle:repository = {{ item.recycle_path | default('@Recycle.Bin') }}
|
||||
|
||||
# - This is a list of files and directories that are neither visible nor accessible.
|
||||
# - Each entry in the list must be separated by a '/', which allows spaces to be
|
||||
# - This is a list of files and directories that are neither visible nor accessible.
|
||||
# - Each entry in the list must be separated by a '/', which allows spaces to be
|
||||
# - included in the entry. '*' and '?' can be used to specify multiple files or
|
||||
# - directories as in DOS wildcards.
|
||||
# -
|
||||
@@ -449,11 +458,42 @@
|
||||
veto files = /{{ item.recycle_path | default('@Recycle.Bin') }}/.DS_Store/
|
||||
{% endif %}
|
||||
delete veto files = yes
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% if item.vfs_object_virusfilter is defined and item.vfs_object_virusfilter|bool %}
|
||||
|
||||
# --- Virusfilter-Einstellungen ---
|
||||
|
||||
# Scanner auswählen
|
||||
virusfilter:scanner = clamav
|
||||
|
||||
# Socket-Pfad (Debian-Standard)
|
||||
virusfilter:socket path = /var/run/clamav/clamd.ctl
|
||||
|
||||
# Verhalten bei Fund
|
||||
virusfilter:infected file action = quarantine
|
||||
virusfilter:quarantine directory = /data/samba/QUARANTINE
|
||||
|
||||
# Performance-Tuning: Ergebnis-Cache
|
||||
#virusfilter:cache entry limit = 500
|
||||
#virusfilter:cache time limit = 30
|
||||
|
||||
# Cache großzügig einstellen
|
||||
virusfilter:cache entry limit = 1000
|
||||
virusfilter:cache time limit = 60
|
||||
|
||||
# Dateigröße: Was wird gescannt?
|
||||
#virusfilter:max file size = 52428800 # 50 MB max
|
||||
virusfilter:max file size = 26214400 # 25 MB max
|
||||
virusfilter:min file size = 10 # unter 10 Byte ignorieren
|
||||
|
||||
# Scan-Zeitpunkt: nur beim Öffnen, nicht beim Schließen
|
||||
virusfilter:scan on open = yes
|
||||
virusfilter:scan on close = no
|
||||
|
||||
# Timeouts (Millisekunden)
|
||||
virusfilter:connect timeout = 30000
|
||||
virusfilter:io timeout = 60000
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user