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>
This commit is contained in:
parent
24fdb41eff
commit
658a6577f3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=102430
8 changed files with 130 additions and 0 deletions
|
@ -355,6 +355,7 @@
|
|||
SUBDIR += saferpay
|
||||
SUBDIR += safesh
|
||||
SUBDIR += saint
|
||||
SUBDIR += samba-vscan
|
||||
SUBDIR += samhain
|
||||
SUBDIR += scanssh
|
||||
SUBDIR += seahorse
|
||||
|
|
41
security/samba-vscan/Makefile
Normal file
41
security/samba-vscan/Makefile
Normal file
|
@ -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>
|
1
security/samba-vscan/distinfo
Normal file
1
security/samba-vscan/distinfo
Normal file
|
@ -0,0 +1 @@
|
|||
MD5 (samba-vscan-0.3.4.tar.bz2) = acbcb28cff080dcf2ee732b7f2c0f949
|
20
security/samba-vscan/files/patch-Makefile.in
Normal file
20
security/samba-vscan/files/patch-Makefile.in
Normal file
|
@ -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:
|
|
@ -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>
|
8
security/samba-vscan/pkg-descr
Normal file
8
security/samba-vscan/pkg-descr
Normal file
|
@ -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
|
31
security/samba-vscan/pkg-message
Normal file
31
security/samba-vscan/pkg-message
Normal file
|
@ -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.
|
18
security/samba-vscan/pkg-plist
Normal file
18
security/samba-vscan/pkg-plist
Normal file
|
@ -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
|
Loading…
Reference in a new issue