[Snort-devel] Barnyard compilation/linking bugs

Jeff Nathan jeff at ...835...
Tue Dec 14 10:46:01 EST 2004


Hey Andrew,

I've come across a few minor bugs in Barnyard CVS HEAD.


Problem 1:
Barnyard, and Snort, incorrectly use autoconf checks for strlcpy and 
strlcat using AC_CHECK_FUNCS.  This should be done using 
AC_REPLACE_FUNCS as the source repository includes a local version of 
both functions.  When AC_REPLACE_FUNCS is used, the function tested is 
automatically added to *_SOURCES in Makefile.am, but the name of the 
source file must match the function autoconf tests.  Therefore to test 
for strlcpy or strlcat with AC_REPLACE_FUNCS, you include strlcat.c and 
strlcpy.c in your repository  but don't list either file in 
Makefile.am.  The attached patch fixes this problem in Barnyard.

Problem 2:
Barnyard, and formerly Snort, includes a local event.h header.  As 
Marty learned in his libevent experiments, this makes use of libevent 
difficult to say the least.  Therefore, event.h has been renamed 
byevent.h and all places it's included have been changed.  The attached 
patch fixes this problem in Barnyard.

Problem 3:
Uses of uint* require stdint.h, per C99.  My Mac barfs when compiling 
barnyard.  Since autoconf already tests for stdint.h, it's now included 
in output-plugins/op_decode.c . The attached patch fixes this problem 
in Barnyard.

Problem 4:
In several places config.h is included without using a CPP test.  This 
is annoying if you're compiling code by hand.  All inclusions of 
config.h are now wrapped in a CPP ifdef test.  The attached patch fixes 
this problem in Barnyard.

Problem 5: <-- (I'm only half joking here)
Potentially the most annoying is the SourceForge CVS configuration that 
prohibits additions and deletions of files to and from a working CVS 
repository.  How utterly annoying!@  Great free service SourceForge 
folks, but cumbersome in this respect.

Applying this patch ASAP would be very helpful as I'm finishing a 
barnyard output plugin and would LOVE to be able to compile checkouts 
of CVS HEAD on my Mac.

As a result of Problem 5, you'll have to use -p1 when applying the 
attached patch.

Regards,

-Jeff

-------------- next part --------------
A non-text attachment was scrubbed...
Name: by.diff.gz
Type: application/x-gzip
Size: 4581 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20041214/7045d538/attachment.bin>
-------------- next part --------------

--
http://cerberus.sourcefire.com/~jeff       (DSA key id 6923D3FD)
"Problems cannot be solved at the same level of awareness that
created them."   - Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20041214/7045d538/attachment.sig>


More information about the Snort-devel mailing list