----- Original Message -----
> ...
> I've review the code that you reference here and it makes sense to me.
> Stay tuned for an update.
> ...
> Yeah. It ignores non-inet addresses completely. Should be easy to bring
> it up to speed.
Fabulous, x2 - thanks! I'll go add mention of pmContextGetHostName() to
the Programmers Guide as well, and update the man page to discuss use of
the pmcd.hostname metric.
> The problem I see is that the address path must be set after __pmAccept
> (that's when we find out it's AF_UNIX) and by the time we return to
> __pmServerAddNewClients, it's too late (do we even have access to the
> client's address from within __pmServerAddNewClients?). The access check
> (__pmAccAddClient) is done by CheckNewClient immediately after
> AcceptNewClient.
*nod* - you're right, we don't even (can't possibly) have the addr pointer
in the CheckNewClient callback.
> The only place I see to do this within libpcp would be within __pmAccept
> itself, which would be nice, since this code is intended to fill in the
> address for AF_UNIX clients (accept(3) and PR_Accept() don't do this for
> some reason although, by design, they do it for other address families).
> However, then there would be an assumption within __pmAccept that only
> one unix domain socket client exists for each server, which may or may
> not be a problem.
I don't think that's a problem - there's already assumptions in the libpcp
code that theres only one localSocketFd/Path isn't there? __pmAccept gets
my vote, if that can be made to work.
cheers.
--
Nathan
|