LRN's patch argument order
[oweals/gnunet.git] / src / util / common_logging.c
index ba51e550ca61263a3ca8d13b8205c6b03f852a0c..18b03d0ebbd15d90f7202c6bbe45761223594ec2 100644 (file)
@@ -574,7 +574,13 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
 #if WINDOWS
                         O_BINARY |
 #endif
-                        O_WRONLY);
+                        O_WRONLY | O_CREAT,
+#if WINDOWS
+                        _S_IREAD | _S_IWRITE
+#else
+                        S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
+#endif
+                   );
   if (altlog_fd != -1)
   {
     int dup_return;