]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
rrdcached: Improved the "base-dir symlink check".
authorTobias Oetiker <tobi@oetiker.ch>
Sun, 4 Oct 2009 11:29:40 +0000 (11:29 +0000)
committerTobias Oetiker <tobi@oetiker.ch>
Sun, 4 Oct 2009 11:29:40 +0000 (11:29 +0000)
commitaf94f8bb5a12ecbc66c778510abdac45910aa1f2
treebe9413ea1ac575588b241397cbadfd77a401c048
parentaf468cf0be79ba7126ed2641d4804eb93b658f28
rrdcached: Improved the "base-dir symlink check".
The daemon checks if the specified base directory contains symlinks by
comparing the canonicalized path name (by realpath()) with the path name
specified on the command line. The GNU libc's implementation of realpath()
removed trailing slashes ('/') from the pathname. Thus, specifying a base
directory with a trailing slash results in rrdcached aborting, complaining
about an invalid base directory, which is quite annoying imho. Now, trailing
slashes are removed before comparing the two path names. --  Sebastian Harl

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1923 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_daemon.c