diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-15 23:11:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-15 23:11:31 +0000 |
commit | e1e3c5d80c356261e7324a89c0ac144dcee84086 (patch) | |
tree | 3a800fb66b44ba42ca8e8643cf636cc22fb2af65 | |
parent | 7fa9b0319d4502c54335454c4d0e5589ebcf7e6f (diff) |
go back to using mktemp, not mkstemp in baditem(); theo
-rw-r--r-- | libexec/mail.local/locking.c | 8 |
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 |