[PATCH 0/7] Fix some system calls on sockets

Ken Brown kbrown@cornell.edu
Thu Feb 25 22:48:05 GMT 2021


Several of the fhandler_socket_local and fhandler_socket_unix methods
that support system calls are written as though they are operating on
socket files unless the socket is an abstract socket.  This patchset
(except for the last patch) attempts to fix this by checking whether
the fhandler is associated with a socket file.  If not, we call an
fhandler_socket_wsock or fhandler_socket method instead of an
fhandler_disk_file method.

The last patch is just a code simplification that arose while I was
working on fhandler_socket_local::link.

Ken Brown (7):
  Cygwin: fix fstat on sockets that are not socket files
  Cygwin: fix fstatvfs on sockets that are not socket files
  Cygwin: fix fchmod on sockets that are not socket files
  Cygwin: fix fchown on sockets that are not socket files
  Cygwin: fix facl on sockets that are not socket files
  Cygwin: fix linkat(2) on sockets that are not socket files
  Cygwin: simplify linkat with AT_EMPTY_PATH

 winsup/cygwin/fhandler_socket_local.cc | 39 +++++++++++++-----
 winsup/cygwin/fhandler_socket_unix.cc  | 56 ++++++++++++++++----------
 winsup/cygwin/syscalls.cc              | 24 +++++++----
 3 files changed, 81 insertions(+), 38 deletions(-)

-- 
2.30.0



More information about the Cygwin-patches mailing list