Project

General

Profile

Actions

Bug #873

closed

suricata.yaml: .mgc is NOT actually added to value for magic file

Added by Mark Solaris over 11 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

The suricata.yaml file states that the value you specify for 'magic-file' will then have the .mgc suffix appended.

# Magic file. The extension .mgc is added to the value here.
magic-file: /usr/local/share/misc/magic

There's no code to support this advice:

host:/var/tmp/suricata-1.4.3 root# grep mgc * */* */*/*
configure:            e_magic_file="/usr/local/share/misc/magic.mgc" 
configure:            e_magic_file="/usr/local/share/misc/magic.mgc" 
configure:            e_magic_file="/usr/local/share/file/magic.mgc" 
configure:  e_magic_file="$e_winbase\\\\magic.mgc" 
configure.ac:            e_magic_file="/usr/local/share/misc/magic.mgc" 
configure.ac:            e_magic_file="/usr/local/share/misc/magic.mgc" 
configure.ac:            e_magic_file="/usr/local/share/file/magic.mgc" 
configure.ac:  e_magic_file="$e_winbase\\\\magic.mgc" 
suricata.yaml:# Magic file. The extension .mgc is added to the value here.
suricata.yaml.in:# Magic file. The extension .mgc is added to the value here.

and the program bombs out:

11/7/2013 -- 12:32:30 - <Info> - using magic-file /usr/local/share/misc/magic
11/7/2013 -- 12:32:30 - <Warning> - [ERRCODE: SC_ERR_FOPEN(44)] - Error opening file: "/usr/local/share/misc/magic": No such file or directory
host:/apps/ids/suricata root# ls -aCF /usr/local/share/misc
total 5133
drwxr-xr-x   2 root     root           3 Jul 10 12:57 ./
drwxr-xr-x  28 root     root          28 Jul 10 16:54 ../
-rw-r--r--   1 root     root     2606480 Jul  2 18:32 magic.mgc

The suricata.yaml[.in] file needs to be updated to remove the statement about '.mgc' being automatically appended.

Actions

Also available in: Atom PDF