From 6e26c8c4e678c85da0a87b0b2f56fba95c0ebd3b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 6 Dec 2011 19:06:30 +0000 Subject: [PATCH] LRN: correct behaviour when logfile does not exist --- src/util/common_logging.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/common_logging.c b/src/util/common_logging.c index ba51e550c..18b03d0eb 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c @@ -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; -- 2.25.1