8186224: javax/management/remote/mandatory/subjectDelegation/* fail with java.security.AccessControlException
authoruvangapally
Tue, 29 Aug 2017 20:23:14 +0530
changeset 47018 7c8ff90abc22
parent 47017 b19dea422270
child 47019 06122340dbf7
8186224: javax/management/remote/mandatory/subjectDelegation/* fail with java.security.AccessControlException Summary: Edited policy files to grant permissions to all drives on windows Reviewed-by: hb, clanger Contributed-by: ujwal.vangapally@oracle.com
jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation1Test.java
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy11
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy12
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy13
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy14
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy15
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy16
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34
jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation1Test.java	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/SubjectDelegation1Test.java	Tue Aug 29 20:23:14 2017 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,17 +65,6 @@
 public class SubjectDelegation1Test {
 
     public static void main(String[] args) throws Exception {
-        // Check for supported operating systems: Solaris
-        //
-        // This test runs only on Solaris due to CR 6285916
-        //
-        String osName = System.getProperty("os.name");
-        System.out.println("os.name = " + osName);
-        if (!osName.equals("SunOS")) {
-            System.out.println("This test runs on Solaris only.");
-            System.out.println("Bye! Bye!");
-            return;
-        }
         String policyFile = args[0];
         String testResult = args[1];
         System.out.println("Policy file = " + policyFile);
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy11	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy11	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.delegate";
 };
 
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy12	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy12	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.delegate";
 };
 
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy13	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy13	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
 };
 
 grant principal javax.management.remote.JMXPrincipal "monitorRole" {
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy14	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy14	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
 };
 
 grant principal javax.management.remote.JMXPrincipal "monitorRole" {
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy15	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy15	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole";
 };
 
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy16	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy16	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.management.remote.SubjectDelegationPermission "javax.management.remote.JMXPrincipal.monitorRole";
 };
 
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy21	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
     permission java.security.SecurityPermission "createAccessControlContext";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy22	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
     permission java.lang.RuntimePermission "*";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy23	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
     permission java.lang.RuntimePermission "*";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy24	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.lang.RuntimePermission "*";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy25	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.lang.RuntimePermission "*";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy31	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
     permission java.lang.RuntimePermission "*";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy32	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
     permission java.lang.RuntimePermission "*";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy33	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
     permission java.lang.RuntimePermission "*";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy34	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.lang.RuntimePermission "*";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
--- a/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35	Tue Aug 29 07:16:49 2017 -0700
+++ b/jdk/test/javax/management/remote/mandatory/subjectDelegation/policy35	Tue Aug 29 20:23:14 2017 +0530
@@ -1,4 +1,4 @@
-grant codebase "file:/-" {
+grant {
     permission javax.security.auth.AuthPermission "createLoginContext.JMXPluggableAuthenticator";
     permission java.lang.RuntimePermission "*";
     permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";