Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Apr 2004 19:39:00 -0700 (PDT)
From:      Timur Bakeyev <timur@gnu.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/65238: [NEW-PORT] A port of samba-vscan for samba-devel
Message-ID:  <200404060239.i362d03m023108@www.freebsd.org>
Resent-Message-ID: <200404060250.i362oJ1I048624@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         65238
>Category:       ports
>Synopsis:       [NEW-PORT] A port of samba-vscan for samba-devel
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 05 19:50:18 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Timur Bakeyev
>Release:        FreeBSD 5.2.1
>Organization:
RIPE NCC
>Environment:
FreeBSD timur.home.bat.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Fri Dec 26 00:21:54 CET 2003     root@timur.home.bat.ru:/usr/src/sys/i386/compile/COMMON  i386

>Description:
      This is a version of the security/samba-vscan port for the samba-devel, aka 3.x. There are differences in the way, how samba-vscan is installed for Samba 3.x, so, that's the reason for the separate port.


>How-To-Repeat:
      None
>Fix:
      Here is the port itself:

# 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-devel-vscan
#	samba-devel-vscan/files
#	samba-devel-vscan/files/patch-openantivirus::vscan-oav_core.h
#	samba-devel-vscan/Makefile
#	samba-devel-vscan/distinfo
#	samba-devel-vscan/pkg-descr
#	samba-devel-vscan/pkg-plist
#	samba-devel-vscan/pkg-message
#
echo c - samba-devel-vscan
mkdir -p samba-devel-vscan > /dev/null 2>&1
echo c - samba-devel-vscan/files
mkdir -p samba-devel-vscan/files > /dev/null 2>&1
echo x - samba-devel-vscan/files/patch-openantivirus::vscan-oav_core.h
sed 's/^X//' >samba-devel-vscan/files/patch-openantivirus::vscan-oav_core.h << 'END-of-samba-devel-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-devel-vscan/files/patch-openantivirus::vscan-oav_core.h
echo x - samba-devel-vscan/Makefile
sed 's/^X//' >samba-devel-vscan/Makefile << 'END-of-samba-devel-vscan/Makefile'
X# New ports collection makefile for:	samba-devel-vscan
X# Date created:		27 March 2004
X# Whom:			Timur I. Bakeyev <timur@gnu.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		samba-devel-vscan
XPORTVERSION=		0.3.4
XCATEGORIES=		security
XMASTER_SITES=		${MASTER_SITE_SOURCEFORGE_EXTENDED}
XMASTER_SITE_SUBDIR=	openantivirus
XDISTNAME=		${PORTNAME:S/-devel//}-${PORTVERSION}
X
XMAINTAINER=		timur@gnu.org
XCOMMENT=		On-access virus scanning with Samba 3.x
X
XCONFLICTS=		samba-vscan-*
X
XUSE_BZIP2=		yes
XGNU_CONFIGURE=		yes
XUSE_GMAKE=		yes
X
X.include <bsd.port.pre.mk>
X
XSAMBA_PORT?=		samba-devel
XSAMBA_PORTDIR=		${PORTSDIR}/net/${SAMBA_PORT}
XBUILD_DEPENDS+=		${NONEXISTENT}:${SAMBA_PORTDIR}:configure
X
XSAMBA_SOURCE!=		cd ${SAMBA_PORTDIR} && ${MAKE} -V WRKSRC
X
XCONFIGURE_ARGS+=	--with-samba-source=${SAMBA_SOURCE}
X
XCONFDIR=		${PREFIX}/etc/samba-vscan
XVFSDIR=			${PREFIX}/lib/samba/vfs
X
XPKGMESSAGE=		${WRKDIR}/pkg-message
X
XPKGMESSAGE_SUB=		PREFIX="${PREFIX}" \
X			VFSDIR="${VFSDIR}" \
X			CONFDIR="${CONFDIR}"
X
XPLIST_SUB+=		VFSDIR="${VFSDIR:$,^${PREFIX}/,,}"
X
Xpre-configure:
X	@cd ${SAMBA_SOURCE} && ${MAKE} proto
X
Xdo-install:
X	-@${MKDIR} ${CONFDIR}
X.for conf in clamav/vscan-clamav.conf fprot/vscan-fprotd.conf	\
X	     icap/vscan-icap.conf kaspersky/vscan-kavp.conf	\
X	     mks/vscan-mks32.conf openantivirus/vscan-oav.conf	\
X	     sophos/vscan-sophos.conf trend/vscan-trend.conf
X	@${INSTALL_DATA} ${WRKSRC}/${conf} ${CONFDIR}
X.endfor
X	-@${MKDIR} ${VFSDIR}
X.for module in vscan-clamav.so vscan-fprotd.so vscan-icap.so vscan-kavp.so \
X	       vscan-mksd.so vscan-oav.so vscan-sophos.so vscan-trend.so
X	@${INSTALL_SCRIPT} ${WRKSRC}/${module} ${VFSDIR}
X.endfor
X	@${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
X	    ${PKGDIR}/pkg-message > ${PKGMESSAGE}
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-samba-devel-vscan/Makefile
echo x - samba-devel-vscan/distinfo
sed 's/^X//' >samba-devel-vscan/distinfo << 'END-of-samba-devel-vscan/distinfo'
XMD5 (samba-vscan-0.3.4.tar.bz2) = acbcb28cff080dcf2ee732b7f2c0f949
XSIZE (samba-vscan-0.3.4.tar.bz2) = 131027
END-of-samba-devel-vscan/distinfo
echo x - samba-devel-vscan/pkg-descr
sed 's/^X//' >samba-devel-vscan/pkg-descr << 'END-of-samba-devel-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 VFS
Xsupport. It currently works only with FRISK F-Prot Daemon, Kaspersky
XAntiVirus, mks32, OpenAntiVirus ScannerDaemon, Sophos Sweep, Symantec
XAntiVirus Engine (via ICAP) or Trend Micro.
X
XWWW: http://www.openantivirus.org/projects.php
END-of-samba-devel-vscan/pkg-descr
echo x - samba-devel-vscan/pkg-plist
sed 's/^X//' >samba-devel-vscan/pkg-plist << 'END-of-samba-devel-vscan/pkg-plist'
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@dirrm etc/samba-vscan
X%%VFSDIR%%/vscan-clamav.so
X%%VFSDIR%%/vscan-fprotd.so
X%%VFSDIR%%/vscan-icap.so
X%%VFSDIR%%/vscan-kavp.so
X%%VFSDIR%%/vscan-mksd.so
X%%VFSDIR%%/vscan-oav.so
X%%VFSDIR%%/vscan-sophos.so
X%%VFSDIR%%/vscan-trend.so
X@unexec rmdir %D/%%VFSDIR%% 2>/dev/null || true
END-of-samba-devel-vscan/pkg-plist
echo x - samba-devel-vscan/pkg-message
sed 's/^X//' >samba-devel-vscan/pkg-message << 'END-of-samba-devel-vscan/pkg-message'
X*****************************************************************************
XYou have installed the samba-devel-vscan package.
X
XThe vfs objects are in the %%VFSDIR%%.
X
XThe configuration files are in %%CONFDIR%%.
X
XEdit %%PREFIX%%/etc/smb.conf and add the following entry(that's only an
Xexample):
X
X  [vscan]
X    comment = virus-protected /tmp directory
X    path = /tmp
X    vfs object = vscan-clamav
X    vscan-clamav: config-file = %%CONFDIR%%/vscan-clamav.conf
X    writeable = yes
X    browseable = yes
X    guest ok = yes
X
XBasically you have to add a vfs object line to your shares which should
Xbe virus-protected by this module. If you'd like to use the run-time
Xconfiguration file, simply add the
X
Xvscan-<backend>: config-file = /path/file
X
X(different settings for several shares can be achieved by using a
Xdifferent name of the configuration file for each share). If you want to
Xprotect _all_ shares your Samba server offers, simply add the vfs object
Xline (and the vfs options line, if you like) to the [global] section.
X
XThen restart samba with:
X
X%%PREFIX%%/etc/rc.d/samba.sh restart
X
XImportant: Remember, you need to install Clamav, Fprot, Icap, Kaspersky,
XMks, Openantivirus, Sophos or Trend Antivirus to samba-vscan works
Xcorrectly.
X*****************************************************************************
END-of-samba-devel-vscan/pkg-message
exit

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404060239.i362d03m023108>