From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2210) id 35CD03887033; Mon, 1 Feb 2021 14:59:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35CD03887033 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Ken Brown To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: recognize native Windows AF_UNIX sockets as reparse points X-Act-Checkin: newlib-cygwin X-Git-Author: Ken Brown X-Git-Refname: refs/heads/master X-Git-Oldrev: c09320552baa87601a3f52068283e4408d4c26b5 X-Git-Newrev: 05e2751665b19839ef35b555629d3ec1f72e5366 Message-Id: <20210201145914.35CD03887033@sourceware.org> Date: Mon, 1 Feb 2021 14:59:14 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2021 14:59:14 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=05e2751665b19839ef35b555629d3ec1f72e5366 commit 05e2751665b19839ef35b555629d3ec1f72e5366 Author: Ken Brown Date: Sat Jan 30 10:28:06 2021 -0500 Cygwin: recognize native Windows AF_UNIX sockets as reparse points Allow check_reparse_point_target to recognize reparse points with reparse tag IO_REPARSE_TAG_AF_UNIX. These are used in recent versions of Windows 10 to represent AF_UNIX sockets. check_reparse_point_target now returns PATH_REP on files of this type, so that they are treated as known reparse points (but not as sockets). This allows tools like 'rm', 'ls', etc. to operate on these files. Addresses: https://cygwin.com/pipermail/cygwin/2020-September/246362.html https://cygwin.com/pipermail/cygwin/2021-January/247666.html Diff: --- winsup/cygwin/path.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 6dc162806..9d2184d6a 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2640,6 +2640,10 @@ check_reparse_point_target (HANDLE h, bool remote, PREPARSE_DATA_BUFFER rp, return PATH_REP | PATH_REP_NOAPI; #endif } + else if (rp->ReparseTag == IO_REPARSE_TAG_AF_UNIX) + /* Native Windows AF_UNIX socket; recognize this as a reparse + point but not as a socket. */ + return PATH_REP; return 0; }