Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262080 - net-analyzer/snort-2.8.3.1: patch to add missing file mode in preprocessor
Summary: net-analyzer/snort-2.8.3.1: patch to add missing file mode in preprocessor
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 05:14 UTC by Blu3
Modified: 2009-04-18 15:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Blu3 2009-03-11 05:14:24 UTC
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
Comment 1 Giles Coochey 2009-03-17 13:45:04 UTC
This problem appears to be present when compiling with gcc 4.3.3 even with net-analyzer/snort-2.6.1.3-r1
Comment 2 Giles Coochey 2009-03-17 13:46:21 UTC
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
Comment 3 Blu3 2009-03-30 17:57:35 UTC
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.
Comment 4 Giles Coochey 2009-03-31 06:47:21 UTC
OK, do we have to go north, upstream to correct?
Comment 5 Blu3 2009-03-31 16:56:10 UTC
upstream has already been emailed, no response yet
Comment 6 Jason Wallace 2009-04-15 18:58:41 UTC
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.