Include a missing header, and change a mktemp(3), mkdir(2) sequence to
mkdtemp(3). Approved by: murray
This commit is contained in:
parent
cac498f4bb
commit
afed3dc4e9
@ -44,6 +44,7 @@ static char rcsid[] = "@(#)$FreeBSD$";
|
||||
#include "token.h"
|
||||
#include "context.h"
|
||||
#include "string.h"
|
||||
#include "mystring.h"
|
||||
|
||||
s_getc()
|
||||
{
|
||||
|
@ -64,8 +64,7 @@ wwterminfoinit()
|
||||
|
||||
/* make the directory */
|
||||
(void) sprintf(wwterminfopath, "%swwinXXXXXX", _PATH_TMP);
|
||||
mktemp(wwterminfopath);
|
||||
if (mkdir(wwterminfopath, 0755) < 0 ||
|
||||
if (mkdtemp(wwterminfopath) < 0 ||
|
||||
chmod(wwterminfopath, 00755) < 0) {
|
||||
wwerrno = WWE_SYS;
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user