develooper Front page | perl.perl5.porters | Postings from April 2001

April 30, 2001 00:33
Message ID:
Hello Tim,

I'm using the module in a situation where I need to be able to sometimes break out of the safe compartment to execute only my specific shared functions.

I'm finding that the shared functions also execute inside the safe compartment with the same opcode restrictions as the compartment itself.  I have tried the Safe::Hole module found on CPAN but it only allows the code to execute outside the compartment.  It is still under the same opcode restrictions as the compartment.

I was wondering if there is a way to get shared functions to execute in the normal program space with the normal full opcodes.  That way from inside the compartment restricted access could be given to specific shared function calls.

For example supposing I didn't want the code in the compartment to be able to access the file system.  I would restrict all the opcodes so that no file access was possible.  But suppose also that I wanted to allow access to just one or two specific files in the file system.  I would like to be able to write a wrapper read_myfile() write_myfile() functions that would execute outside the compartment and have all the opcodes available to it so that they could access the files and do what they need with them.

Whew..I hope that made sense to you?  It's hard to explain but its very simple once you get it.

Anyhow, I hope that you might be able to shed some light on the subject.  I have been at this for weeks now and no one on #perl seems to know anything about and I haven't had much luck with the search engines.  I'm writing to you as a last resort.

Thanks for your time :)

Joel Appelbaum Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About