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
This commit is contained in:
Ken Brown 2021-01-30 10:28:06 -05:00
parent c09320552b
commit 05e2751665
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}