Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2017 19:10:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 223052] [PATCH] security/suricata: fix suricata stale pid file issue
Message-ID:  <bug-223052-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223052-13>