[rrd-developers] [PATCH] rrd_client: Do not rewrite path names when accessing remote daemons.

Sebastian Harl sh at tokkee.org
Sun Oct 4 00:34:51 CEST 2009

Hi Tobi,

On Sat, Oct 03, 2009 at 11:36:11PM +0200, Tobias Oetiker wrote:
> Today Sebastian Harl wrote:
> > When talking to a local daemon (thru a UNIX socket), relative path names are
> > resolved to absolute path names to allow for transparent integration into
> > existing solutions (as requested by Tobi).
> >
> > However, when talking to a remote daemon, absolute path names are not allowed,
> > since path name translation is done by the server (relative to the base
> > directory).
> am I reading the code correctly? You do not
> rewrite a request if it is sent remotely, but you do not complain
> if a remote request uses an absolute path either ?

I do complain if a remote request uses an absolute path:

+  if (*path == '/') /* absolute path */
+  {
+    if (! is_unix)

/* i.e. this is a remote request */

+    {
+      rrd_set_error ("absolute path names not allowed when talking "
+          "to a remote daemon");
+      return (NULL);
+    }
+    /* else: nothing to do */
+  }

Later, if get_path() returns NULL, the rrdc_*() functions return with an

A relative path name is sent to a remote daemon unmodified.


Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20091004/a31ba973/attachment.pgp 

More information about the rrd-developers mailing list