Derby
  1. Derby
  2. DERBY-6349

DaylightSavingTest - java.security.AccessControlException

    Details

      Description

      Seeing this test failure because of an intentional security change in TimeZone.setDefault(). Therefore need to wrap Timezone.setDefault in a priv block in the test.

      1) DaylightSavingTestjava.security.AccessControlException:
      Access denied ("java.util.PropertyPermission" "user.timezone"
      "write")
      at
      java.security.AccessController.throwACE(AccessController.java:10
      0)
      at <unknown class>.<unknown method>(Unknown
      Source)
      at
      java.lang.SecurityManager.checkPermission(SecurityManager.java:5
      49)
      at java.util.TimeZone.hasPermission(TimeZone.java:756)
      at java.util.TimeZone.setDefault(TimeZone.java:778)
      at
      org.apache.derbyTesting.junit.TimeZoneTestSetup.setUp(TimeZoneTe
      stSetup.java:59)
      at
      junit.extensions.TestSetup$1.protect(TestSetup.java:22)
      at junit.extensions.TestSetup.run(TestSetup.java:27)
      at
      org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.ja
      va:57)

        Issue Links

          Activity

          Kathey Marsden created issue -
          Kathey Marsden made changes -
          Field Original Value New Value
          Summary DaylightSavingTestjava.security.AccessControlException DaylightSavingTest - java.security.AccessControlException
          Hide
          Kathey Marsden added a comment -

          Attaching a patch for this issue. Wraps TimeZone.setDefault in a priv block.

          Show
          Kathey Marsden added a comment - Attaching a patch for this issue. Wraps TimeZone.setDefault in a priv block.
          Kathey Marsden made changes -
          Attachment TimeZoneSecurity_diff.txt [ 12603870 ]
          Hide
          ASF subversion and git services added a comment -

          Commit 1524579 from Kathey Marsden in branch 'code/trunk'
          [ https://svn.apache.org/r1524579 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException

          Show
          ASF subversion and git services added a comment - Commit 1524579 from Kathey Marsden in branch 'code/trunk' [ https://svn.apache.org/r1524579 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          Hide
          ASF subversion and git services added a comment -

          Commit 1525671 from Kathey Marsden in branch 'code/branches/10.10'
          [ https://svn.apache.org/r1525671 ]

          DERBY-6349 - DaylightSavingTest - java.security.AccessControlException

          Show
          ASF subversion and git services added a comment - Commit 1525671 from Kathey Marsden in branch 'code/branches/10.10' [ https://svn.apache.org/r1525671 ] DERBY-6349 - DaylightSavingTest - java.security.AccessControlException
          Kathey Marsden made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 10.10.1.3 [ 12324247 ]
          Fix Version/s 10.11.0.0 [ 12324243 ]
          Resolution Fixed [ 1 ]
          Myrna van Lunteren made changes -
          Link This issue relates to DERBY-6356 [ DERBY-6356 ]
          Hide
          Mamta A. Satoor added a comment - - edited

          Not sure if the following failure on 10.9 with IBM jdk 1.6 is related to this jira. This failure is on 10.9 codeline(1540252) where the fix for this jira has not been backported.
          http://people.apache.org/~myrnavl/derby_test_results/v10_9/windows/testlog/ibm16/1539514-suites.All_diff.txt
          http://people.apache.org/~myrnavl/derby_test_results/v10_9/windows/testlog/ibm16/1540252-suites.All_diff.txt

          1) DaylightSavingTestjava.security.AccessControlException: Access denied (java.util.PropertyPermission user.timezone write)
          at java.security.AccessController.throwACE(AccessController.java:100)
          at <unknown class>.<unknown method>(Unknown Source)
          at java.lang.SecurityManager.checkPermission(SecurityManager.java:544)
          at java.util.TimeZone.hasPermission(TimeZone.java:676)
          at java.util.TimeZone.setDefault(TimeZone.java:698)
          at org.apache.derbyTesting.junit.TimeZoneTestSetup.setUp(TimeZoneTestSetup.java:59)
          at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
          at junit.extensions.TestSetup.run(TestSetup.java:25)
          at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)

          Show
          Mamta A. Satoor added a comment - - edited Not sure if the following failure on 10.9 with IBM jdk 1.6 is related to this jira. This failure is on 10.9 codeline(1540252) where the fix for this jira has not been backported. http://people.apache.org/~myrnavl/derby_test_results/v10_9/windows/testlog/ibm16/1539514-suites.All_diff.txt http://people.apache.org/~myrnavl/derby_test_results/v10_9/windows/testlog/ibm16/1540252-suites.All_diff.txt 1) DaylightSavingTestjava.security.AccessControlException: Access denied (java.util.PropertyPermission user.timezone write) at java.security.AccessController.throwACE(AccessController.java:100) at <unknown class>.<unknown method>(Unknown Source) at java.lang.SecurityManager.checkPermission(SecurityManager.java:544) at java.util.TimeZone.hasPermission(TimeZone.java:676) at java.util.TimeZone.setDefault(TimeZone.java:698) at org.apache.derbyTesting.junit.TimeZoneTestSetup.setUp(TimeZoneTestSetup.java:59) at junit.extensions.TestSetup$1.protect(TestSetup.java:20) at junit.extensions.TestSetup.run(TestSetup.java:25) at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
          Hide
          Kathey Marsden added a comment -

          Note: Commit 1525671 is the correct 10.10 commit for this issue. 1526486 was for another issue with an incorrect comment (now corrected in svn), but cannot delete the comment in this issue.

          Show
          Kathey Marsden added a comment - Note: Commit 1525671 is the correct 10.10 commit for this issue. 1526486 was for another issue with an incorrect comment (now corrected in svn), but cannot delete the comment in this issue.
          Hide
          ASF subversion and git services added a comment -

          Commit 1540805 from Kathey Marsden in branch 'code/branches/10.9'
          [ https://svn.apache.org/r1540805 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from 10.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1540805 from Kathey Marsden in branch 'code/branches/10.9' [ https://svn.apache.org/r1540805 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException merge revision 1525671 from 10.10 branch
          Hide
          ASF subversion and git services added a comment -

          Commit 1540812 from Kathey Marsden in branch 'code/branches/10.8'
          [ https://svn.apache.org/r1540812 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from 10.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1540812 from Kathey Marsden in branch 'code/branches/10.8' [ https://svn.apache.org/r1540812 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException merge revision 1525671 from 10.10 branch
          Hide
          ASF subversion and git services added a comment -

          Commit 1540817 from Kathey Marsden in branch 'code/branches/10.7'
          [ https://svn.apache.org/r1540817 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from 10.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1540817 from Kathey Marsden in branch 'code/branches/10.7' [ https://svn.apache.org/r1540817 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException merge revision 1525671 from 10.10 branch
          Hide
          ASF subversion and git services added a comment -

          Commit 1540820 from Kathey Marsden in branch 'code/branches/10.6'
          [ https://svn.apache.org/r1540820 ]

          DERBY-6349 DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from 10.10 branch

          Show
          ASF subversion and git services added a comment - Commit 1540820 from Kathey Marsden in branch 'code/branches/10.6' [ https://svn.apache.org/r1540820 ] DERBY-6349 DaylightSavingTest - java.security.AccessControlException merge revision 1525671 from 10.10 branch
          Hide
          Kathey Marsden added a comment -

          backported to 10.6. Test does not exist in older branches.

          Show
          Kathey Marsden added a comment - backported to 10.6. Test does not exist in older branches.
          Kathey Marsden made changes -
          Fix Version/s 10.6.2.2 [ 12315370 ]
          Fix Version/s 10.7.1.4 [ 12315902 ]
          Fix Version/s 10.8.3.1 [ 12323475 ]
          Fix Version/s 10.9.2.2 [ 12323562 ]
          Knut Anders Hatlen made changes -
          Comment [ Commit 1526486 from [~kmarsden] in branch 'code/branches/10.10'
          [ https://svn.apache.org/r1526486 ]

          DERBY-6349 - DaylightSavingTest - java.security.AccessControlException
          merge revision 1525671 from trunk ]
          Hide
          Knut Anders Hatlen added a comment -

          I deleted the comment with the incorrect commit message for revision 1526486 (which should have gone to DERBY-5610) to avoid confusion.

          Show
          Knut Anders Hatlen added a comment - I deleted the comment with the incorrect commit message for revision 1526486 (which should have gone to DERBY-5610 ) to avoid confusion.
          Myrna van Lunteren made changes -
          Component/s Test [ 11413 ]
          Myrna van Lunteren made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Myrna van Lunteren made changes -
          Fix Version/s 10.10.2.0 [ 12326659 ]
          Fix Version/s 10.10.1.4 [ 12324247 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          5d 28m 1 Kathey Marsden 23/Sep/13 19:36
          Resolved Resolved Closed Closed
          182d 4h 31m 1 Myrna van Lunteren 24/Mar/14 23:08

            People

            • Assignee:
              Kathey Marsden
              Reporter:
              Kathey Marsden
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development