-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Entitlements] Add URLConnection instrumentation for jar protocol #123861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 22 commits
304e1ab
0ed405d
7376a85
9e0209b
64a6ef6
4cd11c6
e0c50df
6a3e259
a4c2204
2b690f3
68e996e
9ad3a0c
2d21831
6579182
a407e99
07aa3c9
346f914
81b2169
c6966fd
47fe9bb
4dad7ce
ff547c3
589e710
6838ba9
11b9cb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,4 +81,11 @@ public static URLConnection createFileURLConnection() throws IOException { | |
| public static URLConnection createMailToURLConnection() throws URISyntaxException, IOException { | ||
| return new URI("mailto", "[email protected]", null).toURL().openConnection(); | ||
| } | ||
|
|
||
| public static URLConnection createJarURLConnection() throws IOException { | ||
| var tmpJarFile = Files.createFile(readWriteDir().resolve("entitlements-" + random.nextLong() + ".jar")); | ||
| var jarFileUrl = tmpJarFile.toUri().toURL(); | ||
| var jarUrl = URI.create("jar:" + jarFileUrl + "!/").toURL(); | ||
| return jarUrl.openConnection(); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,8 +154,10 @@ private static PolicyManager createPolicyManager() { | |
| serverModuleFileDatas, | ||
| // Base ES directories | ||
| FileData.ofPath(bootstrapArgs.pluginsDir(), READ), | ||
| FileData.ofPath(bootstrapArgs.modulesDir(), READ), | ||
ldematte marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| FileData.ofPath(bootstrapArgs.configDir(), READ), | ||
| FileData.ofPath(bootstrapArgs.logsDir(), READ_WRITE), | ||
| FileData.ofPath(bootstrapArgs.libDir(), READ), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this from native lib finding the platform dir? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC this was also started from PluginService; I guess you are correct and it is from plugins with native libraries, but I can double check. |
||
| FileData.ofRelativePath(Path.of(""), DATA, READ_WRITE), | ||
| FileData.ofRelativePath(Path.of(""), SHARED_REPO, READ_WRITE), | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.