summaryrefslogtreecommitdiff
path: root/app-antivirus/skyldav/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-antivirus/skyldav/files')
-rw-r--r--app-antivirus/skyldav/files/skyldav-conf.patch21
-rw-r--r--app-antivirus/skyldav/files/skyldav-examples.patch11
-rw-r--r--app-antivirus/skyldav/files/skyldav.confd10
-rwxr-xr-xapp-antivirus/skyldav/files/skyldav.initd25
-rw-r--r--app-antivirus/skyldav/files/skyldav.service-r115
-rw-r--r--app-antivirus/skyldav/files/skyldav.service.conf3
-rw-r--r--app-antivirus/skyldav/files/skyldav.tmpfilesd2
7 files changed, 87 insertions, 0 deletions
diff --git a/app-antivirus/skyldav/files/skyldav-conf.patch b/app-antivirus/skyldav/files/skyldav-conf.patch
new file mode 100644
index 000000000000..ed5b2058f6a6
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav-conf.patch
@@ -0,0 +1,21 @@
+diff -urN skyldav-0.7.orig/examples/etc/skyldav.conf skyldav-0.7/examples/etc/skyldav.conf
+--- skyldav-0.7.orig/examples/etc/skyldav.conf 2016-06-12 18:39:51.000000000 +0200
++++ skyldav-0.7/examples/etc/skyldav.conf 2017-02-21 15:12:06.875945224 +0100
+@@ -22,6 +22,9 @@
+
+ # Directories that shall not be scanned (including subdirectories)
+ # EXCLUDE_PATH = /var/noscan, /opt/noscan
++#
++# Exclude various portage directories for performance reasons
++EXCLUDE_PATH = /usr/portage, /var/cache/edb, /var/db/pkg, /var/tmp/portage, /var/tmp/binpkgs, /var/log/portage
+
+ # File systems that are local, virus scan results may be cached.
+ # LOCAL_FS = ext3, ext4, iso9660, tmpfs, vfat
+@@ -31,6 +34,7 @@
+ # File systems that shall not be marked for virus scan.
+ # Cifs uses a background daemon which causes problems when scanned.
+ # Exclusion of fuse file systems is hard coded.
++# Do not exclude devtmpfs and configfs, as userspace could write malware onto them!
+ # NOMARK_FS = proc, sysfs
+ NOMARK_FS = proc, sysfs, devpts, debugfs, securityfs, cgroup, rpc_pipefs
+ NOMARK_FS = mqueue, autofs, cifs
diff --git a/app-antivirus/skyldav/files/skyldav-examples.patch b/app-antivirus/skyldav/files/skyldav-examples.patch
new file mode 100644
index 000000000000..b62e78cc9698
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav-examples.patch
@@ -0,0 +1,11 @@
+diff -urN skyldav-0.7.orig/Makefile.am skyldav-0.7/Makefile.am
+--- skyldav-0.7.orig/Makefile.am 2016-06-12 18:39:51.000000000 +0200
++++ skyldav-0.7/Makefile.am 2017-02-21 15:11:35.709518793 +0100
+@@ -9,7 +9,6 @@
+ rm -rf doc/doxygen
+
+ install-data-local: \
+- install-skyldav-examples \
+ install-skyldav-conf \
+ install-skyldavnotify-desktop
+
diff --git a/app-antivirus/skyldav/files/skyldav.confd b/app-antivirus/skyldav/files/skyldav.confd
new file mode 100644
index 000000000000..87829b658ebe
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/skyldav
+
+# Options to pass to the skyldav daemon.
+# Option -d for daemonizing is always passed!
+# See the skyldav(1) man page for more info.
+
+#SKYLDAV_OPTS="-m 1"
diff --git a/app-antivirus/skyldav/files/skyldav.initd b/app-antivirus/skyldav/files/skyldav.initd
new file mode 100755
index 000000000000..539cd4f083cd
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SKYLDAV_BIN="/usr/sbin/skyldav"
+SKYLDAV_OPTS="${SKYLDAV_OPTS:--m 2}"
+SKYLDAV_CONFIGFILE="/etc/skyldav.conf"
+SKYLDAV_PIDFILE_DIR="${SKYLDAV_PIDFILE_DIR:-/var/run/${RC_SVCNAME}}"
+SKYLDAV_PIDFILE="${SKYLDAV_PIDFILE:-${SKYLDAV_PIDFILE_DIR}/${RC_SVCNAME}.pid}"
+
+name="${SKYLDAV_BIN##*/}"
+command="${SKYLDAV_BIN}"
+command_args="-d ${SKYLDAV_OPTS}"
+pidfile="${SKYLDAV_PIDFILE}"
+description="Skyld AV is an anti-virus on-access scanner based upon Clam AV and fanotify"
+required_files="${SKYLDAV_CONFIG}"
+
+depend() {
+ use logger
+ need localmount
+}
+
+start_pre() {
+ checkpath -d -m 0755 -o root:root "${SKYLDAV_PIDFILE_DIR}"
+}
diff --git a/app-antivirus/skyldav/files/skyldav.service-r1 b/app-antivirus/skyldav/files/skyldav.service-r1
new file mode 100644
index 000000000000..decd788a9f83
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.service-r1
@@ -0,0 +1,15 @@
+[Unit]
+Description=SkyldAV anti-virus on-access scanning daemon based upon Clam AV and fanotify
+Requires=local-fs.target clamd.service
+After=local-fs.target clamd.service
+Before=multi-user.target
+
+[Service]
+Type=simple
+Environment="SKYLDAV_MESSAGE_LEVEL=2"
+ExecStart=/usr/sbin/skyldav -d -m ${SKYLDAV_MESSAGE_LEVEL}
+#KillMode=process
+#KillSignal=SIGTERM
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-antivirus/skyldav/files/skyldav.service.conf b/app-antivirus/skyldav/files/skyldav.service.conf
new file mode 100644
index 000000000000..79c23a3ff05d
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.service.conf
@@ -0,0 +1,3 @@
+[Service]
+# skyldav message level (-m)
+#Environment="SKYLDAV_MESSAGE_LEVEL=1"
diff --git a/app-antivirus/skyldav/files/skyldav.tmpfilesd b/app-antivirus/skyldav/files/skyldav.tmpfilesd
new file mode 100644
index 000000000000..a4f7cdc47423
--- /dev/null
+++ b/app-antivirus/skyldav/files/skyldav.tmpfilesd
@@ -0,0 +1,2 @@
+# skyldav runtime directory for skyldav.pid and log (used by skyldavnotify)
+d /run/skyldav 0755 root root -