Skip to content

Commit 781c242

Browse files
authored
Remove unnecessary temp dir access (#123314) (#123332)
All modules have read/write access to the temp dir. This commit removes unnecessarily adding the temp dir explicitly to the server policy.
1 parent 76fa38c commit 781c242

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ private static PolicyManager createPolicyManager() {
176176
new FilesEntitlement(
177177
List.of(
178178
// Base ES directories
179-
FileData.ofPath(bootstrapArgs.tempDir(), READ_WRITE),
180179
FileData.ofPath(bootstrapArgs.configDir(), READ),
181180
FileData.ofPath(bootstrapArgs.logsDir(), READ_WRITE),
182181
FileData.ofRelativePath(Path.of(""), DATA, READ_WRITE),
@@ -211,11 +210,7 @@ private static PolicyManager createPolicyManager() {
211210
new LoadNativeLibrariesEntitlement(),
212211
new ManageThreadsEntitlement(),
213212
new FilesEntitlement(
214-
List.of(
215-
FileData.ofPath(bootstrapArgs.configDir(), READ),
216-
FileData.ofPath(bootstrapArgs.tempDir(), READ),
217-
FileData.ofRelativePath(Path.of(""), DATA, READ_WRITE)
218-
)
213+
List.of(FileData.ofPath(bootstrapArgs.configDir(), READ), FileData.ofRelativePath(Path.of(""), DATA, READ_WRITE))
219214
)
220215
)
221216
),

0 commit comments

Comments
 (0)