mirror of https://github.com/getdnsapi/getdns.git
Windowqs mkstemp: open() needs more permissions.
Specifically: 1. The open must be for read only or read/write - use read/write. 2. The file permission must permit read and write.
This commit is contained in:
parent
6439b0407a
commit
42e4cfc383
|
@ -39,5 +39,5 @@ int mkstemp(char *template)
|
|||
{
|
||||
if (_mktemp_s(template, strlen(template) + 1) != 0)
|
||||
return -1;
|
||||
return open(template, _O_CREAT | _O_EXCL, _S_IWRITE);
|
||||
return open(template, _O_CREAT | _O_EXCL | _O_RDWR, _S_IWRITE | _S_IREAD);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue