RE: [PECL-DEV] Security and new Extension

From: Date: Mon, 11 Jul 2005 04:49:38 +0000
Subject: RE: [PECL-DEV] Security and new Extension
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-2594@lists.php.net to get a copy of this message
Wez, Thanks for the input. Yep. There appears to be a problem there. Looks like there is no separation between the threads. Testing this specific issue actually generated some interesting Apache crashes ;-) CGI isn't really an option for what we're doing, so I'm going to back off and think about this for a while. When I come up with something I'll play around with it and post if it looks promising. Thanks again! Dave -----Original Message----- From: Wez Furlong [mailto:kingwez@gmail.com] Sent: Thursday, July 07, 2005 12:13 PM To: David Patterson Cc: pecl-dev@lists.php.net Subject: Re: [PECL-DEV] Security and new Extension If you're running this from a threaded web server (Apache module, or IIS ISAPI) then you need to be aware of whether the UNC connection will be visible to, and/or conflict with the other threads. If it is isolated, then I think you're all set. If it's not, then you need to look at running a non-threaded PHP install (fastcgi) instead. --Wez. On 7/7/05, David Patterson <dpatterson@dplhenterprises.com> wrote: > 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. > > -- > PECL development discussion Mailing List (http://pecl.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PECL development discussion Mailing List (http://pecl.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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