develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [perl #24347] segfault with Safe

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
November 13, 2003 01:51
Subject:
Re: [perl #24347] segfault with Safe
Message ID:
20031113095115.GA9755@math.berkeley.edu
On Sun, Nov 02, 2003 at 11:42:09PM +0100, Rafael Garcia-Suarez wrote:
> > Currently, when an imported subroutine is called from a compartment,
> > it has its %main:: substituted by a dummy hash; thus autoloading and
> > loading modules on the fly (when needed) does not work well.  I want
> > to import a subroutine which continues to operate on its native %main;:.

> Isn't this more or less against Safe's mission statement ?

???  If I want to run some code with the full access to %main::, the
code in (almost any useful?) Safe compartment can do it.  What is this
"mission statement again"?

Basically, with

  sub foo {
    my $res = Safe->new->reval(shift);
    die $@ if $@;
  }

I can run arbitrary code with :default permissions with %main:: fully
visible.  If `entereval' is allowed, I can run arbitrary code, period.

Hope this helps,
Ilya


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About