RFR: 8259014: (so) ServerSocketChannel.bind(UnixDomainSocketAddress)/SocketChannel.bind(UnixDomainSocketAddress) will have unknown user and group owner (win)

Michael McMahon michaelm at openjdk.java.net
Thu Jan 7 21:19:01 UTC 2021


On Thu, 7 Jan 2021 20:05:09 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Hi,
>> 
>> Could I get the following fix reviewed please? There is a bug in Windows (2019) relating to the handling of Unix domain socket files such that special file options have to be used when opening the files. This causes problems for Cygwin and the Java file APIs. The bug has been fixed in more recent Windows builds. So, Windows 10 is not affected, but the fix here is to disable support for Unix domain sockets in the affected Windows builds. More recent Windows Server versions are probably not affected either.
>> 
>> Thanks
>> Michael
>
> src/java.base/windows/native/libnio/ch/UnixDomainSockets.c line 110:
> 
>> 108:     if (osver.dwBuildNumber < 18362) {
>> 109:         return JNI_FALSE;
>> 110:     }
> 
> Can you use VerifyVersionInfoW instead of the deprecated GetVersionEx? The IsWindows10RS3OrGreater function in net_util_md.c is a recent example.

It looks like VerifyVersionInfoW is (or will be) deprecated also and it seems like quite a complicated API that checks the same thing in this case.

https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-verifyversioninfow

-------------

PR: https://git.openjdk.java.net/jdk/pull/1986


More information about the nio-dev mailing list