getsockname should set the sa_family_t for unbound unix domain sockets
From the Joyent bug report:
Currently when you call getsockname on an unbound unix domain socket, it sets the socklen_t length to zero. Other systems, like OS X and GNU/Linux, always set the first two bytes which correspond to the family. The standard nor the manual page dictate what the behavior should be, it's unspecified. Without this information, it's hard for the writer of a program to get useful information about a socket like this. See OS-1909 for an example of this. With this, pfiles would be able to tell that an unbound uds socket is in fact AF_UNIX. Other protocols like TCP do not have this behavior.