Security and new Extension

From: Date: Thu, 07 Jul 2005 16:40:16 +0000
Subject: Security and new Extension
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-2568@lists.php.net to get a copy of this message
PECL Developers, I have written the first version of an extension that we need within our intranet and am considering releasing it to PECL. Before I release it, though, I want to consider the security implications and implement whatever is appropriate. To that end, I am asking for opinions. This extension is Windows-specific. It allows a PHP script to connect to one or more Windows network shares and then access the files on the shares using UNC-style file names. The shares can be explicitly disconnected by the PHP script and are automatically disconnected at request shutdown. I am of two minds regarding security and this extension. On the one hand, it doesn't seem like it needs anything special beyond the auto-disconnect that it already provides. The system administrator must explicitly change the Apache (or whatever) service to run as a non-standard user and grant network privileges to that user. This is required because the default Windows service user (LocalSystem) cannot access network shares. Additionally, the PHP programmer must supply a valid username and password to successfully connect to a share. To my mind, this is similar to accessing MySQL. On the other hand, it seems like the kind of thing that might be disabled under safe mode and I'm sure that people will have concerns about it. Please bear in mind that I am _not_ looking for opinions about the general usefulness or appropriateness of this extension. We have had a repeated need for this capability so I implemented it. I have seen many questions about how to accomplish this on the php-windows list so I know that there is an interest in the functionality. I just want to do what I can to prevent people from shooting themselves in the foot with aiming at it first. Other than that, thoughts are most welcome. Thanks in advance David M. Patterson Consulting Software Engineer DP Consulting   p.s. If anyone is interested in more information about the extension, just drop me a line off-list.

« previous php.pecl.dev (#2568) next »