Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 97304 invoked from network); 30 Jun 2009 13:43:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jun 2009 13:43:01 -0000 Received: (qmail 19001 invoked by uid 500); 30 Jun 2009 13:43:11 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 18950 invoked by uid 500); 30 Jun 2009 13:43:11 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 18942 invoked by uid 99); 30 Jun 2009 13:43:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 13:43:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 13:43:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6AFB3234C004 for ; Tue, 30 Jun 2009 06:42:47 -0700 (PDT) Message-ID: <995521643.1246369367427.JavaMail.jira@brutus> Date: Tue, 30 Jun 2009 06:42:47 -0700 (PDT) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3482) Investigate implementing the file matching logic in DatabasePermission using FilePermission In-Reply-To: <1700392913.1204296411209.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dag H. Wanvik updated DERBY-3482: --------------------------------- Component/s: Services > Investigate implementing the file matching logic in DatabasePermission using FilePermission > ------------------------------------------------------------------------------------------- > > Key: DERBY-3482 > URL: https://issues.apache.org/jira/browse/DERBY-3482 > Project: Derby > Issue Type: Sub-task > Components: Services > Reporter: Daniel John Debrunner > Priority: Minor > > Since the rules for the database path in DatabasePermission match FilePermission it might make sense to use the existing logic to determine the path instead of re-implementing complex logic. > I had a quick try that removed most of the code (always good) but I couldn't get the test SystemPrivilegesPermissionTest to run. > In initLocation after getting 'p' the only line needed was creating a file permission object. > String p = url.substring(URL_PROTOCOL_DIRECTORY.length()); > filePermission = new FilePermission(p.replace('/', File.separatorChar), "read"); > Then the implies method reduces to: > return filePermission.implies(that.filePermission); > and similar for hashCode and equals. > Once the major changes for DERBY-2109 have been committed it would be a good item to investigate. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.