summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/common.h
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1996-09-24 02:58:52 +0000
committermillert <millert@openbsd.org>1996-09-24 02:58:52 +0000
commit7ffd4e56ed7ab019d24a59177e1efcb640754f95 (patch)
tree1962f5307dc60de45dd580c4a4b04df56f608112 /usr.bin/patch/common.h
parentno mknod in chroot (diff)
downloadwireguard-openbsd-7ffd4e56ed7ab019d24a59177e1efcb640754f95.tar.xz
wireguard-openbsd-7ffd4e56ed7ab019d24a59177e1efcb640754f95.zip
Use mkstemp(). Since temp files get re-used we use mkstemp() to make
us a "place holder" (and discard the fd) to protect from DOS attacks and then just re-use that.
Diffstat (limited to 'usr.bin/patch/common.h')
-rw-r--r--usr.bin/patch/common.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/patch/common.h b/usr.bin/patch/common.h
index 2a7154c5596..96421b22d50 100644
--- a/usr.bin/patch/common.h
+++ b/usr.bin/patch/common.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.h,v 1.3 1996/06/25 23:06:36 deraadt Exp $ */
+/* $OpenBSD: common.h,v 1.4 1996/09/24 02:58:53 millert Exp $ */
#define DEBUGGING
@@ -17,7 +17,6 @@
#define Fclose (void)fclose
#define Fflush (void)fflush
#define Sprintf (void)sprintf
-#define Mktemp (void)mktemp
#define Strcpy (void)strcpy
#define Strcat (void)strcat
@@ -83,6 +82,8 @@
#define strnNE(s1,s2,l) (strncmp(s1, s2, l))
#define strnEQ(s1,s2,l) (!strncmp(s1, s2, l))
+#define Mkstemp mkstemp
+
/* typedefs */
typedef char bool;
@@ -168,7 +169,7 @@ char *getenv();
char *strcpy();
char *strcat();
char *rindex();
-char *mktemp();
+int mkstemp();
#if 0 /* This can cause a prototype conflict. */
#ifdef CHARSPRINTF
char *sprintf();