فهرست منبع

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