8154192: Deprivilege java.scripting module

Reviewed-by: jlaskey, alanb
This commit is contained in:
Athijegannathan Sundararajan 2016-05-18 15:03:39 +05:30
parent c4976196f5
commit ea55d0b71b
2 changed files with 15 additions and 1 deletions

View File

@ -80,6 +80,10 @@ grant codeBase "jrt:/jdk.naming.dns" {
permission java.security.AllPermission;
};
grant codeBase "jrt:/java.scripting" {
permission java.security.AllPermission;
};
grant codeBase "jrt:/jdk.scripting.nashorn" {
permission java.security.AllPermission;
};

View File

@ -43,8 +43,18 @@ $JAR ${TESTTOOLVMOPTS} -cf ${TESTCLASSES}/dummy.jar \
-C ${TESTCLASSES} DummyScriptEngineFactory.class \
-C "${TESTSRC}" META-INF/services/javax.script.ScriptEngineFactory
echo "Running test ..."
echo "Running test with security manager ..."
$JAVA ${TESTVMOPTS} -Djava.security.manager -classpath \
"${TESTCLASSES}${PS}${TESTCLASSES}/dummy.jar" \
ProviderTest
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
echo "Running test without security manager ..."
$JAVA ${TESTVMOPTS} -classpath \
"${TESTCLASSES}${PS}${TESTCLASSES}/dummy.jar" \
ProviderTest