From: sapanb Date: Fri, 8 Jul 2011 15:17:56 +0000 (+0000) Subject: Added modes in other call to open() with O_CREAT X-Git-Tag: fprobe-ulog-1.1.3-3~2 X-Git-Url: http://git.onelab.eu/?p=fprobe-ulog.git;a=commitdiff_plain;h=c7e7ff9a6a849cf94662ef5394fe4bde83c31bdc Added modes in other call to open() with O_CREAT git-svn-id: http://svn.planet-lab.org/svn/fprobe-ulog/trunk@18794 8c455092-636d-4788-adf5-e71def0336e8 --- diff --git a/src/fprobe-ulog.c b/src/fprobe-ulog.c index 0dc3071..3add97c 100644 --- a/src/fprobe-ulog.c +++ b/src/fprobe-ulog.c @@ -479,7 +479,7 @@ unsigned get_data_file_fd(char *fname, int cur_fd) { system(gzip_cmd); } snprintf(cur_output_file,MAX_PATH_LEN,"%s.%d",fname,cur_epoch); - if ((write_fd = open(cur_output_file, O_RDWR|O_CREAT|O_TRUNC)) < 0) { + if ((write_fd = open(cur_output_file, O_RDWR|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH)) < 0) { my_log(LOG_ERR, "open(): %s (%s)\n", cur_output_file, strerror(errno)); exit(1); }