From owner-freebsd-ports@FreeBSD.ORG Thu Jan 26 19:44:28 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A18BE106570F; Thu, 26 Jan 2012 19:44:28 +0000 (UTC) (envelope-from scheidell@freebsd.org) Received: from mx1.secnap.com.ionspam.net (mx1.secnap.com.ionspam.net [204.89.241.253]) by mx1.freebsd.org (Postfix) with ESMTP id 71D5D8FC16; Thu, 26 Jan 2012 19:44:28 +0000 (UTC) Received: from mx1.secnap.com.ionspam.net (mx1.secnap.com.ionspam.net [10.70.1.253]) by mx1.secnap.com.ionspam.net (Postfix) with ESMTP id D8479621C3C; Thu, 26 Jan 2012 14:44:27 -0500 (EST) X-Virus-Scanned: SpammerTrap(r) VPS-1500 2.17 at mx1.secnap.com.ionspam.net Received: from USBCTDC001.secnap.com (usbctdc001.secnap.com [10.70.1.1]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.secnap.com.ionspam.net (Postfix) with ESMTPS id 5C9D9621C3B; Thu, 26 Jan 2012 14:44:27 -0500 (EST) Received: from macintosh.secnap.com (10.70.3.3) by USBCTDC001.secnap.com (10.70.1.1) with Microsoft SMTP Server (TLS) id 14.0.722.0; Thu, 26 Jan 2012 14:44:27 -0500 Message-ID: <4F21AD1A.40903@freebsd.org> Date: Thu, 26 Jan 2012 14:44:26 -0500 From: Michael Scheidell Organization: SECNAP Network Security Corp User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.20) Gecko/20110804 Thunderbird/3.1.12 MIME-Version: 1.0 To: , References: <4F2173A8.5010803@freebsd.org> <4352.46.129.107.107.1327599369.squirrel@mymail.acsalaska.net> <4F219044.9030705@freebsd.org> In-Reply-To: <4F219044.9030705@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: what is maxcmdlen? $0 len? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: port@freebsd.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2012 19:44:28 -0000 On 1/26/12 12:41 PM, Michael Scheidell wrote: > > > On 1/26/12 12:36 PM, rflynn@acsalaska.net wrote: >> Also, it looks like swatch is creating a temporary script that is >> actually run, so the status command is not supposed to find it. >> >> It's a design issue upstream that you want them to find a better >> solution for. >> > I am thinking: > either do what SHOULD be done, and in swatch(). check for cmdlen > > (x?) and what is x?) and let swatch die. > this actually makes more sense, as to the cmdbuflen size. len=`echo "0${command} ${swatch_flags} (perl)0" | wc -c` if [ $len -ge 255 ];then takes the command, swatch flags, the (perl) added to end, and two byte buffer (the 0). and if GE 255, then: either FAIL with err 1 swatch_${i}_flags too long or set procname = %%LOCALBASE/bin/perl. this seems to work in all cases.. start/stop/status, one file in tail-file, several files in tail-file, etc. -- Michael Scheidell, CTO o: 561-999-5000 d: 561-948-2259 >*| *SECNAP Network Security Corporation * Best Mobile Solutions Product of 2011 * Best Intrusion Prevention Product * Hot Company Finalist 2011 * Best Email Security Product * Certified SNORT Integrator