From: Christian Grothoff Date: Tue, 6 Dec 2011 19:06:30 +0000 (+0000) Subject: LRN: correct behaviour when logfile does not exist X-Git-Tag: initial-import-from-subversion-38251~15715 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6e26c8c4e678c85da0a87b0b2f56fba95c0ebd3b;p=oweals%2Fgnunet.git LRN: correct behaviour when logfile does not exist --- 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;