removing functions?
| From: | Chuck Adams | Date: | Fri, 26 May 2000 22:13:37 +0000 |
| Subject: | removing functions? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19565@lists.php.net to get a copy of this message | ||
I'm helping to create a website creation system in PHP, which allows
some classes of authors to embed arbitrary PHP code. We do trust our
current authors to not stomp on anyone else's toes, but I'd like to
disable their access to the underlying system anyway, by disabling
filesystem access, system(), dl() and a number of other things once
the trusted portion of the script has run (which they have no control
over). Basically they'll get a db handle pre-opened for them that
lets them manage their persistent data there, and nothing else.
I was wondering how I might go about disabling functions at runtime?
Or if safe mode can be turned on (and of course not turned back off)
at runtime? The script has to do a number of "unsafe" things before
handing control over to user code, and pass some of results over to
it, so it's not really a simple matter of execing a script that is in
a safemode directory.
The documentation seems pretty clear on how to add new functions with
extensions, but not how to manage existing ones. Is this doable with,
say, an extension that meddles with the function table? If so, any
pointers on where I should start?
chuck (yeah another one)