| To: | Nathan Scott <nathans@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [pcp] pcp updates: pmcd clients use "local:" as the default instead of gethostname() or localhost |
| From: | Dave Brolley <brolley@xxxxxxxxxx> |
| Date: | Thu, 08 Aug 2013 10:41:06 -0400 |
| Cc: | PCP <pcp@xxxxxxxxxxx> |
| Delivered-to: | pcp@xxxxxxxxxxx |
| In-reply-to: | <830357502.13114489.1375929033339.JavaMail.root@xxxxxxxxxx> |
| References: | <51F81D2C.6090905@xxxxxxxxxx> <830357502.13114489.1375929033339.JavaMail.root@xxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 08/07/2013 10:30 PM, Nathan Scott wrote: I'm not surprised to see this. I recall asking on IRC whether we needed to do this, but the response was that something along the lines that equivalent access control would somehow be provided via the authentication protocol. Perhaps I did not ask the question clearly enough at the time. So, as a result, there has been no effort made to provide host based access controls for the unix domain socket. This special handling of localhost has also been questioned in http://oss.sgi.com/bugzilla/show_bug.cgi?id=982, so we should keep this in mind when discussing this issue.Digging into the code a bit, looks like we avoid having the same access rules as apply to localhost because __pmSockAddrIsLoopBack returns false for af_unix sockets. Call chain there from pmcd to libpcp is: __pmAccAddClient -> getClientIds -> __pmSockAddrIsLoopBack ... which is gonna send us down a different path to the /* Map "localhost" to the real IP addresses. */ path we would've travelled before. The name __pmSockAddrIsLoopBack() is pretty specific in what it claims to identify. Unless changing the name is still ok, we would probably need a new function to use in conjunction with it. Something like __pmAddrIsLocal(), although the term local seems to be becoming more and more overloaded. 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:". Dave |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | pcp updates: dynamic metrics, qa, Nathan Scott |
|---|---|
| Next by Date: | pmdagfs2: misc updates, Paul Evans |
| Previous by Thread: | Re: [pcp] pcp updates: pmcd clients use "local:" as the default instead of gethostname() or localhost, Nathan Scott |
| Next by Thread: | Re: [pcp] pcp updates: pmcd clients use "local:" as the default instead of gethostname() or localhost, Nathan Scott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |