Add virusfilter configuration options to smb.conf.j2 for file inclusion/exclusion
This commit is contained in:
@@ -533,6 +533,20 @@
|
|||||||
virusfilter:scan on open = yes
|
virusfilter:scan on open = yes
|
||||||
virusfilter:scan on close = yes
|
virusfilter:scan on close = yes
|
||||||
|
|
||||||
|
{% set virusfilter_include_files = item.vfs_object_virusfilter_include_files | default([]) %}
|
||||||
|
{% set virusfilter_exclude_files = item.vfs_object_virusfilter_exlude_files | default(item.vfs_object_virusfilter_exclude_files | default([])) %}
|
||||||
|
{% if virusfilter_include_files | length > 0 %}
|
||||||
|
# Nur diese Dateiendungen vom Virusfilter pruefen.
|
||||||
|
virusfilter:include files = \.({{ virusfilter_include_files | join('|') }})$
|
||||||
|
{% if virusfilter_exclude_files | length > 0 %}
|
||||||
|
# Include und Exclude sind gesetzt: Include hat Vorrang, Exclude wird ignoriert.
|
||||||
|
#virusfilter:exclude files = \.({{ virusfilter_exclude_files | join('|') }})$
|
||||||
|
{% endif %}
|
||||||
|
{% elif virusfilter_exclude_files | length > 0 %}
|
||||||
|
# Diese Dateiendungen von der Viruspruefung ausschliessen.
|
||||||
|
virusfilter:exclude files = \.({{ virusfilter_exclude_files | join('|') }})$
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Fehlercode bei infizierter Datei (beim Öffnen)
|
# Fehlercode bei infizierter Datei (beim Öffnen)
|
||||||
virusfilter:infected file errno on open = EACCES
|
virusfilter:infected file errno on open = EACCES
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user