ports/154202: New port: security/scannedonly - A Samba VFS virus scanning daemon

Alexander Pereira Girald girald at etcom.ufrgs.br
Fri Jan 21 16:50:11 UTC 2011


>Number:         154202
>Category:       ports
>Synopsis:       New port: security/scannedonly - A Samba VFS virus scanning daemon
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 21 16:50:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Pereira Girald
>Release:        8.1
>Organization:
Instituto Federal de Educação, ciência e tecnologia do Estado do Rio Grande do Sul
>Environment:
>Description:
Scannedonly is a samba VFS module  and a scanning daemon  that ensure that only
files that have been  scanned for viruses are visible and accessible to the end
user.

Scannedonly was developed because of scalability problems with samba-vscan: high
server loads when (the same) files were requested often, and timeouts when large
zip files were requested. Scannedonly  doesn't have these  problems, but it does
introduce some other issues (It's socket buffer hungry!).

Scannedonly is available  under the open  source  GPL  licence. The source  code
repository is available on Sourceforge. You can contact the author by email oli4
(at) users . sourceforge . net.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# 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:
#
#	scannedonly
#	scannedonly/Makefile
#	scannedonly/pkg-descr
#	scannedonly/distinfo
#	scannedonly/files
#	scannedonly/files/scannedonly.in
#	scannedonly/pkg-message
#
echo c - scannedonly
mkdir -p scannedonly > /dev/null 2>&1
echo x - scannedonly/Makefile
sed 's/^X//' >scannedonly/Makefile << '8f2371808abd42d0f58f2a9db84224b6'
X# New ports collection makefile for:   scannedonly
X# Date created:        20 January 2011
X# Whom:                girald
X#
X# $FreeBSD$
X#
X
XPORTNAME=	scannedonly
XPORTVERSION=	0.21
XCATEGORIES=	security
XMASTER_SITES=	http://olivier.sessink.nl/scannedonly/
X
XMAINTAINER=	girald at FreeBSD.org
XCOMMENT=	A Samba VFS virus scanning daemon
X
XRUN_DEPENDS=	${LOCALBASE}/bin/clamdscan:${PORTSDIR}/security/clamav
XBUILD_DEPENDS+=	${NONEXISTENT}:${PORTSDIR}/${SAMBA_PORT}:configure
X
XSAMBA_PORT=	net/samba34
X
XCFLAGS+=	-I ${PREFIX}/include
X
XCONFIGURE_ARGS+=	LDFLAGS=-L${PREFIX}/lib --with-samba-source=${PORTSDIR}/${SAMBA_PORT}/work/samba-3.4.9/source3 --with-samba-vfs-dir=${PREFIX}/lib/samba34/vfs
XUSE_GMAKE=	yes
XGNU_CONFIGURE=	yes
XUSE_RC_SUBR=	scannedonly
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|/var/lib/scannedonly/scan|/var/run/scannedonlyd.sock|g' ${WRKSRC}/man/scannedonly_prescan.8
X	@${REINPLACE_CMD} -e 's|/var/lib/scannedonly/scan|/var/run/scannedonlyd.sock|g' ${WRKSRC}/py/scannedonlyd.py
X	@${REINPLACE_CMD} -e 's|/var/lib/scannedonly/scan|/var/run/scannedonlyd.sock|g' ${WRKSRC}/src/vfs_scannedonly.c
X	@${REINPLACE_CMD} -e 's|/var/lib/scannedonly/scan|/var/run/scannedonlyd.sock|g' ${WRKSRC}/src/scannedonly_prescan.c
X	@${REINPLACE_CMD} -e 's|/var/lib/scannedonly/scan|/var/run/scannedonlyd.sock|g' ${WRKSRC}/src/scannedonlyd_clamav.c
X
Xpost-install:
X	@${ECHO_MSG} "**************************************************"
X	@${ECHO_MSG} "*                   WARNING!                     *"
X	@${ECHO_MSG} "*                                                *"
X	@${ECHO_MSG} "* Make sure you've enough socker buffer size.    *"
X	@${ECHO_MSG} "* Consider increasing kern.ipc.maxsockbuf adding *"
X	@${ECHO_MSG} "* at least the following sysctl setting to       *"
X	@${ECHO_MSG} "* /etc/sysctl.conf:                              *"
X	@${ECHO_MSG} "*                                                *"
X	@${ECHO_MSG} "* kern.ipc.maxsockbuf=589824                     *"
X	@${ECHO_MSG} "*                                                *"
X	@${ECHO_MSG} "**************************************************"
X
XPLIST_FILES=	sbin/scannedonlyd_clamav \
X		bin/scannedonly_prescan \
X		lib/samba34/vfs/scannedonly.so
X
X.include <bsd.port.mk>
8f2371808abd42d0f58f2a9db84224b6
echo x - scannedonly/pkg-descr
sed 's/^X//' >scannedonly/pkg-descr << 'caba4c9a8bbab02d5322953bc57281cc'
XScannedonly is a samba VFS module  and a scanning daemon  that ensure that only
Xfiles that have been  scanned for viruses are visible and accessible to the end
Xuser.
X
XScannedonly was developed because of scalability problems with samba-vscan: high
Xserver loads when (the same) files were requested often, and timeouts when large
Xzip files were requested. Scannedonly  doesn't have these  problems, but it does
Xintroduce some other issues. Choose the product that suits you best.
X
XScannedonly is available  under the open  source  GPL  licence. The source  code
Xrepository is available on Sourceforge. You can contact the author by email oli4
X(at) users . sourceforge . net.
X
XWWW: http://olivier.sessink.nl/scannedonly/
caba4c9a8bbab02d5322953bc57281cc
echo x - scannedonly/distinfo
sed 's/^X//' >scannedonly/distinfo << 'ee0296e4cfb8d1a13510e8c96b05633a'
XSHA256 (scannedonly-0.21.tar.gz) = 20601c0466034cc250ded1a16d737451cfbe05fbcaf4f667ff25fe004bd1340e
XSIZE (scannedonly-0.21.tar.gz) = 80148
ee0296e4cfb8d1a13510e8c96b05633a
echo c - scannedonly/files
mkdir -p scannedonly/files > /dev/null 2>&1
echo x - scannedonly/files/scannedonly.in
sed 's/^X//' >scannedonly/files/scannedonly.in << '533965c71e7f3692e042d0e5dddac06f'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
X# PROVIDE: scannedonly
X# REQUIRE: LOGIN clamd
X# BEFORE: mail
X# KEYWORD: shutdown
X
X#
X# Add the following lines to /etc/rc.conf to enable the scannedonly daemon:
X#
X# scannedonly_clamav_enable="YES"
X# scannedonly_clamav_flags="<set as needed>"
X#
X# See scannedonlyd_clamav(1) for flags
X#
X
X. /etc/rc.subr
X
Xname=scannedonly_clamav
Xrcvar=`set_rcvar`
X
Xcommand=%%PREFIX%%/sbin/scannedonlyd_clamav
Xpidfile=/var/run/scannedonlyd_clamav.pid
Xcommand_args="--pidfile ${pidfile}"
X
X# read settings, set default values
Xload_rc_config "$name"
X: ${scannedonly_clamav_enable="NO"}
X
Xrun_rc_command "$1"
533965c71e7f3692e042d0e5dddac06f
echo x - scannedonly/pkg-message
sed 's/^X//' >scannedonly/pkg-message << '26ab9521d3c58798349dfccdd182123e'
X**************************************************
X*                   WARNING!                     *
X*                                                *
X* Make sure you've enough socker buffer size.    *
X* Consider increasing kern.ipc.maxsockbuf adding *
X* at least the following sysctl setting to       *
X* /etc/sysctl.conf:                              *
X*                                                *
X* kern.ipc.maxsockbuf=589824                     *
X*                                                *
X**************************************************
26ab9521d3c58798349dfccdd182123e
exit



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



More information about the freebsd-ports-bugs mailing list