freebsd-ports/security/clamav-devel/files/clamav-milter.in
Renato Botelho 1832cf4035 - Update to 20060406 snapshot -- fix multiple vulnerabilities
* CVE-2006-1614
      Damian Put discovered an integer overflow in the PE header parser.
      This is only exploitable if the ArchiveMaxFileSize option is disabled.
   * CVE-2006-1615
      Format string vulnerabilities in the logging code have been discovered,
      which might lead to the execution of arbitrary code.
   * CVE-2006-1630
      David Luyer discovered, that ClamAV can be tricked into an invalid
      memory access in the cli_bitset_set() function, which may lead to
      a denial of service.

- Synchronize with clamav port using SUB_FILES, USE_RC_SUBR

PR:		ports/95425
Submitted by:	garga
Security:	VuXML 6a5174bd-c580-11da-9110-00123ffe8333
2006-04-07 10:10:20 +00:00

46 lines
958 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: clamav-milter
# REQUIRE: LOGIN clamd
# BEFORE: mail
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable clamav-milter:
#
#clamav_milter_enable="YES"
#
# See clamav-milter(1) for flags
#
. %%RC_SUBR%%
name=clamav_milter
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/clamav-milter
pidfile=%%RUNDIR%%/clamav-milter.pid
required_dirs=%%DBDIR%%
required_files=%%PREFIX%%/etc/clamd.conf
start_precmd=start_precmd
start_precmd()
{
if [ -S "$clamav_milter_socket" ]; then
warn "Stale socket $clamav_milter_socket removed."
rm "$clamav_milter_socket"
fi
rc_flags="--pidfile ${pidfile} ${flags:-$clamav_milter_flags} $clamav_milter_socket"
}
# read settings, set default values
load_rc_config $name
: ${clamav_milter_enable="NO"}
: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
: ${clamav_milter_flags="--postmaster-only --local --outgoing --timeout=0 --max-children=50"}
run_rc_command "$1"