git://git.onelab.eu
/
fprobe-ulog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added acceptable modes in call to open with O_CREAT
[fprobe-ulog.git]
/
src
/
fprobe-ulog.c
diff --git
a/src/fprobe-ulog.c
b/src/fprobe-ulog.c
index
bca3b5d
..
0dc3071
100644
(file)
--- a/
src/fprobe-ulog.c
+++ b/
src/fprobe-ulog.c
@@
-418,7
+418,7
@@
void update_cur_epoch_file(int n) {
int fd, len;
char snum[MAX_EPOCH_SIZE];
len=snprintf(snum, MAX_EPOCH_SIZE-1,"%d", n);
int fd, len;
char snum[MAX_EPOCH_SIZE];
len=snprintf(snum, MAX_EPOCH_SIZE-1,"%d", n);
- fd = open(LAST_EPOCH_FILE, O_RDWR|O_CREAT|O_TRUNC);
+ fd = open(LAST_EPOCH_FILE, O_RDWR|O_CREAT|O_TRUNC
,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH
);
if (fd == -1) {
my_log(LOG_ERR, "open() failed: %s.The next restart will resume logging from epoch id 0.",LAST_EPOCH_FILE);
return;
if (fd == -1) {
my_log(LOG_ERR, "open() failed: %s.The next restart will resume logging from epoch id 0.",LAST_EPOCH_FILE);
return;