瀏覽代碼

Fixed open() calls

Pierre-Olivier Latour 11 年之前
父節點
當前提交
10cbe27e50
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      GCDWebServer/Core/GCDWebServerConnection.m

+ 2 - 2
GCDWebServer/Core/GCDWebServerConnection.m

@@ -675,11 +675,11 @@ static NSString* _StringFromAddressData(NSData* data) {
     _connectionIndex = OSAtomicIncrement32(&_connectionCounter);
     
     _requestPath = ARC_RETAIN([NSTemporaryDirectory() stringByAppendingPathComponent:[[NSProcessInfo processInfo] globallyUniqueString]]);
-    _requestFD = open([_requestPath fileSystemRepresentation], O_CREAT | O_TRUNC | O_WRONLY);
+    _requestFD = open([_requestPath fileSystemRepresentation], O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
     DCHECK(_requestFD > 0);
     
     _responsePath = ARC_RETAIN([NSTemporaryDirectory() stringByAppendingPathComponent:[[NSProcessInfo processInfo] globallyUniqueString]]);
-    _responseFD = open([_responsePath fileSystemRepresentation], O_CREAT | O_TRUNC | O_WRONLY);
+    _responseFD = open([_responsePath fileSystemRepresentation], O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
     DCHECK(_responseFD > 0);
   }
 #endif