Uploaded image for project: '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)

      Attachments

        1. TimeZoneSecurity_diff.txt
          1 kB
          Katherine Marsden

        Issue Links

          Activity

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

            kmarsden Katherine Marsden added a comment - Attaching a patch for this issue. Wraps TimeZone.setDefault in a priv block.

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

            DERBY-6349 DaylightSavingTest - java.security.AccessControlException

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

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

            DERBY-6349 - DaylightSavingTest - java.security.AccessControlException

            jira-bot ASF subversion and git services added a comment - Commit 1525671 from kmarsden in branch 'code/branches/10.10' [ https://svn.apache.org/r1525671 ] DERBY-6349 - DaylightSavingTest - java.security.AccessControlException
            mamtas 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)

            mamtas 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)

            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.

            kmarsden Katherine 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.

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

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

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

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

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

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

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

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

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

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

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

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

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

            kmarsden Katherine Marsden added a comment - backported to 10.6. Test does not exist in older branches.

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

            knutanders 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.

            People

              kmarsden Katherine Marsden
              kmarsden Katherine Marsden
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: