Skip to content

Commit 9266e0b

Browse files
Use Win32NamedPipeServerSocket constructor that accepts useJNI arg (#5)
1 parent 8824199 commit 9266e0b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

library/src/libdaemonjvm/internal/SocketMaker.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.scalasbt.ipcsocket.UnixDomainSocket;
99
import org.scalasbt.ipcsocket.Win32NamedPipeServerSocket;
1010
import org.scalasbt.ipcsocket.Win32NamedPipeSocket;
11+
import org.scalasbt.ipcsocket.Win32SecurityLevel;
1112

1213
public final class SocketMaker {
1314
private static boolean isWin = System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows");
@@ -16,7 +17,7 @@ public static Socket client(String path) throws IOException {
1617
else return new UnixDomainSocket(path, true);
1718
}
1819
public static ServerSocket server(String path) throws IOException {
19-
if (isWin) return new Win32NamedPipeServerSocket(path, true);
20+
if (isWin) return new Win32NamedPipeServerSocket(path, true, Win32SecurityLevel.LOGON_DACL);
2021
else return new UnixDomainServerSocket(path, true);
2122
}
2223
}

library/src/libdaemonjvm/internal/SocketMakerWindowsSubst.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.graalvm.nativeimage.Platforms;
1010
import org.scalasbt.ipcsocket.Win32NamedPipeServerSocket;
1111
import org.scalasbt.ipcsocket.Win32NamedPipeSocket;
12+
import org.scalasbt.ipcsocket.Win32SecurityLevel;
1213

1314
@TargetClass(className = "libdaemonjvm.internal.SocketMaker")
1415
@Platforms({Platform.WINDOWS.class})
@@ -19,6 +20,6 @@ public static Socket client(String path) throws IOException {
1920
}
2021
@Substitute
2122
public static ServerSocket server(String path) throws IOException {
22-
return new Win32NamedPipeServerSocket(path, true);
23+
return new Win32NamedPipeServerSocket(path, true, Win32SecurityLevel.LOGON_DACL);
2324
}
2425
}

0 commit comments

Comments
 (0)