From 9600fdd1d675af158e5c58332f8887bd31e34d27 Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Fri, 30 Jun 2017 17:44:05 -0400 Subject: [PATCH] FS-10457: [mod_cdr_csv] set group too when creating new csv file so other users in the group can access it --- src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c b/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c index 1ce494a334..20259251de 100644 --- a/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c +++ b/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c @@ -81,7 +81,11 @@ static void do_reopen(cdr_fd_t *fd) } for (x = 0; x < 10; x++) { +#ifdef _MSC_VER if ((fd->fd = open(fd->path, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR)) > -1) { +#else + if ((fd->fd = open(fd->path, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) > -1) { +#endif fd->bytes = fd_size(fd->fd); break; }