From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 2 22:30:06 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA2F316A423 for ; Thu, 2 Feb 2006 22:30:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 194E543D5A for ; Thu, 2 Feb 2006 22:30:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k12MU4bq013230 for ; Thu, 2 Feb 2006 22:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k12MU4TB013224; Thu, 2 Feb 2006 22:30:04 GMT (envelope-from gnats) Resent-Date: Thu, 2 Feb 2006 22:30:04 GMT Resent-Message-Id: <200602022230.k12MU4TB013224@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jean Milanez Melo Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AACE16A420 for ; Thu, 2 Feb 2006 22:25:15 +0000 (GMT) (envelope-from jmelo@capeta.freebsdbrasil.com.br) Received: from capeta.freebsdbrasil.com.br (vrrp.freebsdbrasil.com.br [200.210.70.30]) by mx1.FreeBSD.org (Postfix) with SMTP id DA46B43D46 for ; Thu, 2 Feb 2006 22:25:13 +0000 (GMT) (envelope-from jmelo@capeta.freebsdbrasil.com.br) Received: (qmail 53960 invoked by uid 1003); 2 Feb 2006 20:25:11 -0200 Message-Id: <20060202222511.53959.qmail@capeta.freebsdbrasil.com.br> Date: 2 Feb 2006 20:25:11 -0200 From: Jean Milanez Melo To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/92749: [maintainer-update] security/samba-vscan OPTIONS feature X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jean Milanez Melo List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2006 22:30:06 -0000 >Number: 92749 >Category: ports >Synopsis: [maintainer-update] security/samba-vscan OPTIONS feature >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Feb 02 22:30:03 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Jean Milanez Melo >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: System: FreeBSD capeta.freebsdbrasil.com.br 5.3-STABLE FreeBSD 5.3-STABLE #5: Wed Mar 2 15:03:19 BRT 2005 eksffa@capeta.freebsdbrasil.com.br:/usr/obj/usr/src/sys/CAPETA i386 >Description: - Now port uses OPTIONS feature. The user must to choose what modules he wants to compile/install. - I changed all port structure. >How-To-Repeat: >Fix: --- samba-vscan.diff begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/samba-vscan/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 31 Jan 2006 09:57:08 -0000 1.7 +++ Makefile 2 Feb 2006 22:14:10 -0000 @@ -15,19 +15,35 @@ COMMENT= On-access virus scanning with Samba BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/net/${VSCAN_SAMBA_PORT}:configure + +OPTIONS= VSCAN_ANTIVIR "for use with AntiVir" off \ + VSCAN_CLAMAV "for use with Clam AntiVirus Daemon" off \ + VSCAN_FPROTD "for use with F-Prot Daemon" off \ + VSCAN_FSAV "for use with F-Secure AntiVirus" off \ + VSCAN_ICAP "for use with an ICAP anti-virus" off \ + VSCAN_KAVP "for use with Kaspersky AntiVirus" off \ + VSCAN_MKSD "for use with mks32" off \ + VSCAN_NAI "for use with NAI/McAfee uvscan" off \ + VSCAN_OAV "for use with OpenAntiVirus.org ScannerDaemon" off \ + VSCAN_SOPHOS "for use with Sophos" off \ + VSCAN_TREND "for use with Trend Micro FileScanner" off .if !defined(NOPORTDOCS) PORTDOCS= AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README .endif USE_AUTOTOOLS= autoconf:259 USE_BZIP2= yes -SAMBA_WRKSRC= `cd ${PORTSDIR}/net/${VSCAN_SAMBA_PORT}; make -V WRKSRC` +VSCAN_SAMBA_PORT?= samba3 +SAMBA_WRKSRC!= ${MAKE} -C ${.CURDIR}/../../net/${VSCAN_SAMBA_PORT} -V WRKSRC HAS_CONFIGURE= yes USE_GMAKE= yes CONFIGURE_ARGS= --with-samba-source=${SAMBA_WRKSRC} -ETCDIR= ${PREFIX}/etc/samba-vscan -PKGMESSAGE= ${WRKDIR}/pkg-message -VSCAN_SAMBA_PORT?=samba3 +ETCDIR= etc/samba-vscan +SUB_FILES= pkg-message +VFSDIR?= lib/samba/vfs +VSCAN_NAME= +VSCAN_CONF= +ALL_TARGET= .include @@ -35,17 +51,94 @@ EXTRA_PATCHES=${FILESDIR}/extra_patch-* .endif -.if ${VSCAN_SAMBA_PORT} == "samba3" -PLIST_SUB= VFSDIR=lib/samba/vfs -.else -PLIST_SUB= VFSDIR=lib/samba +.if ${VSCAN_SAMBA_PORT} != "samba3" +VFSDIR=lib/samba +.endif + +.if defined(WITH_VSCAN_ANTIVIR) +ALL_TARGET+=antivir +VSCAN_NAME+=vscan-antivir.so +VSCAN_CONF+=antivir/vscan-antivir.conf +.endif + +.if defined(WITH_VSCAN_CLAMAV) +ALL_TARGET+=clamav +VSCAN_NAME+=vscan-clamav.so +VSCAN_CONF+=clamav/vscan-clamav.conf +.endif + +.if defined(WITH_VSCAN_FPROTD) +ALL_TARGET+=fprotd +VSCAN_NAME+=vscan-fprotd.so +VSCAN_CONF+=fprot/vscan-fprotd.conf +.endif + +.if defined(WITH_VSCAN_FSAV) +ALL_TARGET+=fsav +VSCAN_NAME+=vscan-fsav.so +VSCAN_CONF+=f-secure/vscan-fsav.conf +.endif + +.if defined(WITH_VSCAN_ICAP) +ALL_TARGET+=icap +VSCAN_NAME+=vscan-icap.so +VSCAN_CONF+=icap/vscan-icap.conf +.endif + +.if defined(WITH_VSCAN_KAVP) +ALL_TARGET+=kavp +VSCAN_NAME+=vscan-kavp.so +VSCAN_CONF+=kaspersky/vscan-kavp.conf .endif +.if defined(WITH_VSCAN_MKSD) +ALL_TARGET+=mksd +VSCAN_NAME+=vscan-mksd.so +VSCAN_CONF+=mks/vscan-mks32.conf +.endif + +.if defined(WITH_VSCAN_NAI) +ALL_TARGET+=nai +VSCAN_NAME+=vscan-mcdaemon.so +VSCAN_CONF+=nai/vscan-mcdaemon.conf +.endif + +.if defined(WITH_VSCAN_OAV) +ALL_TARGET+=oav +VSCAN_NAME+=vscan-oav.so +VSCAN_CONF+=openantivirus/vscan-oav.conf +.endif + +.if defined(WITH_VSCAN_SOPHOS) +ALL_TARGET+=sophos +VSCAN_NAME+=vscan-sophos.so +VSCAN_CONF+=sophos/vscan-sophos.conf +.endif + +.if defined(WITH_VSCAN_TREND) +ALL_TARGET+=trend +VSCAN_NAME+=vscan-trend.so +VSCAN_CONF+=trend/vscan-trend.conf +.endif + +PLIST_FILES+= ${VSCAN_NAME:S|^|${VFSDIR}/|} \ + ${VSCAN_CONF:S|^|${ETCDIR}/|:C|(.*/).*/(.*.conf)|\1\2|} +PLIST_DIRS= ${ETCDIR} ${VFSDIR} + pre-configure: .if ${VSCAN_SAMBA_PORT} == "samba3" @cd ${SAMBA_WRKSRC}; make proto 2>&1 > /dev/null .endif +do-install: +.for i in ${VSCAN_NAME} + ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/${VFSDIR} +.endfor + @${MKDIR} ${PREFIX}/${ETCDIR} +.for i in ${VSCAN_CONF} + ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/${ETCDIR} +.endfor + post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @@ -53,16 +146,6 @@ @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} .endfor .endif - @${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 Index: pkg-message =================================================================== RCS file: pkg-message diff -N pkg-message --- pkg-message 28 Aug 2004 05:08:45 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,43 +0,0 @@ -***************************************************************************** -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 if you are using -samba 2.X (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 - -If you are using samba 3.X: - -Edit /etc/smb.conf and add the following entry (that's only an example): - [vscan] - comment = virus-protected /tmp directory - path = /tmp - vfs object = vscan-oav - vscan-oav: 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. Index: pkg-plist =================================================================== RCS file: pkg-plist diff -N pkg-plist --- pkg-plist 22 Jan 2006 02:50:53 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,22 +0,0 @@ -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 -%%VFSDIR%%/vscan-clamav.so -%%VFSDIR%%/vscan-fprotd.so -%%VFSDIR%%/vscan-fsav.so -%%VFSDIR%%/vscan-icap.so -%%VFSDIR%%/vscan-kavp.so -%%VFSDIR%%/vscan-mcdaemon.so -%%VFSDIR%%/vscan-mksd.so -%%VFSDIR%%/vscan-oav.so -%%VFSDIR%%/vscan-sophos.so -%%VFSDIR%%/vscan-trend.so -%%VFSDIR%%/vscan-antivir.so -@dirrmtry %%VFSDIR%% -@dirrmtry lib/samba -@dirrm etc/samba-vscan Index: files/pkg-message.in =================================================================== RCS file: files/pkg-message.in diff -N files/pkg-message.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/pkg-message.in 2 Feb 2006 22:14:10 -0000 @@ -0,0 +1,43 @@ +***************************************************************************** +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 if you are using +samba 2.X (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 + +If you are using samba 3.X: + +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 = vscan-oav + vscan-oav: 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. --- samba-vscan.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: