Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80176 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24742 invoked from network); 5 Jan 2015 16:11:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 16:11:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.171 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.171 mail-we0-f171.google.com Received: from [74.125.82.171] ([74.125.82.171:56575] helo=mail-we0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/70-21693-CB7BAA45 for ; Mon, 05 Jan 2015 11:11:41 -0500 Received: by mail-we0-f171.google.com with SMTP id u56so8188247wes.16 for ; Mon, 05 Jan 2015 08:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=lRzFhUeUx2xcAOKM1lDWVIPj0huHIawDhcZltYQEe1g=; b=DjBHQPySV2nfkcj4WO9GjUyrNQ/YxGkuGyRSXNPiDrEeSFCY17aUdQdfuMsqBBJXyW SaVmkrgzQo6vgH1WYZZlYSVwSTethtoh4Wwp3fRr5LL/QwUwU6Tl6ScHpewNtOe6LFRJ 6xl5Sno8ZrvgPcrhf/pqyHZGbdw6c9Oc5gK6Qc1RLVOVRRxGMzpIC+g4sqJIVc6R9BZ8 1mL7w4YfSxN1Zt87YrQ1cYP2k8UI/F/YLoZ7jhMj0mWx/V4fEBj5abaCv1mSyUqY03dP Auq9afho9g3BTQK8bNrUYJHglUxy8Jz0DGEFDtrVNK5bJRD+BYO12Q41YoAKChdFm7/X Vm7g== X-Received: by 10.194.234.40 with SMTP id ub8mr186021931wjc.100.1420474297338; Mon, 05 Jan 2015 08:11:37 -0800 (PST) Received: from [192.168.0.172] ([62.189.198.114]) by mx.google.com with ESMTPSA id cg8sm73846318wjc.1.2015.01.05.08.11.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 08:11:36 -0800 (PST) Message-ID: <54AAB794.7060802@gmail.com> Date: Mon, 05 Jan 2015 16:11:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: internals@lists.php.net References: <002d01d0281b$1e775730$5b660590$@tekwire.net> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Extension Prepend Files From: rowan.collins@gmail.com (Rowan Collins) Benjamin Eberlei wrote on 04/01/2015 13:00: > Files must be either in the PHP include path, or via absolute path, for > example by putting them right next to the shared object (.so) files and > using the extension_dir path inside the code, see the following for an > example (a hacked approach): > https://github.com/QafooLabs/php-profiler-extension/blob/master/qafooprofiler.c#L744 Beware that anything that looks in a configurable or environment-dependent list of include directories has the potential to open up security holes - anyone who can change that setting, or who has write access to a directory with higher priority, can inject code in a very broad context. It can also lead to surprising side effects if a file with the same name is coincidentally placed into more than one directory in the search path. I think if the intention is for extensions to ship these files directly, the registration mechanism should create an absolute path based either on a single configured directory, which distributors will set based on their installation paths, or on the directory containing the .so file being loaded. Regards, -- Rowan Collins [IMSoP]