summaryrefslogtreecommitdiffstats
path: root/socket_wrapper.pc.cmake
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2021-02-05 12:13:12 +0100
committerAndreas Schneider <asn@samba.org>2021-02-05 14:11:31 +0100
commite72898ad92a52a595d4733210483e9689cb5d390 (patch)
treee99fc74e8168dd246f3ae2dd0c5195d4967c4c9e /socket_wrapper.pc.cmake
parentc3f7465f9cf453ff3bd53750db4024deaba02fb5 (diff)
downloadsocket_wrapper-e72898ad92a52a595d4733210483e9689cb5d390.tar.gz
socket_wrapper-e72898ad92a52a595d4733210483e9689cb5d390.tar.xz
socket_wrapper-e72898ad92a52a595d4733210483e9689cb5d390.zip
swrap: make swrap_accept() more resilient against races related to already disconnected sockets
Callers of accept() expect to get ECONNABORTED instead of a disconnected socket. Even on Linux we have a potential race calling libc_getsockname() after accept(), so we map ENOTCONN to ECONNABORTED. We should do all syscalls in order to have peer and sockname, before doing in memory things like calling sockaddr_convert_from_un(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'socket_wrapper.pc.cmake')
0 files changed, 0 insertions, 0 deletions