Bug 10924

Summary: Snort Init Script Trailing /
Product: IPFire Reporter: Douglas Charles Duckworth <dod2014>
Component: ---Assignee: Douglas Charles Duckworth <dod2014>
Status: CLOSED FIXED QA Contact: Michael Tremer <michael.tremer>
Severity: - Unknown -    
Priority: - Unknown - CC: dod2014, michael.tremer, stefan.schantl
Version: 2   
Hardware: unspecified   
OS: Unspecified   

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.