author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 4 Oct 2009 11:29:40 +0000 (11:29 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 4 Oct 2009 11:29:40 +0000 (11:29 +0000) | ||
commit | 5e33660b65d8bc1571e12d697bddbdbb8716940a | |
tree | c0c773240252d5ea5a54777cad91fea3faa2783c | tree | snapshot |
parent | cbcb79f93d23e541ea9e16d894b23f8caf01394c | commit | diff |
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@1923 a5681a0c-68f1-0310-ab6d-d61299d08faa
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@1923 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_daemon.c | diff | blob | history |