From owner-freebsd-ports-bugs@freebsd.org Mon Oct 16 19:10:21 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1855E425EF for ; Mon, 16 Oct 2017 19:10:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEEC568B17 for ; Mon, 16 Oct 2017 19:10:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v9GJAKT5094987 for ; Mon, 16 Oct 2017 19:10:21 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 223052] [PATCH] security/suricata: fix suricata stale pid file issue Date: Mon, 16 Oct 2017 19:10:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: reshadpatuck1@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 19:10:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223052 Bug ID: 223052 Summary: [PATCH] security/suricata: fix suricata stale pid file issue Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: reshadpatuck1@gmail.com CC: franco@opnsense.org Flags: maintainer-feedback?(franco@opnsense.org) CC: franco@opnsense.org Keywords: patch Created attachment 187220 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D187220&action= =3Dedit v1 - patch - suricata pre_cmd and new config variables If the suricata pid file is not removed when suricata is stopped, the next = time you attempt to run suricata, it complains that there is a stale pid file and refuses to start. To test this: - Run `service suricata start` - kill -9 the suricata process - Run `service suricata start` again - suricata will fail with the following error [ERRCODE: SC_ERR_INITIALIZATION(45)] - pid file '/var/run/suricata.pid' exi= sts but appears stale. Make sure Suricata is not running and then remove /var/run/suricata.pid. Aborting! This patch adds code to the rc script pre-command to check whether a stale = pid file exists and clears it before suricata starts. I have also added two new rc config variables: - suricata_user - The user to run suricata as (defaulting to root) - suricata_pidfile - The pid file to use for the suricata process. --=20 You are receiving this mail because: You are the assignee for the bug.=