self explanatory --- snort-2.8.3.1/src/preprocessors/flow/portscan/server_stats.c.old 2008-02-25 14:27:49.000000000 -0500 +++ snort-2.8.3.1/src/preprocessors/flow/portscan/server_stats.c 2009-03-11 01:05:42.658099575 -0400 @@ -346,7 +346,7 @@ /* open this description, create it if necessary, always wait on * sync to disk w/ every write, only write */ - fd = open(filename, O_CREAT|O_TRUNC|O_SYNC|O_WRONLY); + fd = open(filename, O_CREAT|O_TRUNC|O_SYNC|O_WRONLY, 0600); if(fd < 0) { Reproducible: Always
This problem appears to be present when compiling with gcc 4.3.3 even with net-analyzer/snort-2.6.1.3-r1
Output from emerge: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../.. -I../../../../src -I../../../../src/sfutil -I/usr/include/pcap -I../../../../src/output-plugins -I../../../../src/detection-plugins -I../../../../src/dynamic-plugins -I../../../../src/preprocessors -I../../../../src/preprocessors/flow -I../../../../src/preprocessors/portscan -I../../../../src/preprocessors/flow/int-snort -I../../../../src/preprocessors/HttpInspect/include -I../../../../src/preprocessors/Stream5 -I/usr/include/mysql -DENABLE_MYSQL -fno-strict-aliasing -O2 -march=athlon-mp -pipe -fomit-frame-pointer -mmmx -msse -m3dnow -Wall -DTIMESTATS -DPERF_PROFILING -DLINUX_SMP -fno-strict-aliasing -c server_stats.c In function ‘open’, inlined from ‘server_stats_save’ at server_stats.c:328: /usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments distcc[30147] ERROR: compile server_stats.c on localhost failed make[5]: *** [server_stats.o] Error 1
Giles, it doesn't matter which gcc etc you use and yes, it's been there for a while. The developer forgot to put the mode in. Simple steps to work around for the moment. 1) emerge snort 2) wait for the fail 3) cd to the directory with this file and edit it, adding the file mode 4) FEATURES="keeptemp keepwork" emerge snort It'll finish and emerge just fine, all other things being correct.
OK, do we have to go north, upstream to correct?
upstream has already been emailed, no response yet
There is a new ebuild for snort-2.8.4 at the following bug... bug#266288 This ebuild should solve this issue.Server.stats was part of the flow preprocessor which has been depreciated and removed from snort. Stream5 is it's replacement. We should close this bug.