Преглед изворни кода

* fchmod() to avoid a race condition

svn: 1349
Bryan Drewery пре 21 година
родитељ
комит
6fd70b7218
1 измењених фајлова са 1 додато и 1 уклоњено
  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;