Skip to content

Commit 2115aad

Browse files
authored
Merge pull request #318 from lahodaj/jep-486
Disable SecurityManager
2 parents 1861da0 + 33f604f commit 2115aad

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

build.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
patches/remove-db.diff
6666
patches/nbjavac-not-required.diff
6767
patches/l10n-licence.diff
68+
patches/no-security-manager-allow.diff
6869
</string>
6970
<filterchain>
7071
<tokenfilter delimoutput=" ">
@@ -109,6 +110,8 @@
109110
<move file="${lsp.build.dir}/platform/lib/nbexec" tofile="${lsp.build.dir}/platform/lib/nbexec.sh" />
110111
<replace file="${lsp.build.dir}/bin/nbcode.sh" token="/platform*/lib/nbexec" value="/platform*/lib/nbexec.sh"/>
111112
<replace file="${lsp.build.dir}/bin/nbcode.sh" token="basename &quot;$PRG&quot;" value="basename &quot;$PRG&quot; &quot;.sh&quot;"/>
113+
<replace file="${lsp.build.dir}/platform/lib/nbexec.dll" token="java.security.manager" value="no.java.secur.manager" encoding="ISO-8859-1"/>
114+
<replace file="${lsp.build.dir}/platform/lib/nbexec64.dll" token="java.security.manager" value="no.java.secur.manager" encoding="ISO-8859-1"/>
112115
<chmod file="${lsp.build.dir}/bin/nbcode.sh" perm="u+x" />
113116
<chmod file="${lsp.build.dir}/platform/lib/nbexec.sh" perm="u+x"/>
114117
<chmod file="${lsp.build.dir}/java/maven/bin/mvn.sh" perm="u+x" />
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/platform/o.n.bootstrap/launcher/unix/nbexec b/platform/o.n.bootstrap/launcher/unix/nbexec
2+
index 1d6ad6e530..228b37cbe2 100755
3+
--- a/platform/o.n.bootstrap/launcher/unix/nbexec
4+
+++ b/platform/o.n.bootstrap/launcher/unix/nbexec
5+
@@ -192,7 +192,7 @@ fi
6+
# rename old heap dump to .old
7+
mv "${userdir}/var/log/heapdump.hprof" "${userdir}/var/log/heapdump.hprof.old" > /dev/null 2>&1
8+
9+
-jargs_without_clusters="$jargs -Djava.security.manager=allow"
10+
+jargs_without_clusters="$jargs"
11+
jargs="-Dnetbeans.dirs=\"${clusters}\" $jargs_without_clusters"
12+
13+
if [ -z "$cachedirspecified" ]; then

vscode/src/lsp/launchOptions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ const extraLaunchOptions = [
5353
"-J-XX:PerfMaxStringConstLength=10240",
5454
"--locale", l10n.nbLocaleCode(),
5555
"--start-java-language-server=listen-hash:0",
56-
"--start-java-debug-adapter-server=listen-hash:0"
56+
"--start-java-debug-adapter-server=listen-hash:0",
57+
"-J-DTopSecurityManager.disable=true"
5758
];
5859

5960
const prepareUserConfigLaunchOptions = (): string[] => {

0 commit comments

Comments
 (0)