diff options
author | vanilla <vanilla@FreeBSD.org> | 2004-02-29 01:48:28 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2004-02-29 01:48:28 +0800 |
commit | 011fe9573682ee2b3b00f6254bdc43af44a055e8 (patch) | |
tree | 8334c5dd5dc6e7d4095511e2eedb77677a0d70fa /security | |
parent | 512d7294f9a422922fd7b569f6348cb33d766db5 (diff) | |
download | freebsd-ports-gnome-011fe9573682ee2b3b00f6254bdc43af44a055e8.tar.gz freebsd-ports-gnome-011fe9573682ee2b3b00f6254bdc43af44a055e8.tar.zst freebsd-ports-gnome-011fe9573682ee2b3b00f6254bdc43af44a055e8.zip |
Add samba-vscan 0.3.4, on-access virus scanning with Samba.
While I am here,
- make portlint happy,
- use WRKSRC instead hardcode path.
- use SAMBASRC instead wrong path if WRKDIRPREFIX env set.
- remove PORTREVISION on new ports.
PR: ports/63464
Submitted by: Jean Milanez Melo <jmelo@freebsdbrasil.com.br>
Diffstat (limited to 'security')
-rw-r--r-- | security/Makefile | 1 | ||||
-rw-r--r-- | security/samba-vscan/Makefile | 41 | ||||
-rw-r--r-- | security/samba-vscan/distinfo | 1 | ||||
-rw-r--r-- | security/samba-vscan/files/patch-Makefile.in | 20 | ||||
-rw-r--r-- | security/samba-vscan/files/patch-openantivirus::vscan-oav_core.h | 10 | ||||
-rw-r--r-- | security/samba-vscan/pkg-descr | 8 | ||||
-rw-r--r-- | security/samba-vscan/pkg-message | 31 | ||||
-rw-r--r-- | security/samba-vscan/pkg-plist | 18 |
8 files changed, 130 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile index 82bd11d65c11..d7222950e812 100644 --- a/security/Makefile +++ b/security/Makefile @@ -355,6 +355,7 @@ SUBDIR += saferpay SUBDIR += safesh SUBDIR += saint + SUBDIR += samba-vscan SUBDIR += samhain SUBDIR += scanssh SUBDIR += seahorse diff --git a/security/samba-vscan/Makefile b/security/samba-vscan/Makefile new file mode 100644 index 000000000000..31ad756f204b --- /dev/null +++ b/security/samba-vscan/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: samba-vscan +# Date created: 27 February 2004 +# Whom: Jean Milanez Melo <jmelo@freebsdbrasil.com.br> +# +# $FreeBSD$ +# + +PORTNAME= samba-vscan +PORTVERSION= 0.3.4 +CATEGORIES= security +MASTER_SITES= http://heanet.dl.sourceforge.net/sourceforge/openantivirus/ \ + http://easynews.dl.sourceforge.net/sourceforge/openantivirus/ \ + http://flow.dl.sourceforge.net/sourceforge/openantivirus/ + +MAINTAINER= jmelo@freebsdbrasil.com.br +COMMENT= On-access virus scanning with Samba + +BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/net/samba:configure + +USE_BZIP2= yes +SAMBA_WRKSRC= `cd ${PORTSDIR}/net/samba; make -V WRKSRC` +HAS_CONFIGURE= yes +USE_GMAKE= yes +CONFIGURE_ARGS= --with-samba-source=${SAMBA_WRKSRC} +ETCDIR= ${PREFIX}/etc/samba-vscan +PKGMESSAGE= ${WRKDIR}/pkg-message + +post-install: + @${MKDIR} ${PREFIX}/etc/samba-vscan + @${INSTALL_DATA} ${WRKSRC}/clamav/vscan-clamav.conf ${ETCDIR} + @${INSTALL_DATA} ${WRKSRC}/fprot/vscan-fprotd.conf ${ETCDIR} + @${INSTALL_DATA} ${WRKSRC}/icap/vscan-icap.conf ${ETCDIR} + @${INSTALL_DATA} ${WRKSRC}/kaspersky/vscan-kavp.conf ${ETCDIR} + @${INSTALL_DATA} ${WRKSRC}/mks/vscan-mks32.conf ${ETCDIR} + @${INSTALL_DATA} ${WRKSRC}/openantivirus/vscan-oav.conf ${ETCDIR} + @${INSTALL_DATA} ${WRKSRC}/sophos/vscan-sophos.conf ${ETCDIR} + @${INSTALL_DATA} ${WRKSRC}/trend/vscan-trend.conf ${ETCDIR} + @${SED} "s|%%PREFIX%%|${PREFIX}|g;" ${.CURDIR}/pkg-message > ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/security/samba-vscan/distinfo b/security/samba-vscan/distinfo new file mode 100644 index 000000000000..243553ed4bfd --- /dev/null +++ b/security/samba-vscan/distinfo @@ -0,0 +1 @@ +MD5 (samba-vscan-0.3.4.tar.bz2) = acbcb28cff080dcf2ee732b7f2c0f949 diff --git a/security/samba-vscan/files/patch-Makefile.in b/security/samba-vscan/files/patch-Makefile.in new file mode 100644 index 000000000000..5538f3ff9911 --- /dev/null +++ b/security/samba-vscan/files/patch-Makefile.in @@ -0,0 +1,20 @@ +--- Makefile.in.orig Fri Feb 27 13:07:34 2004 ++++ Makefile.in Fri Feb 27 13:07:11 2004 +@@ -42,7 +42,7 @@ + BINDIR = @SAMBA_BINDIR@ + SBINDIR = @SAMBA_SBINDIR@ + +-LIBDIR = @SAMBA_LIBDIR@ ++LIBDIR = $(prefix)/lib/samba + VFSLIBDIR = @SAMBA_VFSLIBDIR@ + PDBLIBDIR = @SAMBA_PDBLIBDIR@ + RPCLIBDIR = @SAMBA_RPCLIBDIR@ +@@ -184,8 +184,6 @@ + @echo "to $(DESTDIR)$(VFSLIBDIR) with $(INSTALLPERMS)" + @$(INSTALLCMD) -m $(INSTALLPERMS) $(patsubst ${builddir}/%.$(SHLIBEXT),%.$(SHLIBEXT),$(wildcard ${builddir}/*.$(SHLIBEXT))) $(DESTDIR)$(VFSLIBDIR) + @echo "" +- @echo "NOTE: the corresponding configuration file(s) must be copied manually!" +- @echo "The default location is /etc/samba. See INSTALL for details!" + + # Misc targets + clean: diff --git a/security/samba-vscan/files/patch-openantivirus::vscan-oav_core.h b/security/samba-vscan/files/patch-openantivirus::vscan-oav_core.h new file mode 100644 index 000000000000..a560448dc018 --- /dev/null +++ b/security/samba-vscan/files/patch-openantivirus::vscan-oav_core.h @@ -0,0 +1,10 @@ +--- openantivirus/vscan-oav_core.h.orig Thu Feb 26 10:28:04 2004 ++++ openantivirus/vscan-oav_core.h Thu Feb 26 10:28:16 2004 +@@ -1,6 +1,7 @@ + #ifndef __VSCAN_OAV_CORE_H_ + #define __VSCAN_OAV_CORE_H_ + ++#include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> diff --git a/security/samba-vscan/pkg-descr b/security/samba-vscan/pkg-descr new file mode 100644 index 000000000000..99527f74c4be --- /dev/null +++ b/security/samba-vscan/pkg-descr @@ -0,0 +1,8 @@ +samba-vscan is a proof-of-concept module for Samba, which uses the VFS +(virtual file system) features of Samba 2.2.x/3.0 to provide an +on-access Samba anti-virus. Of course, Samba has to be compiled with +VFS support. It currently works only with FRISK F-Prot Daemon, +Kaspersky AntiVirus, mks32, OpenAntiVirus ScannerDaemon, Sophos Sweep, +Symantec AntiVirus Engine (via ICAP) or Trend Micro. + +WWW: http://www.openantivirus.org/projects.php diff --git a/security/samba-vscan/pkg-message b/security/samba-vscan/pkg-message new file mode 100644 index 000000000000..332006ccfaed --- /dev/null +++ b/security/samba-vscan/pkg-message @@ -0,0 +1,31 @@ +***************************************************************************** +You have installed the samba-vscan package. + +The vfs object's is in %%PREFIX%%/lib/samba. + +The configuration files is in %%PREFIX%%/etc/samba-vscan. + +Edit %%PREFIX%%/etc/smb.conf and add the following entry +(that's only an example): + + [vscan] + comment = virus-protected /tmp directory + path = /tmp + vfs object = %%PREFIX%%/lib/samba/vscan-oav.so + vfs options = config-file = %%PREFIX%%/etc/samba-vscan/vscan-oav.conf + writeable = yes + browseable = yes + guest ok = yes + +Basically you have to add a vfs object line to your shares +which should be virus-protected by this module. If you'd like to use the +run-time configuration file, simply add the +vfs options = config-file = /path/config-file +(different settings for several shares can be achieved by using a different +name of the configuration file for each share). If you want to protect _all_ +shares your Samba server offers, simply add the vfs object line (and the +vfs options line, if you like) to the [global] section. + +Then restart samba. + +Important: Remember, you need to install Clamav, Fprot, Icap, Kaspersky, Mks, Openantivirus, Sophos or Trend Antivirus to samba-vscan works correctly. diff --git a/security/samba-vscan/pkg-plist b/security/samba-vscan/pkg-plist new file mode 100644 index 000000000000..f91ae3b4ecfe --- /dev/null +++ b/security/samba-vscan/pkg-plist @@ -0,0 +1,18 @@ +etc/samba-vscan/vscan-clamav.conf +etc/samba-vscan/vscan-fprotd.conf +etc/samba-vscan/vscan-icap.conf +etc/samba-vscan/vscan-kavp.conf +etc/samba-vscan/vscan-mks32.conf +etc/samba-vscan/vscan-oav.conf +etc/samba-vscan/vscan-sophos.conf +etc/samba-vscan/vscan-trend.conf +lib/samba/vscan-clamav.so +lib/samba/vscan-fprotd.so +lib/samba/vscan-icap.so +lib/samba/vscan-kavp.so +lib/samba/vscan-mksd.so +lib/samba/vscan-oav.so +lib/samba/vscan-sophos.so +lib/samba/vscan-trend.so +@unexec rmdir %D/lib/samba 2>/dev/null || true +@dirrm etc/samba-vscan |