[rrd-developers] RRDCacheD - Client rewriting path
Yann Jouanin
yann.jouanin.list at intelunix.fr
Sat Aug 8 16:31:10 CEST 2009
Isn't it already done by this function in RRDCacheD and defining base dir?
/* when using a base dir, convert relative paths to absolute paths.
* if necessary, modifies the "filename" pointer to point
* to the new path created in "tmp". "tmp" is provided
* by the caller and sizeof(tmp) must be >= PATH_MAX.
*
* this allows us to optimize for the expected case (absolute path)
* with a no-op.
*/
1059 static void get_abs_path(char **filename, char *tmp)
Yann Jouanin
http://www.yannj.fr
-----Original Message-----
From: Tobias Oetiker [mailto:tobi at oetiker.ch]
Sent: Saturday, August 08, 2009 4:19 PM
To: Yann Jouanin
Cc: rrd-developers at lists.oetiker.ch
Subject: Re: [rrd-developers] RRDCacheD - Client rewriting path
Hi Yann,
Today Yann Jouanin wrote:
> Hello list,
>
> It seems the behavior of RRD client when using RRDCacheD can make trouble
> when using RRDCacheD on another host than the one where using client.
>
> The translation between relative path and absolute path is done in client
> code (rrdc_flush) while it should only be done by the server.
>
> This causes update to fail because the path is badly rewritten.
> I had to comment the following line to fix this.
>
>
>
> int rrdc_flush (const char *filename) /* {{{ */
> {
> .........
>
>
> /* change to absolute path for rrdcached */
> /* if (*filename != '/' && realpath(filename, file_path) != NULL)
> filename = file_path; */
> ............
Yann, can you elaborate how you would handle relative path names on
the server side ?
cheers
tobi
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-developers
mailing list