Skip to content

Commit 7ad07c0

Browse files
committed
yet more debug
1 parent c7d7507 commit 7ad07c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/initialization/EntitlementInitialization.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ private static PolicyManager createPolicyManager() {
148148
Collections.addAll(
149149
serverModuleFileDatas,
150150
// Base ES directories
151-
FileData.ofPath(bootstrapArgs.tempDir(), READ_WRITE),
152151
FileData.ofPath(bootstrapArgs.configDir(), READ),
153152
FileData.ofPath(bootstrapArgs.logsDir(), READ_WRITE),
154153
FileData.ofRelativePath(Path.of(""), FilesEntitlement.BaseDir.DATA, READ_WRITE),
@@ -214,7 +213,6 @@ private static PolicyManager createPolicyManager() {
214213
new FilesEntitlement(
215214
List.of(
216215
FileData.ofPath(bootstrapArgs.configDir(), READ),
217-
FileData.ofPath(bootstrapArgs.tempDir(), READ),
218216
FileData.ofRelativePath(Path.of(""), FilesEntitlement.BaseDir.DATA, READ_WRITE)
219217
)
220218
)

libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/FileAccessTree.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ private FileAccessTree(FilesEntitlement filesEntitlement, PathLookup pathLookup)
5050

5151
// everything has access to the temp dir
5252
String tempDir = normalizePath(pathLookup.tempDir());
53+
logger.info("Adding temp dir [{}] to file access tree", tempDir);
5354
readPaths.add(tempDir);
5455
writePaths.add(tempDir);
5556

@@ -90,6 +91,7 @@ private static boolean checkPath(String path, String[] paths) {
9091
if (ndx < -1) {
9192
logger.warn("Couldn't find path [{}] in paths:\n{}", path, Arrays.asList(paths));
9293
String maybeParent = paths[-ndx - 2];
94+
logger.warn("Possible parent path: [{}]", maybeParent);
9395
return path.startsWith(maybeParent) && path.startsWith(FILE_SEPARATOR, maybeParent.length());
9496
}
9597
return ndx >= 0;

0 commit comments

Comments
 (0)