From nobody@FreeBSD.org  Tue Mar 22 12:28:29 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BA801106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Mar 2011 12:28:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A96038FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Mar 2011 12:28:29 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2MCSTIP038394
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Mar 2011 12:28:29 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2MCSTI0038393;
	Tue, 22 Mar 2011 12:28:29 GMT
	(envelope-from nobody)
Message-Id: <201103221228.p2MCSTI0038393@red.freebsd.org>
Date: Tue, 22 Mar 2011 12:28:29 GMT
From: Frank Wall <fw@moov.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] mail/policyd2: fix RC script
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: chifeng@gmail.com

>Number:         155779
>Category:       ports
>Synopsis:       [PATCH] mail/policyd2: fix RC script
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sahil
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 22 12:30:01 UTC 2011
>Closed-Date:    Wed May 11 01:19:17 UTC 2011
>Last-Modified:  Wed May 11 01:20:09 UTC 2011
>Originator:     Frank Wall
>Release:        7.3-RELEASE-p2
>Organization:
>Environment:
FreeBSD 7.3-RELEASE-p2 FreeBSD 7.3-RELEASE-p2 #0: Mon Jul 12 19:23:19 UTC 2010     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
The RC script for mail/policyd2 is broken, because it interferes with other perl daemons. The problem is that procname="/usr/bin/perl" is specified. This will match most other perl daemons as well. 

So instead of stopping/restarting mail/policyd2, ALL your other perl daemons are going to be killed. Not exactly what I want if I try to stop mail/policyd2. IMHO this is a serious issue.

The attached patch fixes this problem by replacing "procname" with "command_interpreter".
>How-To-Repeat:
1. choose any perl daemon, for example net-mgmt/snmptt, and install it

2. start this perl daemon:
# /usr/local/etc/rc.d/snmptt onestart
Starting snmptt.
# /usr/local/etc/rc.d/snmptt onestatus
snmptt is running as pid 54922.

3. now check policyd2 daemon status
# /usr/local/etc/rc.d/policyd2 onestatus
policyd2 is running as pid 54921 54922.

4. You will recognize that the PID 54922 for policyd2 actually is the PID for your other pearl daemon, snmptt. This is wrong.
>Fix:
apply the patch

Patch attached with submission follows:

--- mail/policyd2/files/policyd2.sh.in.orig	2011-03-22 13:02:27.000000000 +0100
+++ mail/policyd2/files/policyd2.sh.in	2011-03-22 13:13:14.000000000 +0100
@@ -19,7 +19,7 @@
 rcvar=`set_rcvar`
 
 command="%%LOCALBASE%%/bin/cbpolicyd"
-procname="/usr/bin/perl"
+command_interpreter="/usr/bin/perl"
 
 load_rc_config $name
 



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Mar 22 12:30:17 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155779 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: chifeng@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/155779: [PATCH] mail/policyd2: fix RC script
Date: Tue, 22 Mar 2011 12:30:13 UT

 Maintainer of mail/policyd2,
 
 Please note that PR ports/155779 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/155779
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: chifeng <chifeng@gmail.com>
To: bug-followup@freebsd.org
Cc: Edwin Groothuis <edwin@freebsd.org>
Subject: Re: ports/155779: [PATCH] mail/policyd2: fix RC script
Date: Wed, 23 Mar 2011 18:40:06 +0800

 --20cf303f63ecf60d25049f23fb1b
 Content-Type: text/plain; charset=ISO-8859-1
 
 Sure, please commit it, thank you.
 
 Chifeng
 
 -- 
 *Regards.*
 **- Chifeng
 
 --20cf303f63ecf60d25049f23fb1b--
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Wed Mar 23 11:42:07 UTC 2011 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155779 
Responsible-Changed-From-To: freebsd-ports-bugs->sahil 
Responsible-Changed-By: sahil 
Responsible-Changed-When: Mon May 9 03:07:46 UTC 2011 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155779 
State-Changed-From-To: open->closed 
State-Changed-By: sahil 
State-Changed-When: Wed May 11 01:19:15 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155779 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/155779: commit references a PR
Date: Wed, 11 May 2011 01:19:04 +0000 (UTC)

 sahil       2011-05-11 01:18:51 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/policyd2        Makefile 
     mail/policyd2/files  policyd2.sh.in 
   Log:
   Use command_interpreter instead of procname in
   rc script. Bump PORTREVISION because this change
   alters the default package.
   
   PR:             ports/155779
   Submitted by:   Frank Wall <fw@moov.de>
   Approved by:    Chifeng QU <chifeng@gmail.com> (maintainer)
   
   Revision  Changes    Path
   1.11      +1 -0      ports/mail/policyd2/Makefile
   1.3       +2 -2      ports/mail/policyd2/files/policyd2.sh.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
