[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rrd-developers
Subject:    [rrd-developers] rrdcached: path sanitizer
From:       "Kiss Gabor (Bitman)" <kissg () ssg ! ki ! iif ! hu>
Date:       2012-11-30 12:33:16
Message-ID: alpine.DEB.2.00.1211301117200.13841 () bakacsin ! ki ! iif ! hu
[Download RAW message or body]

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=FCck git und Slotermeyer?
Ja! ... Beiherhund das Oder die Flipperwaldt gersput.

_______________________________________________
rrd-developers mailing list
rrd-developers@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic