[rrd-developers] rrdcached: path sanitizer
Kiss Gabor (Bitman)
kissg at ssg.ki.iif.hu
Fri Nov 30 13:33:16 CET 2012
I've just installed rrdcached and I'm checking its performance.
I found that daemon does not sanitize file paths.
Two different cliens may want to refer the same unix file
with different names but rrdcached does not recognizes this
but uses given filenames literally.
E.g. Unix system calls "know" that the following files are the same
/var/lib/cricket/subdir/foo.rrd and /var/lib/cricket//subdir/foo.rrd,
/var/lib/cricket/subdir/bar.rrd and /var/lib/cricket/./subdir/bar.rrd
etc.
Meanwhile rrdcache thinks they are different.
This may be problem when one program updates RRD file and an other
one tries to flush cache before graphing.
Checking the source code I found that severeal request handlers
call get_abs_path(&file, file_tmp), but then no one uses
the content of file_tmp.
Maybe this function could be replaced with an other that
canonifies file paths. I.e. multiple slashes should be replaced
with single one and "./" should be omitted.
Regards
Gabor
--
Wenn ist das Nunstück git und Slotermeyer?
Ja! ... Beiherhund das Oder die Flipperwaldt gersput.
More information about the rrd-developers
mailing list