Re: RFR 8168091: jlink should check security permission early when programmatic access is used

2016-10-18 Thread Mandy Chung
+1 Mandy > On Oct 18, 2016, at 9:28 AM, Sundararajan Athijegannathan > wrote: > > Okay, removed shell script and using a security policy. Rest of the stuff is > same as previous webrev. > > http://cr.openjdk.java.net/~sundar/8168091/webrev.02/ > > -Sundar > > On 18/10/16, 7:40 PM, Mandy Ch

Re: RFR 8168091: jlink should check security permission early when programmatic access is used

2016-10-18 Thread Sundararajan Athijegannathan
Okay, removed shell script and using a security policy. Rest of the stuff is same as previous webrev. http://cr.openjdk.java.net/~sundar/8168091/webrev.02/ -Sundar On 18/10/16, 7:40 PM, Mandy Chung wrote: When policy tag is set, jtreg will generate the policy for the test to include the poli

Re: RFR 8168091: jlink should check security permission early when programmatic access is used

2016-10-18 Thread Mandy Chung
When policy tag is set, jtreg will generate the policy for the test to include the policy for jtreg. Since the test does not set it, maybe jtreg does not generate it (sounds like a bug). What is -Djava.security.policy set to in the jtreg test log? This may be a possible workaround: @run main

Re: RFR 8168091: jlink should check security permission early when programmatic access is used

2016-10-17 Thread Sundararajan Athijegannathan
Hi, Thanks for your review. I've updated webrev with jdk.tools.jlink -> jdk.tools.jlink.internal refactoring. But, when I attempted to get rid of shell script in the test with your suggestion, I got: Exception in thread "main" java.security.AccessControlException: access denied ("java.io.Fil

Re: RFR 8168091: jlink should check security permission early when programmatic access is used

2016-10-17 Thread Mandy Chung
> On Oct 17, 2016, at 10:23 AM, Sundararajan Athijegannathan > wrote: > > Please review http://cr.openjdk.java.net/~sundar/8168091/webrev.00/ for > https://bugs.openjdk.java.net/browse/JDK-8168091 The shell test can be removed and use @run main/othervm/secure=java.lang.SecurityManager You

Re: RFR 8168091: jlink should check security permission early when programmatic access is used

2016-10-17 Thread Jim Laskey (Oracle)
+1 > On Oct 17, 2016, at 2:23 PM, Sundararajan Athijegannathan > wrote: > > Please review http://cr.openjdk.java.net/~sundar/8168091/webrev.00/ for > https://bugs.openjdk.java.net/browse/JDK-8168091 > > Thanks, > > -Sundar >

RFR 8168091: jlink should check security permission early when programmatic access is used

2016-10-17 Thread Sundararajan Athijegannathan
Please review http://cr.openjdk.java.net/~sundar/8168091/webrev.00/ for https://bugs.openjdk.java.net/browse/JDK-8168091 Thanks, -Sundar