Re: how auth "local" works and is documented

Chapman Flack <[email protected]> Wed, 16 Aug 2017 09:38:56 -0400
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
On 08/16/2017 09:14 AM, Jean-Louis Martineau wrote:

> Why loop over 0 and SOCK_STREAM? Why not do it only with SOCK_STREAM?

Well, the first version used only 0, so getaddrinfo would have
the maximum freedom to return any available kind of address that
would confirm the host was local. That works fine in linux, but
I found that Solaris 10's getaddrinfo can return a result that's
unusable in that case.

So I added the retry with SOCK_STREAM as a sop for that behavior,
but still tried the 0 first to stay as general as possible for
systems without that problem. But I don't feel strongly about it.

As I observed a backup over "local" (now that I can), it did seem
that even on a local connection, a localhost TCP connection does
get created (for the xfer?), so if SOCK_STREAM support is needed
in every case, then I suppose no generality would be lost by
requiring it in this test. If you prefer that, the patch would
simply be the version in the first commit, but with 0 replaced by
SOCK_STREAM.

-Chap