Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 31241 invoked from network); 1 Nov 2006 10:05:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2006 10:05:43 -0000 Received: (qmail 64280 invoked by uid 500); 1 Nov 2006 10:05:51 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 64247 invoked by uid 500); 1 Nov 2006 10:05:51 -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 64195 invoked by uid 99); 1 Nov 2006 10:05:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 02:05:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 02:05:39 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DE8E57142C1 for ; Wed, 1 Nov 2006 02:05:18 -0800 (PST) Message-ID: <20609345.1162375518909.JavaMail.root@brutus> Date: Wed, 1 Nov 2006 02:05:18 -0800 (PST) From: "Alexey Varlamov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-1674) [classlib][luni/security] Tests depend on presence of ~/.java.policy file In-Reply-To: <28089709.1159878620823.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-1674?page=comments#action_12446192 ] Alexey Varlamov commented on HARMONY-1674: ------------------------------------------ Verified on DRLVM. > [classlib][luni/security] Tests depend on presence of ~/.java.policy file > -------------------------------------------------------------------------- > > Key: HARMONY-1674 > URL: http://issues.apache.org/jira/browse/HARMONY-1674 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Alexey Varlamov > Assigned To: Tim Ellison > Priority: Minor > Attachments: patch-luni.txt, patch-security.txt > > > Some security-related testcases are vulnerable to presence of ~/.java.policy file. > To reproduce, create ".java.policy" file in your home dir with the following context: > --- > grant { permission java.security.AllPermission; }; > --- > Then run all tests of classlib: > > junit.framework.AssertionFailedError: This should throw a SecurityException. > at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_checkMemberAccessLjava_lang_ClassI(SecurityManagerTest.java:39) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) > > > > junit.framework.AssertionFailedError: This should throw a SecurityException > at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_checkPermissionLjava_security_Permission(SecurityManagerTest.java:59) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) > > > > junit.framework.AssertionFailedError: expected SecurityException > at tests.api.java.net.InetAddressTest.test_getAllByNameLjava_lang_String(InetAddressTest.java:191) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) > > > > junit.framework.AssertionFailedError: Got AllPermission by passing in a null PD > at org.apache.harmony.security.tests.java.security.AccessController2Test.test_doPrivilegedLjava_security_PrivilegedAction(AccessController2Test.java:49) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) > > > > junit.framework.AssertionFailedError: We shouldn't have been able to get the policy with a SecurityManager in place! > at org.apache.harmony.security.tests.java.security.Policy2Test.test_getPolicy(Policy2Test.java:63) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) > > -- 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