PF_LOCAL support in getaddrinfo/getnameinfo

Hiroki Sato hrs at FreeBSD.org
Tue Sep 8 20:31:03 UTC 2015


Hi,

 Is there any problem with adding PF_LOCAL support into getaddrinfo()
 and getnameinfo()?  It was not standardized but can be implemented
 in a straight forward way (attached).

 Some old posts in mailing list archives (not for FreeBSD) said it was
 removed in glibc due to a security issue that getaddrinfo() call with
 PF_UNSPEC could create /tmp/<hostname> unintentionally when no
 hostname was resolved.  IIRC KAME's original implementation included
 this functionality, but I am not sure of why it was removed.  Does
 anyone know the reason, or other potential problems?

 In the attached patch PF_LOCAL is not used when getaddrinfo() is
 called with PF_UNSPEC, and only an absolute pathname is accepted.
 This should not have a bad side-effect for the existing programs
 which use them.

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getaddrinfo_unix.20150909-1.diff
Type: text/x-patch
Size: 4785 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20150909/3cb42e20/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20150909/3cb42e20/attachment-0001.bin>


More information about the freebsd-net mailing list