author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 7 Oct 2008 16:28:24 +0000 (16:28 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 7 Oct 2008 16:28:24 +0000 (16:28 +0000) | ||
commit | 814c75ac076932467801c10ff48f8cd6534fde5a | |
tree | 15590ab334f0b28e735ffad2814cb1a72a0c9d60 | tree | snapshot |
parent | b375d439fffdc6985be67b9ca6cdf4d072c704b1 | commit | diff |
This patch introduces some extra safety checks in journal processing,
and cleans up the code a little bit.
* moved journal initialization to its own function; main() is cleaner
* any time we process a file, log the results
(previous code only loggded if there was a valid entry)
* After reading journals at startup, only trigger full flush out to disk
if the user specified -F. Avoids unnecessary IO on startup unless the
user also wants unnecessary IO on shutdown.
* journal_replay is much more careful about files it will open
* must be a regular file
* must be owned by daemon user
* must not be group/other writable
* Ensure that the journal gets created with the right permissions.
... even when the daemon is invoked with a permissive umask.
equivalent to "chmod a-x,go-w"
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1586 a5681a0c-68f1-0310-ab6d-d61299d08faa
and cleans up the code a little bit.
* moved journal initialization to its own function; main() is cleaner
* any time we process a file, log the results
(previous code only loggded if there was a valid entry)
* After reading journals at startup, only trigger full flush out to disk
if the user specified -F. Avoids unnecessary IO on startup unless the
user also wants unnecessary IO on shutdown.
* journal_replay is much more careful about files it will open
* must be a regular file
* must be owned by daemon user
* must not be group/other writable
* Ensure that the journal gets created with the right permissions.
... even when the daemon is invoked with a permissive umask.
equivalent to "chmod a-x,go-w"
-- kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1586 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_daemon.c | diff | blob | history |