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
error.

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

Cheers,
Sebastian

-- 
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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
rrd-developers mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers

Reply via email to