]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10457: [mod_cdr_csv] set group too when creating new csv file so other users in...
authorMike Jerris <mike@jerris.com>
Fri, 30 Jun 2017 21:44:05 +0000 (17:44 -0400)
committerMike Jerris <mike@jerris.com>
Tue, 11 Jul 2017 17:02:59 +0000 (13:02 -0400)
src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c

index 08c033262f56cc39c6953e316258c220f81aa1eb..9d87b18c77b334265972a739d86ae3ec30a4b7eb 100644 (file)
@@ -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;
                }