Skip to content

Commit

Permalink
* fchmod() to avoid a race condition
Browse files Browse the repository at this point in the history
svn: 1349
  • Loading branch information
bdrewery committed Nov 7, 2004
1 parent f3a03ac commit 6fd70b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc_file.c
Expand Up @@ -180,7 +180,7 @@ void Tempfile::MakeTemp()
if ((f = fdopen(fd, "w+b")) == NULL)
goto error;

chmod(file, S_IRUSR | S_IWUSR);
fchmod(fd, S_IRUSR | S_IWUSR);

return;

Expand Down

0 comments on commit 6fd70b7

Please sign in to comment.