Bug 238220

Summary: security/snort: compilation produces a faulty binary when 'yacc' is used
Product: Ports & Packages Reporter: Bill Meeks <bmeeks8>
Component: Individual Port(s)Assignee: Ryan Steinmetz <zi>
Status: Closed FIXED    
Severity: Affects Some People CC: garga
Priority: --- Flags: bugzilla: maintainer-feedback? (zi)
Version: Latest   
Hardware: Any   
OS: Any   

Description Bill Meeks 2019-05-29 16:36:33 UTC
There can be an issue created by ambiguous use of 'yacc' instead of 'bison' when compiling the target-based modules in the Snort binary.  If 'yacc' is used, then the resulting binary will fail to read Host Attributes table XML files. The code will report a fatal syntax error and exit even when the XML file is actually properly formatted.  When 'bison' is used instead in the same builder environment, the resulting Snort binary will properly read the XML file for the Host Attributes table.

I was able to prevent this issue from happening by adding 'bison' to the USES= line in the Snort Makefile.  This forces the compiler to use 'bison' during the build.

Suggest adding 'bison' to the USES= line in the Makefile as it appears the compilation process produces a faulty Snort binary when 'yacc' is used on FreeBSD.  It seems 'yacc' can be the default in some FreeBSD build environments and will be used when no preference is specified in the Makefile.
Comment 1 commit-hook freebsd_committer 2019-05-29 21:04:29 UTC
A commit references this bug:

Author: zi
Date: Wed May 29 21:03:30 UTC 2019
New revision: 503015
URL: https://svnweb.freebsd.org/changeset/ports/503015

  - Explicitly depend on bison

  PR:		238220
  Submitted by:	Bill Meeks <bmeeks8@bellsouth.net>