]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: fix facl on sockets that are not socket files
authorKen Brown <kbrown@cornell.edu>
Mon, 22 Feb 2021 15:13:09 +0000 (10:13 -0500)
committerKen Brown <kbrown@cornell.edu>
Thu, 25 Feb 2021 22:44:18 +0000 (17:44 -0500)
commit012427c96eccd195b60cd61f3817f550f6563275
treed09910ce733197f37e0ea9250fac4d66c7fbfe53
parentcb0e71d3f8e0d1a60f36efc48b57864f1ef6efa7
Cygwin: fix facl on sockets that are not socket files

If facl(2) is called on an AF_LOCAL or AF_UNIX socket that is not a
socket file, the current code calls fhandler_disk_file::facl in most
cases.  The latter expects to be operating on a disk file and uses the
socket's io_handle, which is not a file handle.

Fix this by calling fhandler_disk_file::facl only if the
fhandler_socket object is a file (determined by testing dev().isfs()).
winsup/cygwin/fhandler_socket_local.cc
winsup/cygwin/fhandler_socket_unix.cc
This page took 0.0301 seconds and 5 git commands to generate.