Bug 10924 - Snort Init Script Trailing /
Summary: Snort Init Script Trailing /
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: - Unknown - - Unknown -
Assignee: Douglas Charles Duckworth
QA Contact: Michael Tremer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-12 17:58 UTC by Douglas Charles Duckworth
Modified: 2016-03-03 15:52 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Charles Duckworth 2015-09-12 17:58:45 UTC
This is minor thing that does not affect snort functionality.

Snort init script:

for DEVICE in $DEVICES; do
                        boot_mesg "Starting Intrusion Detection System on $DEVICE..."
                        /usr/sbin/snort -c /etc/snort/snort.conf -i $DEVICE -D -l /var/log/snort --create-pidfile --nolock-pidfile --pid-path /var/run/
                        evaluate_retval
                        sleep 1
                        chmod 644 /var/run/snort_$DEVICE.pid
                done

Creates trailing / in syslog output ex "/var/run//snort_$DEVICE.pid"

Sep 12 10:53:34 ipfire snort[5120]: PID path stat checked out ok, PID path set to /var/run/ 
Sep 12 10:53:34 ipfire snort[5120]: Writing PID "5120" to file "/var/run//snort_red0.pid"

Propose change init script to "--pid-path /var/run"

Results:

Sep 12 10:57:16 ipfire snort[5910]: Decoding Ethernet 
Sep 12 10:57:16 ipfire snort[5910]: Checking PID path... 
Sep 12 10:57:16 ipfire snort[5910]: PID path stat checked out ok, PID path set to /var/run 
Sep 12 10:57:16 ipfire snort[5910]: Writing PID "5910" to file "/var/run/snort_red0.pid"
Comment 1 Douglas Charles Duckworth 2015-09-12 18:33:37 UTC
Submitted Pull Request https://github.com/ipfire/ipfire-2.x/pull/52
Comment 2 Michael Tremer 2015-09-15 00:21:12 UTC
Thank you for sending this in. Merged that patch. Easy fix.
Comment 3 Douglas Charles Duckworth 2015-09-27 18:43:29 UTC
Michael

Did I submit the pull request properly:

https://github.com/ipfire/ipfire-2.x/pull/52

There's a commit in that pull which also adds cookie authentication into Tor.  I thought that would be an improvement over not having any authentication with ControlPort.  I am still new to Git so may have done this commit improperly.