Skip to content

Commit c309b25

Browse files
committed
Revert "Workaround to always allow named pipes on windows"
This reverts commit c81d28d.
1 parent 51b6027 commit c309b25

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/api/ElasticsearchEntitlementChecker.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,19 +1118,9 @@ public void checkSelectorProviderInheritedChannel(Class<?> callerClass, Selector
11181118
policyManager.checkFileWrite(callerClass, file);
11191119
}
11201120

1121-
private static final boolean IS_WINDOWS = System.getProperty("os.name", "").startsWith("Windows");
1122-
1123-
private static boolean isNamedPipe(String fileName) {
1124-
return IS_WINDOWS && fileName.startsWith("\\\\.\\pipe\\");
1125-
}
1126-
11271121
@Override
11281122
public void check$java_io_FileInputStream$(Class<?> callerClass, File file) {
1129-
if (isNamedPipe(file.getAbsolutePath())) {
1130-
return;
1131-
}
11321123
policyManager.checkFileRead(callerClass, file);
1133-
11341124
}
11351125

11361126
@Override
@@ -1140,41 +1130,26 @@ private static boolean isNamedPipe(String fileName) {
11401130

11411131
@Override
11421132
public void check$java_io_FileInputStream$(Class<?> callerClass, String name) {
1143-
if (isNamedPipe(name)) {
1144-
return;
1145-
}
11461133
policyManager.checkFileRead(callerClass, new File(name));
11471134
}
11481135

11491136
@Override
11501137
public void check$java_io_FileOutputStream$(Class<?> callerClass, String name) {
1151-
if (isNamedPipe(name)) {
1152-
return;
1153-
}
11541138
policyManager.checkFileWrite(callerClass, new File(name));
11551139
}
11561140

11571141
@Override
11581142
public void check$java_io_FileOutputStream$(Class<?> callerClass, String name, boolean append) {
1159-
if (isNamedPipe(name)) {
1160-
return;
1161-
}
11621143
policyManager.checkFileWrite(callerClass, new File(name));
11631144
}
11641145

11651146
@Override
11661147
public void check$java_io_FileOutputStream$(Class<?> callerClass, File file) {
1167-
if (isNamedPipe(file.getAbsolutePath())) {
1168-
return;
1169-
}
11701148
policyManager.checkFileWrite(callerClass, file);
11711149
}
11721150

11731151
@Override
11741152
public void check$java_io_FileOutputStream$(Class<?> callerClass, File file, boolean append) {
1175-
if (isNamedPipe(file.getAbsolutePath())) {
1176-
return;
1177-
}
11781153
policyManager.checkFileWrite(callerClass, file);
11791154
}
11801155

0 commit comments

Comments
 (0)