Re: overriding builtin functions for sandboxing (Re: Safe.pm examples?)

2002-10-10 Thread david
David Garamond wrote: > i've been playing with Safe.pm for the past two days, and it's really > giving me headaches :-) i can't seem to do anything really useful with > it. the namespace "chroot"-ing makes me unable to use pretty much every > extension module

overriding builtin functions for sandboxing (Re: Safe.pm examples?)

2002-10-10 Thread David Garamond
i've been playing with Safe.pm for the past two days, and it's really giving me headaches :-) i can't seem to do anything really useful with it. the namespace "chroot"-ing makes me unable to use pretty much every extension modules i want to use. dynamic loading also

Re: Safe.pm examples?

2002-10-08 Thread Steve Grazzini
David <[EMAIL PROTECTED]> wrote: > Steve Grazzini wrote: >> >> And besides, open() is not particularly easy to >> override. You'd have to account for all of: >> >> open FH, $path; >> open FH, "> $path"; >> open FH, ">", $path; >> open FH, ">", \$sstream; >> open FH, "command |"; >> o

Re: Safe.pm examples?

2002-10-08 Thread david
Steve Grazzini wrote: > > And besides, open() is not particularly easy to > override. You'd have to account for all of: > > open FH, $path; > open FH, "> $path"; > open FH, ">", $path; > open FH, ">", \$sstream; > open FH, "command |"; > open FH, "| command"; i don't recommand peo

Re: Safe.pm examples?

2002-10-07 Thread Steve Grazzini
David Garamond <[EMAIL PROTECTED]> wrote: > david wrote: >> sub main::open{ >> #-- testing purpose >> if($_[0] =~ m#^/#){ >> die("Access under / not allowed\n"); >> }else{ >> open(FILE,$_[0]) || die $!; >> return FILE; >>

Re: Safe.pm examples?

2002-10-07 Thread David Garamond
i wonder if there is a way we can do this wrapping with the 'require' opcode top. i.e., i want to allow the 'require' opcode but trap every 'require' statements through my checking subroutine, which will only allow certain perl modules to be imported by the untrusted code. -- dave David Garam

Re: Safe.pm examples?

2002-10-07 Thread David Garamond
david wrote: > sub main::open{ > #-- testing purpose > if($_[0] =~ m#^/#){ > die("Access under / not allowed\n"); > }else{ > open(FILE,$_[0]) || die $!; > return FILE; > } > } > > my $fh = &open('whatever'); oh, i di

Re: Safe.pm examples?

2002-10-07 Thread John W. Krahn
David wrote: > > i am not aware of any module that masks Perl functions. you can create your > own though. > > sub main::open{ > > [snip] perldoc perlsub [snip] Overriding Built-in Functions Many built-in functions may be overridden, though this should be tried only occas

Re: Safe.pm examples?

2002-10-07 Thread david
David Garamond wrote: > david wrote: >> i won't say it's broken, it's just that the Safe.pm is not finalized yet >> and thus will undergo(probably) major changes even in the interface >> level. example: > > thanks for providing the example, david. i&#x

Re: Safe.pm examples?

2002-10-07 Thread David Garamond
david wrote: > i won't say it's broken, it's just that the Safe.pm is not finalized yet and > thus will undergo(probably) major changes even in the interface level. > example: thanks for providing the example, david. i've been reading the Safe.pm and the Opcode d

Re: Safe.pm examples?

2002-10-07 Thread david
David Garamond wrote: > i'm looking for something like a sandbox/compartment (like rexec module > in python) so that i can be [reasonably] confident running untrusted > snippets of code from inside the same process. > > Safe.pm seems like the perl way of doing it, right?

Safe.pm examples?

2002-10-05 Thread David Garamond
i'm looking for something like a sandbox/compartment (like rexec module in python) so that i can be [reasonably] confident running untrusted snippets of code from inside the same process. Safe.pm seems like the perl way of doing it, right? however, from what i skimmed from the posts i got

perl version skew not a Safe problem? Re: Safe.pm

2002-08-26 Thread drieux
> dynamic loading or has the Data::Dumper module statically linked into > it.) > at file.pl line 2 > Compilation failed in require at file.pl line 2. > BEGIN failed--compilation aborted at file.pl line 2. > > any idea? I rather think that you have some sort of version skew

Safe.pm

2002-08-26 Thread Avi Nehori
Hi, In general I'm trying to do something like that: 1. create a safe compartment . 2. inherit certain variables/methods and objects to the new compartment. 3. apply few limitations to the compartment. 4. execute code under the new compartment via safe rdo() method which can execute perl co

Re: Safe.pm

2002-08-25 Thread drieux
purpose of the Safe.pm - have you tried it? and if so what are the error's that you are getting? ciao drieux http://www.wetware.com/drieux/pbl/ -- This space left intentionally blank. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Safe.pm

2002-08-22 Thread drieux
On Thursday, August 22, 2002, at 01:06 , Avi Nehori wrote: [..] > did somebody here ever used the safe.pm module? I presume you mean http://search.cpan.org/search?mode=all&query=Safe in particular the version that comes with perl 5.8.0??? eg: http://search.cpan.org/author/JHI/perl-5.

Safe.pm

2002-08-21 Thread Avi Nehori
Hello! did somebody here ever used the safe.pm module? please HELP!!! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Safe.pm

2002-08-21 Thread Avi Nehori
Hello! did somebody here ever used the safe.pm module? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]