diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-10-12 20:45:50 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-10-12 20:45:50 +0000 |
commit | 88126658e3062e58c4d0c9964df9da01ca99690c (patch) | |
tree | f986f526f0e7f60741beb8fdbc470675c6db0735 /lib/libc/sys | |
parent | 15e03b4a463ed6ed94dfb27d1c84e3a97d13bbc0 (diff) |
For consistency with other OSes and ease of porting, make
get{sock,peer}name() behave like accept() when the involved UNIX-domain
socket isn't bound to an address, returning an AF_UNIX sockaddr
with zero-length sun_path. Based on diff from robert@ and mikeb@
ok robert@ deraadt@
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/getsockname.2 | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libc/sys/getsockname.2 b/lib/libc/sys/getsockname.2 index c246b7350f0..c64b09ccb07 100644 --- a/lib/libc/sys/getsockname.2 +++ b/lib/libc/sys/getsockname.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getsockname.2,v 1.27 2010/07/01 20:48:37 jmc Exp $ +.\" $OpenBSD: getsockname.2,v 1.28 2012/10/12 20:45:49 guenther Exp $ .\" $NetBSD: getsockname.2,v 1.6 1995/10/12 15:41:00 jtc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)getsockname.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: July 1 2010 $ +.Dd $Mdocdate: October 12 2012 $ .Dt GETSOCKNAME 2 .Os .Sh NAME @@ -156,9 +156,3 @@ The .Fn getsockname function call appeared in .Bx 4.2 . -.Sh BUGS -Names bound to sockets in the -.Ux Ns -domain -are inaccessible; -.Nm getsockname -returns a zero length name. |