summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-07-31 23:06:13 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-07-31 23:06:13 +0000
commitc31abd81fa1fa78b0ac19d0b1de3d492a016768c (patch)
tree90fcae2dd864e4f387af8a5af809d69046b3775e
parent7d8d76e7d6bda5d8a509002fb2206ac5166c6126 (diff)
downloadwireshark-c31abd81fa1fa78b0ac19d0b1de3d492a016768c.tar.gz
chmod() the temporary capture file to 0600 so that only the user can
read the trace. We chmod() after pcap creates the file, but before it actually writes data there. Thanks to Frederic Peters <fpeters@multimania.com>, the Debian maintainer of Ethereal, for pointing this out. svn path=/trunk/; revision=413
-rw-r--r--capture.c8
-rw-r--r--configure.in5
2 files changed, 9 insertions, 4 deletions
diff --git a/capture.c b/capture.c
index 776907108a..ec68955fd8 100644
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
- * $Id: capture.c,v 1.37 1999/07/28 20:17:14 deniel Exp $
+ * $Id: capture.c,v 1.38 1999/07/31 23:06:13 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -34,6 +34,10 @@
# include <sys/types.h>
#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
#include <gtk/gtk.h>
#include <stdlib.h>
#include <stdio.h>
@@ -435,7 +439,7 @@ capture(void) {
pcap_close(pch);
return;
}
-
+ chmod(cf.save_file, 0600);
ld.linktype = pcap_datalink(pch);
if (cf.cfilter) {
diff --git a/configure.in b/configure.in
index c7730f1f6f..833791a5f7 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.32 1999/07/20 08:02:15 guy Exp $
+# $Id: configure.in,v 1.33 1999/07/31 23:06:13 gram Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(etypes.h)
@@ -12,6 +12,7 @@ AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_YACC
+AM_PROG_LEX
# If we're running gcc, add '-Wall' to CFLAGS.
AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS)
@@ -80,7 +81,7 @@ fi
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h netdb.h)
-AC_CHECK_HEADERS(sys/sockio.h sys/types.h netinet/in.h sys/socket.h net/if.h)
+AC_CHECK_HEADERS(sys/stat.h sys/sockio.h sys/types.h netinet/in.h sys/socket.h net/if.h)
dnl SNMP Check
AC_ARG_ENABLE(snmp,