Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal capture.c ethereal.c file.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 17 Aug 1999 23:17:33 -0500 (CDT)
guy         1999/08/17 23:17:31 CDT

  Modified files:
    .                    capture.c ethereal.c file.h 
  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.53      +69 -33    ethereal/capture.c
  1.95      +15 -4     ethereal/ethereal.c
  1.37      +3 -5      ethereal/file.h