openbsd-ports/mail/nmh/patches/patch-ag
kevlo e6a3c04669 - Upgrade to 1.0.3 and fix the security problem.
- Mark unbroken.
- Update the MASTER_SITES.
2000-03-08 05:11:35 +00:00

28 lines
564 B
Plaintext

--- sbr/lock_file.c.orig Sun Sep 12 06:50:12 1999
+++ sbr/lock_file.c Tue Feb 29 18:11:50 2000
@@ -463,16 +463,18 @@
else
snprintf (li->tmplock, sizeof(li->tmplock), "%.*s,LCK.XXXXXX",
cp - li->curlock, li->curlock);
-/*
- Mkstemp work postponed until later -Doug
#ifdef HAVE_MKSTEMP
- mkstemp (li->tmplock);
+ {
+ int lockfd;
+
+ lockfd = mkstemp (li->tmplock);
+ if (lockfd == -1)
+ return;
+ close (lockfd);
+ }
#else
-*/
mktemp (li->tmplock);
-/*
#endif
-*/
unlink (li->tmplock); /* remove any stray */
}