Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal/wiretap libpcap.c wtap.h libpcap.h file.c
guy 1999/08/17 23:17:47 CDT
Modified files:
wiretap libpcap.c wtap.h libpcap.h file.c wtap.c
netxray.c netmon.c
Log:
Add to Wiretap the ability to write capture files; for now, it can only
write them in "libpcap" format, but the mechanism can have other formats
added.
When creating the temporary file for a capture, use "create_tempfile()",
to close a security hole opened by the fact that "tempnam()" creates a
temporary file, but doesn't open it, and we open the file with the name
it gives us - somebody could remove the file and plant a link to some
file, and, if as may well be the case when Ethereal is capturing
packets, it's running as "root", that means we write a capture on top of
that file.... (The aforementioned changes to Wiretap let you open a
capture file for writing given an file descriptor, "fdopen()"-style,
which this change requires.)
Revision Changes Path
1.7 +128 -26 ethereal/wiretap/libpcap.c
1.24 +61 -8 ethereal/wiretap/wtap.h
1.2 +2 -2 ethereal/wiretap/libpcap.h
1.14 +102 -4 ethereal/wiretap/file.c
1.14 +19 -7 ethereal/wiretap/wtap.c
1.9 +6 -2 ethereal/wiretap/netxray.c
1.9 +5 -2 ethereal/wiretap/netmon.c