pcp
[Top] [All Lists]

Re: [pcp] pcp updates: pmcd clients use "local:" as the default instead

To: Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: [pcp] pcp updates: pmcd clients use "local:" as the default instead of gethostname() or localhost
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Wed, 21 Aug 2013 18:38:21 -0400 (EDT)
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <52152FA6.2020705@xxxxxxxxxx>
References: <51F81D2C.6090905@xxxxxxxxxx> <830357502.13114489.1375929033339.JavaMail.root@xxxxxxxxxx> <5203AE02.50801@xxxxxxxxxx> <1660672891.13968024.1376015218798.JavaMail.root@xxxxxxxxxx> <52152FA6.2020705@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: kJp3Dpd9jB89hgiR0AxPbT+MuvYf7g==
Thread-topic: pcp updates: pmcd clients use "local:" as the default instead of gethostname() or localhost

----- Original Message -----
> On 08/08/2013 10:26 PM, Nathan Scott wrote:
> > Hi Dave,
> >
> > ----- Original Message -----
> >> Because we now use the __pm*() API to manipulate addresses using the
> >> __pmSockAddr type, with a little additional parsing, it should be
> >> relatively easy to support "local:[//][PATH]" and "unix:[//][PATH]" as
> >> host access specifiers in the same way as we support hostnames, inet and
> >> ipv6 addresses. These would also be covered by the '*' wildcard. We
> >> should probably also support some sort of specific wildcarding for these
> >> along the lines of "local:[//]*" and local:[//]partial/path/*". The same
> >> would apply for "unix:".
> > *nod* - all sounds good to me.
> >
> So, I went ahead and implemented support for unix:[//][path][*] and
> local:[//][path][*] as I had suggested above. No problems, it all works
> as expected. However, while testing it occurred to me that allowing the
> (possibly wildcarded) path might be overkill. The pmcd only has one unix
> domain socket open for client connections and so, simply allowing unix:
> and local: might be sufficient. Regardless of the path to the socket in
> the file system, the connections will always be coming from users local
> to the pmcd host.

Yep, good point.

> Can anyone see a potential usage scenario where specifying the path
> might be useful? If not, I can easily rip out the code that allows the
> path, or have the path ignored for now.

I can't think of one.

> One missing bit of information is that local:[//][path][*] is equivalent
> to specifying both unix:[//][path][*] and 'localhost'.

*nod*, OK - that makes sense IMO.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>