diff options
-rw-r--r-- | hugin.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -40,6 +40,8 @@ #include <sys/stat.h> #include <fcntl.h> +#define LOGPERM 0660 + #ifdef WITH_HUG_MUTEX # ifdef WIN32 # include <windows.h> @@ -239,7 +241,7 @@ hug_status_t hug_init(unsigned int flags, ...) if(hug_config.flags & HUG_FLAG_OUTPUT_TO_FILE) { hug_config.filename = strdup(filename); hug_config.file_fd = open(hug_config.filename, - O_CREAT | O_APPEND | O_RDWR, 0777); + O_CREAT | O_APPEND | O_RDWR, LOGPERM); if(hug_config.file_fd == -1) { fprintf(stderr, "Could not open logfile for writing: %s\n", hug_config.filename); @@ -302,7 +304,7 @@ hug_status_t hugin_reopen_log() close(hug_config.file_fd); hug_config.file_fd = open(hug_config.filename, - O_CREAT | O_APPEND | O_RDWR, 0777); + O_CREAT | O_APPEND | O_RDWR, LOGPERM); if(hug_config.file_fd == -1) { fprintf(stderr, "Could not re-open logfile for writing: %s\n", |