Project

General

Profile

Feature #3685

getsockname should set the sa_family_t for unbound unix domain sockets

Added by Robert Mustacchi about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Category:
kernel
Start date:
2013-04-03
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

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.

History

#1

Updated by Robert Mustacchi about 7 years ago

  • % Done changed from 90 to 100
  • Status changed from New to Resolved

Resolved in dfc0fed81813380fb526f1a003d3be17ab26ce3b.

Also available in: Atom PDF