Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 68797 invoked from network); 26 Oct 2006 14:13:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 14:13:27 -0000 Received: (qmail 41764 invoked by uid 500); 26 Oct 2006 14:13:38 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 41739 invoked by uid 500); 26 Oct 2006 14:13:38 -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 41722 invoked by uid 99); 26 Oct 2006 14:13:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Oct 2006 07:13:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Oct 2006 07:13:25 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 220947142D1 for ; Thu, 26 Oct 2006 07:12:19 -0700 (PDT) Message-ID: <24224803.1161871939136.JavaMail.root@brutus> Date: Thu, 26 Oct 2006 07:12:19 -0700 (PDT) From: "Paulex Yang (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-1963) [classlib][security] Harmony cannot read security policy file correctly In-Reply-To: <9649316.1161785116558.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/HARMONY-1963?page=comments#action_12444897 ] Paulex Yang commented on HARMONY-1963: -------------------------------------- Sorry, I forgot to add, it was applied at revision r468005.:) > [classlib][security] Harmony cannot read security policy file correctly > ----------------------------------------------------------------------- > > Key: HARMONY-1963 > URL: http://issues.apache.org/jira/browse/HARMONY-1963 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: Harmony classlib + IBM VME, windows XP+sp2 > Reporter: Paulex Yang > Assigned To: Paulex Yang > Attachments: patch.txt > > > I created simple a java.policy file[1], and try to run SecurityManagerTest with argument: > -Djava.security.manager -Dtest.bin.dir= -Djava.security.policy= > public class SecurityManagerTest { > public static void main(String[] args) throws Exception{ > System.out.println(System.getProperty("os.name")); //read access for this property has been granted by default policy > System.out.println(System.getProperty("notexist")); // no access for this property has been granted by default policy > } > } > RI prints: > Windows XP > null > Harmony prints: > Windows XP > K0319java.security.AccessControlException: Access denied (java.util.PropertyPermission notexist read) > at java.security.AccessController.checkPermission(AccessController.java:94) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:739) > at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:374) > at java.lang.System.getProperty(System.java:675) > at java.lang.System.getProperty(System.java:660) > at SecurityManagerTest.main(Unknown Source) > I got same results if add the content customized java.policy to default policy file without specifying policy file in cmd line. > [1] > grant codeBase "file:${test.bin.dir}/-" { > permission java.security.AllPermission; > }; -- 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