Hi,
I've been looking into the ins and outs of adding the capability of
listening on unix domain sockets to pmcd (and presumably pmproxy, and
perhaps other components) via extensions to the API in
src/libpcp/src/auxserver.c. I've written most of the code but, at this
point, several user interface decisions must be made:
1) The default for pmcd (and pmproxy) is to listen on all available
network interfaces, unless the -i option has been specified. It it not
clear (to me) what the default should be for the unix domain. It is
clear that a new option (-s or -u perhaps?) is in order for the
specification of paths to these sockets. Let's assume -s for now.
One possibility is to listen to none by default. One or more -s options
could then be used to specify one or more unix domain sockets. A -s
option with no argument could mean to use the default
(/var/run/pcp/pmcd.socket perhaps?). This would be used in conjunction
with an environment variable (PMCD_SOCKET perhaps?) which would specify
additional socket paths, similar to how -p and PMCD_PORT work together.
Another possibility is to listen on /var/run/pcp/pmcd.socket by default
and to use -s and PMCD_SOCKET to override this. Once again an empty -s
could be used to add the default path to the list. In either case it
would be nice to have some way to say to use the default path within
PMCD_SOCKET. Comments and suggestions please. It is interesting that
there appears to be no support for specifying request socket addresses
and ports in the pmcd config file.
2) Does the pmcd access control mechanism need to be extended to include
a way to control access from unix domain sockets? If so, we would need
some kind of syntax in order to distinguish a socket pathname from an
ordinary host name. Once again comments and suggestions please.
Thanks,
Dave
|