summaryrefslogtreecommitdiffstats
path: root/libexec/mail.local
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1998-08-15 23:11:30 +0000
committermillert <millert@openbsd.org>1998-08-15 23:11:30 +0000
commitec1b350a57ff10c70197d26045d396a7777775f5 (patch)
tree719e404c9b94252e054efc2141bc36ee43aa7e85 /libexec/mail.local
parentfix kbd generated NULs from CTRL-@ and CTRL-SP (diff)
downloadwireguard-openbsd-ec1b350a57ff10c70197d26045d396a7777775f5.tar.xz
wireguard-openbsd-ec1b350a57ff10c70197d26045d396a7777775f5.zip
go back to using mktemp, not mkstemp in baditem(); theo
Diffstat (limited to 'libexec/mail.local')
-rw-r--r--libexec/mail.local/locking.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libexec/mail.local/locking.c b/libexec/mail.local/locking.c
index c0a4b8e95c4..80ca1244dc3 100644
--- a/libexec/mail.local/locking.c
+++ b/libexec/mail.local/locking.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: locking.c,v 1.1 1998/08/15 21:04:33 millert Exp $ */
+/* $OpenBSD: locking.c,v 1.2 1998/08/15 23:11:30 millert Exp $ */
/*
* Copyright (c) 1996-1998 Theo de Raadt <deraadt@theos.com>
@@ -29,7 +29,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: locking.c,v 1.1 1998/08/15 21:04:33 millert Exp $";
+static char rcsid[] = "$OpenBSD: locking.c,v 1.2 1998/08/15 23:11:30 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -146,14 +146,12 @@ baditem(path)
char *path;
{
char npath[MAXPATHLEN];
- int fd;
if (unlink(path) == 0)
return;
snprintf(npath, sizeof npath, "%s/mailXXXXXXXXXX", _PATH_MAILDIR);
- if ((fd = mkstemp(npath)) == -1)
+ if (mktemp(npath) == NULL)
return;
- (void)close(fd);
if (rename(path, npath) == -1)
unlink(npath);
else