--- ./mts/smtp/smtp.c.orig Sat Mar 20 16:02:43 1999 +++ ./mts/smtp/smtp.c Sat Mar 20 16:11:46 1999 @@ -244,12 +244,16 @@ for (ap = arguments; *ap; ap++) if (**ap == '/') { char *dp; + int fd; if ((dp = strrchr(*ap, '/')) && *++dp == NULL) *--dp = NULL; snprintf (sm_tmpfil, sizeof(sm_tmpfil), "%s/smtpXXXXXX", *ap); - mktemp (sm_tmpfil); - + fd = mkstemp (sm_tmpfil); + if (fd == -1) + return NOTOK; + close (fd); + unlink (sm_tmpfil); if ((sd = creat (sm_tmpfil, 0600)) != NOTOK) { sm_ispool = 1; break;