Explorar o código

* fchmod() to avoid a race condition

svn: 1349
Bryan Drewery %!s(int64=21) %!d(string=hai) anos
pai
achega
6fd70b7218
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/misc_file.c

+ 1 - 1
src/misc_file.c

@@ -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;