From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 30 14:50:22 2003 Return-Path: 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 2DD4B16A4B3 for ; Tue, 30 Sep 2003 14:50:22 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A927243FEC for ; Tue, 30 Sep 2003 14:50:21 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8ULoLFY059871 for ; Tue, 30 Sep 2003 14:50:21 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h8ULoLsS059870; Tue, 30 Sep 2003 14:50:21 -0700 (PDT) (envelope-from gnats) Date: Tue, 30 Sep 2003 14:50:21 -0700 (PDT) Message-Id: <200309302150.h8ULoLsS059870@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: martin@tradex.sk Subject: Re: ports/57379: [FIX] security/clamav 0.60 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: martin@tradex.sk List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2003 21:50:22 -0000 The following reply was made to PR ports/57379; it has been noted by GNATS. From: martin@tradex.sk To: freebsd-gnats-submit@FreeBSD.org Cc: martin@tradex.sk Subject: Re: ports/57379: [FIX] security/clamav 0.60 Date: Tue, 30 Sep 2003 23:40:06 +0200 I agree to you proposal, the first version, here is a updated patch. But the best way would be existing pidfile and socket flags to clamd (there are no such flags). --- Makefile.orig Tue Sep 30 00:45:14 2003 +++ Makefile Tue Sep 30 02:02:48 2003 @@ -7,7 +7,7 @@ PORTNAME= clamav PORTVERSION= 0.60 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= security MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= clamav @@ -40,8 +40,11 @@ MAN5= clamav.conf.5 MAN8= clamd.8 +CLAMD_SOCKET?= /var/run/clamav/clamd + SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \ - -e 's|%%DATADIR%%|${DATADIR}|g' + -e 's|%%DATADIR%%|${DATADIR}|g' \ + -e 's|%%CLAMD_SOCKET%%|${CLAMD_SOCKET}|g' SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \ -e 's|^\#?(LogFile) .*$$|\1 /var/log/clamav/clamd.log|' \ --- files/clamd.sh.orig Tue Sep 30 23:33:16 2003 +++ files/clamd.sh Tue Sep 30 23:33:05 2003 @@ -26,6 +26,16 @@ required_dirs=%%DATADIR%% required_files=%%PREFIX%%/etc/clamav.conf +start_precmd=start_precmd + +start_precmd() +{ + if [ -S "$clamd_socket" ]; then + warn "Stale socket $clamd_socket removed." + rm "$clamd_socket" + fi +} + stop_postcmd=stop_postcmd stop_postcmd() @@ -37,6 +47,7 @@ clamd_enable=${clamd_enable:-"NO"} clamd_flags=${clamd_flags:-""} +clamd_socket=${clamd_socket:-"%%CLAMD_SOCKET%%"} load_rc_config $name run_rc_command "$1"