You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Pervov (JIRA)" <ji...@apache.org> on 2006/12/05 13:53:21 UTC

[jira] Created: (HARMONY-2461) [classlib][security] Setting "no-go" security manager does not result in AccessControlException.

[classlib][security] Setting "no-go" security manager does not result in AccessControlException.
------------------------------------------------------------------------------------------------

                 Key: HARMONY-2461
                 URL: http://issues.apache.org/jira/browse/HARMONY-2461
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Pavel Pervov
         Attachments: test.java

The attached test prints "PASSED" on Sun and BEA VMs and "FAILED" on Harmony DRLVM:
-----
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)

PASSED
-----
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
 System optimized over throughput (initial strategy singleparpar))

PASSED
java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        at java.security.AccessController.checkPermission(AccessController.java:427)
        at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)V(Unknown Source)
        at test$1.checkPermission(test.java:8)
        at java.util.logging.LogManager.checkAccess(LogManager.java:927)
        at java.util.logging.LogManager.reset(LogManager.java:631)
        at java.util.logging.LogManager$Cleaner.run(LogManager.java:204)
-----
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r482136, (Dec  4 2006), Windows/ia32/msvc 1310, debug build
http://incubator.apache.org/harmony
FAILED

Notes:
1) Sun seems to reset SecurityManager for its internal operations on VM shutdown. BEA fails to acquire permissions for logging shutdown operations.
2) (off-topic) Both RIs prints empty line after version information
3) (off-topic) The URL printed by Harmony still points to incubator

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2461) [classlib][security] Setting "no-go" security manager does not result in AccessControlException.

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2461?page=comments#action_12455660 ] 
            
Pavel Pervov commented on HARMONY-2461:
---------------------------------------

Examining the stack shows that both Sun and BEA first set security manager and then fail on some internal operation (sun.net.InetAddressCachePolicy.<clinit>). The differences in stack traces most probably are derived from differences in implementation.

If out System.setSecurityManager does not do anything prohibited after setting new security manager - it should be considered as non-bug compatibility and IMHO closed as wontfix.

> [classlib][security] Setting "no-go" security manager does not result in AccessControlException.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2461
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2461
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Pervov
>         Attachments: test.java
>
>
> The attached test prints "PASSED" on Sun and BEA VMs and "FAILED" on Harmony DRLVM:
> -----
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
> PASSED
> -----
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> PASSED
> java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>         at java.security.AccessController.checkPermission(AccessController.java:427)
>         at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)V(Unknown Source)
>         at test$1.checkPermission(test.java:8)
>         at java.util.logging.LogManager.checkAccess(LogManager.java:927)
>         at java.util.logging.LogManager.reset(LogManager.java:631)
>         at java.util.logging.LogManager$Cleaner.run(LogManager.java:204)
> -----
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r482136, (Dec  4 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> FAILED
> Notes:
> 1) Sun seems to reset SecurityManager for its internal operations on VM shutdown. BEA fails to acquire permissions for logging shutdown operations.
> 2) (off-topic) Both RIs prints empty line after version information
> 3) (off-topic) The URL printed by Harmony still points to incubator

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-2461) [classlib][security] Setting "no-go" security manager does not result in AccessControlException.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov closed HARMONY-2461.
------------------------------------

    Resolution: Won't Fix

Closing as suggested

> [classlib][security] Setting "no-go" security manager does not result in AccessControlException.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2461
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2461
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Pavel Pervov
>         Assigned To: Alexey Varlamov
>         Attachments: test.java
>
>
> The attached test prints "PASSED" on Sun and BEA VMs and "FAILED" on Harmony DRLVM:
> -----
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
> PASSED
> -----
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> PASSED
> java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>         at java.security.AccessController.checkPermission(AccessController.java:427)
>         at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)V(Unknown Source)
>         at test$1.checkPermission(test.java:8)
>         at java.util.logging.LogManager.checkAccess(LogManager.java:927)
>         at java.util.logging.LogManager.reset(LogManager.java:631)
>         at java.util.logging.LogManager$Cleaner.run(LogManager.java:204)
> -----
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r482136, (Dec  4 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> FAILED
> Notes:
> 1) Sun seems to reset SecurityManager for its internal operations on VM shutdown. BEA fails to acquire permissions for logging shutdown operations.
> 2) (off-topic) Both RIs prints empty line after version information
> 3) (off-topic) The URL printed by Harmony still points to incubator

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2461) [classlib][security] Setting "no-go" security manager does not result in AccessControlException.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-2461:
-------------------------------------

    Component/s:     (was: Classlib)
                 Non-bug differences from RI

> [classlib][security] Setting "no-go" security manager does not result in AccessControlException.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2461
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2461
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Pavel Pervov
>         Assigned To: Alexey Varlamov
>         Attachments: test.java
>
>
> The attached test prints "PASSED" on Sun and BEA VMs and "FAILED" on Harmony DRLVM:
> -----
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
> PASSED
> -----
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> PASSED
> java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>         at java.security.AccessController.checkPermission(AccessController.java:427)
>         at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)V(Unknown Source)
>         at test$1.checkPermission(test.java:8)
>         at java.util.logging.LogManager.checkAccess(LogManager.java:927)
>         at java.util.logging.LogManager.reset(LogManager.java:631)
>         at java.util.logging.LogManager$Cleaner.run(LogManager.java:204)
> -----
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r482136, (Dec  4 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> FAILED
> Notes:
> 1) Sun seems to reset SecurityManager for its internal operations on VM shutdown. BEA fails to acquire permissions for logging shutdown operations.
> 2) (off-topic) Both RIs prints empty line after version information
> 3) (off-topic) The URL printed by Harmony still points to incubator

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-2461) [classlib][security] Setting "no-go" security manager does not result in AccessControlException.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-2461:
----------------------------------------

    Assignee: Alexey Varlamov

> [classlib][security] Setting "no-go" security manager does not result in AccessControlException.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2461
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2461
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Pervov
>         Assigned To: Alexey Varlamov
>         Attachments: test.java
>
>
> The attached test prints "PASSED" on Sun and BEA VMs and "FAILED" on Harmony DRLVM:
> -----
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
> PASSED
> -----
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> PASSED
> java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>         at java.security.AccessController.checkPermission(AccessController.java:427)
>         at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)V(Unknown Source)
>         at test$1.checkPermission(test.java:8)
>         at java.util.logging.LogManager.checkAccess(LogManager.java:927)
>         at java.util.logging.LogManager.reset(LogManager.java:631)
>         at java.util.logging.LogManager$Cleaner.run(LogManager.java:204)
> -----
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r482136, (Dec  4 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> FAILED
> Notes:
> 1) Sun seems to reset SecurityManager for its internal operations on VM shutdown. BEA fails to acquire permissions for logging shutdown operations.
> 2) (off-topic) Both RIs prints empty line after version information
> 3) (off-topic) The URL printed by Harmony still points to incubator

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2461) [classlib][security] Setting "no-go" security manager does not result in AccessControlException.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2461?page=comments#action_12455630 ] 
            
Alexey Varlamov commented on HARMONY-2461:
------------------------------------------

Why this is a bug? No operation in the test should cause any kind of throwable (OOME does not count, of course). 
I'd say this is a bug of RI...  Just look at BEA's stack trace: it actually set the manager and then thrown error - do you consider this as a reasonable behavior which we should copy?

> [classlib][security] Setting "no-go" security manager does not result in AccessControlException.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2461
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2461
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Pervov
>         Attachments: test.java
>
>
> The attached test prints "PASSED" on Sun and BEA VMs and "FAILED" on Harmony DRLVM:
> -----
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
> PASSED
> -----
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> PASSED
> java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>         at java.security.AccessController.checkPermission(AccessController.java:427)
>         at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)V(Unknown Source)
>         at test$1.checkPermission(test.java:8)
>         at java.util.logging.LogManager.checkAccess(LogManager.java:927)
>         at java.util.logging.LogManager.reset(LogManager.java:631)
>         at java.util.logging.LogManager$Cleaner.run(LogManager.java:204)
> -----
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r482136, (Dec  4 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> FAILED
> Notes:
> 1) Sun seems to reset SecurityManager for its internal operations on VM shutdown. BEA fails to acquire permissions for logging shutdown operations.
> 2) (off-topic) Both RIs prints empty line after version information
> 3) (off-topic) The URL printed by Harmony still points to incubator

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2461) [classlib][security] Setting "no-go" security manager does not result in AccessControlException.

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2461?page=comments#action_12455664 ] 
            
Pavel Pervov commented on HARMONY-2461:
---------------------------------------

Hm... It looks like "magic" "pass through the common operations" in our implementation of System.setSecurityManager() allows to avoid security exceptions.

> [classlib][security] Setting "no-go" security manager does not result in AccessControlException.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2461
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2461
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Pervov
>         Attachments: test.java
>
>
> The attached test prints "PASSED" on Sun and BEA VMs and "FAILED" on Harmony DRLVM:
> -----
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
> PASSED
> -----
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> PASSED
> java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>         at java.security.AccessController.checkPermission(AccessController.java:427)
>         at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)V(Unknown Source)
>         at test$1.checkPermission(test.java:8)
>         at java.util.logging.LogManager.checkAccess(LogManager.java:927)
>         at java.util.logging.LogManager.reset(LogManager.java:631)
>         at java.util.logging.LogManager$Cleaner.run(LogManager.java:204)
> -----
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r482136, (Dec  4 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> FAILED
> Notes:
> 1) Sun seems to reset SecurityManager for its internal operations on VM shutdown. BEA fails to acquire permissions for logging shutdown operations.
> 2) (off-topic) Both RIs prints empty line after version information
> 3) (off-topic) The URL printed by Harmony still points to incubator

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2461) [classlib][security] Setting "no-go" security manager does not result in AccessControlException.

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2461?page=all ]

Pavel Pervov updated HARMONY-2461:
----------------------------------

    Attachment: test.java

Test to verify the bug.

> [classlib][security] Setting "no-go" security manager does not result in AccessControlException.
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2461
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2461
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Pervov
>         Attachments: test.java
>
>
> The attached test prints "PASSED" on Sun and BEA VMs and "FAILED" on Harmony DRLVM:
> -----
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
> PASSED
> -----
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC:
>  System optimized over throughput (initial strategy singleparpar))
> PASSED
> java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>         at java.security.AccessController.checkPermission(AccessController.java:427)
>         at java.lang.SecurityManager.checkPermission(Ljava.security.Permission;)V(Unknown Source)
>         at test$1.checkPermission(test.java:8)
>         at java.util.logging.LogManager.checkAccess(LogManager.java:927)
>         at java.util.logging.LogManager.reset(LogManager.java:631)
>         at java.util.logging.LogManager$Cleaner.run(LogManager.java:204)
> -----
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r482136, (Dec  4 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> FAILED
> Notes:
> 1) Sun seems to reset SecurityManager for its internal operations on VM shutdown. BEA fails to acquire permissions for logging shutdown operations.
> 2) (off-topic) Both RIs prints empty line after version information
> 3) (off-topic) The URL printed by Harmony still points to incubator

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira