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>