Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26641 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26940 invoked by uid 1010); 16 Nov 2006 14:30:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26924 invoked from network); 16 Nov 2006 14:30:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2006 14:30:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=kingwez@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kingwez@gmail.com; sender-id=pass; domainkeys=good Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.182.190 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kingwez@gmail.com X-Host-Fingerprint: 64.233.182.190 nf-out-0910.google.com Linux 2.4/2.6 Received: from [64.233.182.190] ([64.233.182.190:16951] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/41-01084-AE57C554 for ; Thu, 16 Nov 2006 09:30:03 -0500 Received: by nf-out-0910.google.com with SMTP id l35so1130249nfa for ; Thu, 16 Nov 2006 06:29:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PWC2qeb/pAI0HTfxkn9DYVxm1dpzmYM0c5JDFDiEhOCvQDOD+BUqqx/Cx3C0SaJL9V96f68w8CDEbNJU0vkK1t2uetGirctcqPNHVIox41e6sQaBXlBkuamuB7sSmRlrK1YmOZi7rAmodmTuwvoaDgAbhEUSgz2Z8GtlMFfV6m8= Received: by 10.82.139.17 with SMTP id m17mr68491bud.1163687399127; Thu, 16 Nov 2006 06:29:59 -0800 (PST) Received: by 10.82.167.13 with HTTP; Thu, 16 Nov 2006 06:29:58 -0800 (PST) Message-ID: <4e89b4260611160629o1855ed28pf37139f1576fa99b@mail.gmail.com> Date: Thu, 16 Nov 2006 09:29:58 -0500 To: "Mario Wolff" Cc: internals@lists.php.net In-Reply-To: <9bb5e33f0611160505u2ac2b1dbt1b04feea4314331c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9bb5e33f0611160505u2ac2b1dbt1b04feea4314331c@mail.gmail.com> Subject: Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE From: kingwez@gmail.com ("Wez Furlong") Two comments about the patch: - could you create a unified diff and post that instead? - static local variable usage is not thread safe; state should be stored in the pdo_dbh_t structure. And one concern: I deliberately left this feature unimplemented so far because the authorization callback will happen "a lot", and frequent callbacks into PHP script will make things slower. I suggest that you adjust your patch to cache the function callback information in the pdo_dbh_t to reduce some of that overhead, and run some benchmarks for a simple authorizer function in PHP that always returns true vs the same script with no authorizer, so that we get a feel for what kind of impact that has for various common queries. One other thing that is important is to ensure that the PHP safe_mode/open_basedir checks have higher priority than the PHP script callback. If safe_mode/open_basedir decide that the path is not accessible, then the PHP script must not be able to override that. However, if safe_mode/open_basedir say that access is ok, the PHP script can optionally override that decision. --Wez. On 11/16/06, Mario Wolff wrote: > Hello list, > i've extended sqlite_driver to get access to the authorizer-feature of > sqlite. This is my first contact with the Zend-API and my last c skill > is more than a bit outdated. > Could someone review/cleanup my code to get it merged to the > distribution? Hint and comment welcome! > Thanks, > Mario Wolff > > PS: Patch applys against 5.2.0! > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > >