]> 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>
Fri, 30 Jun 2017 21:44:05 +0000 (17:44 -0400)
src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c

index 1ce494a334e04b5404e2a1dbd854b106ab53153a..20259251dec8952d324d3b02f922e8ab18ea4604 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;
                }