rrdcached: Improved the "base-dir symlink check".
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 4 Oct 2009 11:29:40 +0000 (11:29 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 4 Oct 2009 11:29:40 +0000 (11:29 +0000)
commit1f55de123f58e5ec37b6f36c8d2b4716f009a0ef
treebe9413ea1ac575588b241397cbadfd77a401c048
parentfaf5ffaa9e488e6cf185a64a51fd6e9fd35a3267
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