Use mkstemp.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1767 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-05-25 02:48:29 +00:00
parent d17842e090
commit 5e16bd277e
2 changed files with 8 additions and 10 deletions

View File

@@ -41,8 +41,7 @@ pop_dropcopy(POP *p, struct passwd *pwp)
/* First create a unique file. Would prefer mkstemp, but Ultrix...*/
strcpy(template,POP_TMPDROP);
mktemp(template);
if ( (tf=fopen(template,"w+")) == NULL ) { /* failure, bail out */
if ((tf=fdopen(mkstemp(template),"w+")) == NULL) { /* failure, bail out */
pop_log(p,POP_PRIORITY,
"Unable to create temporary temporary maildrop '%s': %s",template,
strerror(errno));