We need a Plugin Security Model.
This way it would be a lot easier to run code in plugins and avoid problems with HostileUsers and MaliciousBugs
Probably a virtual environment would do (Plex86, UserModeLinux ...)
Else a chrooted environment ... Jail is a tool to prepare chrooted environments for a lot of users.
We could create the personal directory of each user with Jail
then run plugins in the user directory with the user's uid/guid