From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Mar 12 11:40:05 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03BCD106566B for ; Thu, 12 Mar 2009 11:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B88148FC1C for ; Thu, 12 Mar 2009 11:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n2CBe48P008195 for ; Thu, 12 Mar 2009 11:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n2CBe4E4008194; Thu, 12 Mar 2009 11:40:04 GMT (envelope-from gnats) Resent-Date: Thu, 12 Mar 2009 11:40:04 GMT Resent-Message-Id: <200903121140.n2CBe4E4008194@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, Helmut Schneider Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9208A1065675 for ; Thu, 12 Mar 2009 11:34:29 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6E48FC2B for ; Thu, 12 Mar 2009 11:34:29 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2CBYTBF011009 for ; Thu, 12 Mar 2009 11:34:29 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n2CBYTJj011008; Thu, 12 Mar 2009 11:34:29 GMT (envelope-from nobody) Message-Id: <200903121134.n2CBYTJj011008@www.freebsd.org> Date: Thu, 12 Mar 2009 11:34:29 GMT From: Helmut Schneider To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/132575: mail/amavisd pidfile not respected X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2009 11:40:05 -0000 >Number: 132575 >Category: ports >Synopsis: mail/amavisd pidfile not respected >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 12 11:40:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Helmut Schneider >Release: 7.1-RELEASE >Organization: >Environment: >Description: As amavisd is most often chrooted to /var/amavis the process should not have write permissions to that directory for security reasons. A good place for the pid file would be e.g. /var/amavis/var/run If a user sets a custom path for the pid file the rc script does not respect that as /var/amavis/amavisd.pid is "hardcoded". >How-To-Repeat: >Fix: --- /usr/local/etc/rc.d/amavisd.bak 2009-03-12 12:21:42.000000000 +0100 +++ /usr/local/etc/rc.d/amavisd 2009-03-12 12:24:59.000000000 +0100 @@ -12,6 +12,8 @@ # Add the following lines to /etc/rc.conf to enable amavisd: # #amavisd_enable="YES" +#amavisd_pidfile="$PATH_TO_PIDFILE" # . /etc/rc.subr @@ -20,7 +22,6 @@ rcvar=`set_rcvar` command=/usr/local/sbin/amavisd > /dev/null 2>&1 -pidfile=/var/amavis/amavisd.pid required_files=/usr/local/etc/amavisd.conf extra_commands="reload" @@ -59,6 +60,7 @@ # set defaults amavisd_enable=${amavisd_enable:-"NO"} +amavisd_pidfile=${amavisd_pidfile:-"/var/amavis/amavisd.pid"} load_rc_config $name run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: