You are here: Re: Security in an process started with exec « PHP Programming Language « IT news, forums, messages
Re: Security in an process started with exec

Posted by a on 01/19/06 18:39

>
> If your process contains arbitrary user-defined functionality, there's
> nothing you can do to define a sandbox for it. Arbitrary user-defined
> functionality may include switching to the superuser mode (e.g., su on
> Unix), which renders any sandbox meaningless.
>

I don't know how things work on Unix, but at least on Windows I think there
is a solution. Instead of calling exec to run the process that does the
actual work (P1), I create a thin executable (P2) that runs my process using
CreateProcessAsUser. This will run a process in the context of a specific
Windows user and which can be different from the user that is calling it.
Then in my php script I use exec to start P2, which will start P1 in a safe
context, assuming that the user in whose context is running has the
appropriate rights on the server.

I still have to try it, but it seems like a safe solution to me.

A

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация