ports/63464: [New Port] security/samba-vscan 0.3.4

Jean Milanez Melo jmelo at freebsdbrasil.com.br
Fri Feb 27 18:30:24 UTC 2004


>Number:         63464
>Category:       ports
>Synopsis:       [New Port] security/samba-vscan 0.3.4
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 27 10:30:16 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jean Milanez Melo
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
FreeBSD Brasil
>Environment:
System: FreeBSD patinhas.teleon.com.br 4.7-STABLE FreeBSD 4.7-STABLE #6: Thu Apr 10 11:40:43 EST 2003 root at patinhas.teleon.com.br:/usr/src/sys/compile/PATINHAS i386


	
>Description:
	
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.

>How-To-Repeat:
	
>Fix:

	

--- samba-vscan.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	samba-vscan
#	samba-vscan/Makefile
#	samba-vscan/pkg-descr
#	samba-vscan/pkg-plist
#	samba-vscan/distinfo
#	samba-vscan/files
#	samba-vscan/files/patch-openantivirus::vscan-oav_core.h
#	samba-vscan/files/patch-Makefile.in
#	samba-vscan/pkg-message
#
echo c - samba-vscan
mkdir -p samba-vscan > /dev/null 2>&1
echo x - samba-vscan/Makefile
sed 's/^X//' >samba-vscan/Makefile << 'END-of-samba-vscan/Makefile'
X# New ports collection makefile for:	samba-vscan
X# Date created:		27 February 2004
X# Whom:			Jean Milanez Melo <jmelo at freebsdbrasil.com.br>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	samba-vscan
XPORTVERSION=	0.3.4
XPORTREVISION=	1
XCATEGORIES=	security
XMASTER_SITES=	http://heanet.dl.sourceforge.net/sourceforge/openantivirus/ \
X		http://easynews.dl.sourceforge.net/sourceforge/openantivirus/ \
X		http://flow.dl.sourceforge.net/sourceforge/openantivirus/
X
XMAINTAINER=	jmelo at freebsdbrasil.com.br
XCOMMENT=	On-access virus scanning with Samba
X
XBUILD_DEPENDS=	samba:${PORTSDIR}/net/samba:extract:configure
X
XUSE_BZIP2= yes
X
XHAS_CONFIGURE=	yes
XUSE_GMAKE=      yes
X
XCONFIGURE_ARGS=	--with-samba-source=${PORTSDIR}/net/samba/work/samba-2.2.8a/source
X
Xpre-install:
X	@${MKDIR} ${PREFIX}/samba-vscan
X	@${MKDIR} ${PREFIX}/etc/samba-vscan
X
Xpost-install:
X	@${CP}	${PORTSDIR}/security/samba-vscan/work/samba-vscan-0.3.4/clamav/vscan-clamav.conf ${PREFIX}/etc/samba-vscan
X	@${CP}  ${PORTSDIR}/security/samba-vscan/work/samba-vscan-0.3.4/fprot/vscan-fprotd.conf ${PREFIX}/etc/samba-vscan
X	@${CP}  ${PORTSDIR}/security/samba-vscan/work/samba-vscan-0.3.4/icap/vscan-icap.conf ${PREFIX}/etc/samba-vscan
X	@${CP}	${PORTSDIR}/security/samba-vscan/work/samba-vscan-0.3.4/kaspersky/vscan-kavp.conf ${PREFIX}/etc/samba-vscan
X	@${CP}	${PORTSDIR}/security/samba-vscan/work/samba-vscan-0.3.4/mks/vscan-mks32.conf ${PREFIX}/etc/samba-vscan
X	@${CP}  ${PORTSDIR}/security/samba-vscan/work/samba-vscan-0.3.4/openantivirus/vscan-oav.conf ${PREFIX}/etc/samba-vscan
X	@${CP}  ${PORTSDIR}/security/samba-vscan/work/samba-vscan-0.3.4/sophos/vscan-sophos.conf ${PREFIX}/etc/samba-vscan
X	@${CP}  ${PORTSDIR}/security/samba-vscan/work/samba-vscan-0.3.4/trend/vscan-trend.conf ${PREFIX}/etc/samba-vscan
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-samba-vscan/Makefile
echo x - samba-vscan/pkg-descr
sed 's/^X//' >samba-vscan/pkg-descr << 'END-of-samba-vscan/pkg-descr'
Xsamba-vscan is a proof-of-concept module for Samba, which uses the VFS
X(virtual file system) features of Samba 2.2.x/3.0 to provide an
Xon-access Samba anti-virus. Of course, Samba has to be compiled with
XVFS support. It currently works only with FRISK F-Prot Daemon,
XKaspersky AntiVirus, mks32, OpenAntiVirus ScannerDaemon, Sophos Sweep,
XSymantec AntiVirus Engine (via ICAP) or Trend Micro.
X
XWWW: http://www.openantivirus.org/projects.php
END-of-samba-vscan/pkg-descr
echo x - samba-vscan/pkg-plist
sed 's/^X//' >samba-vscan/pkg-plist << 'END-of-samba-vscan/pkg-plist'
Xsamba-vscan/vscan-clamav.so
Xsamba-vscan/vscan-fprotd.so
Xsamba-vscan/vscan-icap.so
Xsamba-vscan/vscan-kavp.so
Xsamba-vscan/vscan-mksd.so
Xsamba-vscan/vscan-oav.so
Xsamba-vscan/vscan-sophos.so
Xsamba-vscan/vscan-trend.so
X at dirrm samba-vscan
Xetc/samba-vscan/vscan-clamav.conf
Xetc/samba-vscan/vscan-fprotd.conf
Xetc/samba-vscan/vscan-icap.conf
Xetc/samba-vscan/vscan-kavp.conf
Xetc/samba-vscan/vscan-mks32.conf
Xetc/samba-vscan/vscan-oav.conf
Xetc/samba-vscan/vscan-sophos.conf
Xetc/samba-vscan/vscan-trend.conf
X at dirrm etc/samba-vscan
X
END-of-samba-vscan/pkg-plist
echo x - samba-vscan/distinfo
sed 's/^X//' >samba-vscan/distinfo << 'END-of-samba-vscan/distinfo'
XMD5 (samba-vscan-0.3.4.tar.bz2) = acbcb28cff080dcf2ee732b7f2c0f949
END-of-samba-vscan/distinfo
echo c - samba-vscan/files
mkdir -p samba-vscan/files > /dev/null 2>&1
echo x - samba-vscan/files/patch-openantivirus::vscan-oav_core.h
sed 's/^X//' >samba-vscan/files/patch-openantivirus::vscan-oav_core.h << 'END-of-samba-vscan/files/patch-openantivirus::vscan-oav_core.h'
X--- openantivirus/vscan-oav_core.h.orig	Thu Feb 26 10:28:04 2004
X+++ openantivirus/vscan-oav_core.h	Thu Feb 26 10:28:16 2004
X@@ -1,6 +1,7 @@
X #ifndef __VSCAN_OAV_CORE_H_
X #define __VSCAN_OAV_CORE_H_
X 
X+#include <sys/types.h>
X #include <sys/socket.h>
X #include <netinet/in.h>
X #include <arpa/inet.h>
END-of-samba-vscan/files/patch-openantivirus::vscan-oav_core.h
echo x - samba-vscan/files/patch-Makefile.in
sed 's/^X//' >samba-vscan/files/patch-Makefile.in << 'END-of-samba-vscan/files/patch-Makefile.in'
X--- Makefile.in.orig	Fri Feb 27 13:07:34 2004
X+++ Makefile.in	Fri Feb 27 13:07:11 2004
X@@ -42,7 +42,7 @@
X BINDIR		= @SAMBA_BINDIR@
X SBINDIR		= @SAMBA_SBINDIR@
X 
X-LIBDIR		= @SAMBA_LIBDIR@
X+LIBDIR		= /usr/local/samba-vscan
X VFSLIBDIR	= @SAMBA_VFSLIBDIR@
X PDBLIBDIR	= @SAMBA_PDBLIBDIR@
X RPCLIBDIR	= @SAMBA_RPCLIBDIR@
X@@ -184,8 +184,6 @@
X 	@echo "to $(DESTDIR)$(VFSLIBDIR) with $(INSTALLPERMS)"
X 	@$(INSTALLCMD) -m $(INSTALLPERMS) $(patsubst ${builddir}/%.$(SHLIBEXT),%.$(SHLIBEXT),$(wildcard ${builddir}/*.$(SHLIBEXT))) $(DESTDIR)$(VFSLIBDIR)
X 	@echo ""
X-	@echo "NOTE: the corresponding configuration file(s) must be copied manually!"
X-	@echo "The default location is /etc/samba. See INSTALL for details!"
X 
X # Misc targets
X clean:
END-of-samba-vscan/files/patch-Makefile.in
echo x - samba-vscan/pkg-message
sed 's/^X//' >samba-vscan/pkg-message << 'END-of-samba-vscan/pkg-message'
X*****************************************************************************
XYou have installed the samba-vscan package.
X
XThe vfs object's is in /usr/local/samba-vscan.
X
XThe configuration files is in /usr/local/etc/samba-vscan.
X
XEdit /usr/local/etc/smb.conf and add the following entry 
X(that's only an example):
X
X  [vscan]
X       comment = virus-protected /tmp directory
X       path = /tmp
X       vfs object = /usr/local/samba-vscan/vscan-oav.so
X       vfs options = config-file = /usr/local/etc/samba-vscan/vscan-oav.conf
X       writeable = yes
X       browseable = yes
X       guest ok = yes
X
XBasically you have to add a vfs object line to your shares
Xwhich should be virus-protected by this module. If you'd like to use the
Xrun-time configuration file, simply add the
Xvfs options = config-file = /path/config-file
X(different settings for several shares can be achieved by using a different
Xname of the configuration file for each share). If you want to protect _all_
Xshares your Samba server offers, simply add the vfs object line (and the
Xvfs options line, if you like) to the [global] section.
X
XThen restart samba.
X
XImportant: Remember, you need to install Clamav, Fprot, Icap, Kaspersky, Mks, Openantivirus, Sophos or Trend Antivirus to samba-vscan works correctly.
X
X*****************************************************************************
X
END-of-samba-vscan/pkg-message
exit
--- samba-vscan.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list