diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2000-06-09 07:23:48 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2000-06-09 07:23:48 +0000 |
commit | 551cb6528569b25a991b5940437559f7a7566536 (patch) | |
tree | e071bc4e72e2e19ce2d5c7e88c8e20c2906f6408 /net-mgmt/arpwatch-devel | |
parent | Note the possible insecurity of this port. (diff) |
Use mkstemp() instead of insecure mktemp().
PR: 19047
Hall of Shame entry: Mikhail Teterin <mi@aldan.algebra.com> (for his !@#$%^ ego)
Notes
Notes:
svn path=/head/; revision=29433
Diffstat (limited to 'net-mgmt/arpwatch-devel')
-rw-r--r-- | net-mgmt/arpwatch-devel/files/patch-ad | 29 | ||||
-rw-r--r-- | net-mgmt/arpwatch-devel/files/patch-ae | 29 |
2 files changed, 58 insertions, 0 deletions
diff --git a/net-mgmt/arpwatch-devel/files/patch-ad b/net-mgmt/arpwatch-devel/files/patch-ad new file mode 100644 index 000000000000..02096d9d63bf --- /dev/null +++ b/net-mgmt/arpwatch-devel/files/patch-ad @@ -0,0 +1,29 @@ +--- report.c.orig Fri Jun 9 09:54:48 2000 ++++ report.c Fri Jun 9 10:05:58 2000 +@@ -249,6 +249,9 @@ + char *unknown = "<unknown>"; + char buf[132]; + static int init = 0; ++#ifdef HAVE_MKSTEMP ++ int fd; ++#endif + + /* No report until we're initialized */ + if (initializing) +@@ -286,8 +289,16 @@ + /* Child */ + closelog(); + (void)strcpy(tempfile, "/tmp/arpwatch.XXXXXX"); ++#ifndef HAVE_MKSTEMP + (void)mktemp(tempfile); + if ((f = fopen(tempfile, "w+")) == NULL) { ++#else ++ if ((fd = mkstemp(tempfile)) == -1) { ++ syslog(LOG_ERR, "child mkstemp(%s): %m", tempfile); ++ exit(1); ++ } ++ if ((f = fdopen(fd, "w+")) == NULL) { ++#endif /* HAVE_MKSTEMP */ + syslog(LOG_ERR, "child open(%s): %m", tempfile); + exit(1); + } diff --git a/net-mgmt/arpwatch-devel/files/patch-ae b/net-mgmt/arpwatch-devel/files/patch-ae new file mode 100644 index 000000000000..64ebc59f69e2 --- /dev/null +++ b/net-mgmt/arpwatch-devel/files/patch-ae @@ -0,0 +1,29 @@ +--- configure.orig Wed Jul 29 08:16:52 1998 ++++ configure Fri Jun 9 10:12:32 2000 +@@ -646,7 +646,7 @@ + : + fi + +- V_CCOPT="-O" ++# V_CCOPT="-O" + V_INCLS="" + if test "${srcdir}" != "." ; then + V_INCLS="-I\$\(srcdir\)" +@@ -887,7 +887,7 @@ + + echo "$ac_t""$ac_cv_lbl_gcc_vers" 1>&6 + if test $ac_cv_lbl_gcc_vers -gt 1 ; then +- V_CCOPT="-O2" ++# V_CCOPT="-O2" + fi + fi + else +@@ -1154,7 +1154,7 @@ + fi + + +-for ac_func in dn_skipname ++for ac_func in dn_skipname mkstemp + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 + echo "configure:1161: checking for $ac_func" >&5 |