Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 53092 invoked from network); 4 May 2006 12:36:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 May 2006 12:36:55 -0000 Received: (qmail 43678 invoked by uid 500); 4 May 2006 12:36:54 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 43645 invoked by uid 500); 4 May 2006 12:36:54 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 43634 invoked by uid 99); 4 May 2006 12:36:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2006 05:36:54 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2006 05:36:53 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 96F0E410009 for ; Thu, 4 May 2006 12:36:19 +0000 (GMT) Message-ID: <5455109.1146746179615.JavaMail.jira@brutus> Date: Thu, 4 May 2006 12:36:19 +0000 (GMT+00:00) From: "Tim Ellison (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Closed: (HARMONY-280) Customized SecurityManager cannot cooperate with AccessController correctly In-Reply-To: <1596903468.1143717266070.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-280?page=all ] Tim Ellison closed HARMONY-280: ------------------------------- No response from reporter. Assuming ok and marking as closed. > Customized SecurityManager cannot cooperate with AccessController correctly > --------------------------------------------------------------------------- > > Key: HARMONY-280 > URL: http://issues.apache.org/jira/browse/HARMONY-280 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Paulex Yang > Priority: Critical > > when user set a customized SecurityManager, which extends java.lang.SecurityManager, as the system-wide security manager, any security check fails in a stack overflow. This issue only happens when customized SecurityManager isn't located in bootstrap classpath. > Following testcases reproduce this problem (suppose the test has permission to set securitymanager): > public class securityTest extends TestCase { > public void test_MockSecurityManager() throws Exception { > SecurityManager old = System.getSecurityManager(); > System.setSecurityManager(new MockSecurityManager()); > try { > System.getProperty("os.name"); > } catch (SecurityException e) { > } finally { > System.setSecurityManager(old); > } > } > public class MockSecurityManager extends SecurityManager { > public void checkPermission(Permission perm) { > if (perm.getName().equals("setSecurityManager")) { > return; > } > super.checkPermission(perm); > } > } > } > test runs smoothly on RI 5.0 , but fails with a StackOverflowError on Harmony -- 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