diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-10-12 07:41:18 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-10-12 07:41:18 +0000 |
commit | 096e1543c0e39bb253015dc55f8bedc6c90a5277 (patch) | |
tree | 750978a5a891417e31ac9bc6373861c4010117ae /ext/Opcode | |
parent | cce6d045dc7c10e0ae53901ce375a88a7bd3205e (diff) | |
download | perl-096e1543c0e39bb253015dc55f8bedc6c90a5277.tar.gz |
Share the internal XS functions defined in universal.c
to Safe compartments
p4raw-id: //depot/perl@32102
Diffstat (limited to 'ext/Opcode')
-rw-r--r-- | ext/Opcode/Safe.pm | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/ext/Opcode/Safe.pm b/ext/Opcode/Safe.pm index f4d35589cf..fc3ff080cd 100644 --- a/ext/Opcode/Safe.pm +++ b/ext/Opcode/Safe.pm @@ -38,7 +38,55 @@ use Opcode 1.01, qw( my $default_root = 0; -my $default_share = ['*_']; #, '*main::']; +# share *_ and functions defined in universal.c +# Don't share stuff like *UNIVERSAL:: otherwise code from the +# compartment can 0wn functions in UNIVERSAL +my $default_share = [qw[ + *_ + &PerlIO::get_layers + &Regexp::DESTROY + &re::is_regexp + &re::regname + &re::regnames + &re::regnames_count + &Tie::Hash::NamedCapture::FETCH + &Tie::Hash::NamedCapture::STORE + &Tie::Hash::NamedCapture::DELETE + &Tie::Hash::NamedCapture::CLEAR + &Tie::Hash::NamedCapture::EXISTS + &Tie::Hash::NamedCapture::FIRSTKEY + &Tie::Hash::NamedCapture::NEXTKEY + &Tie::Hash::NamedCapture::SCALAR + &Tie::Hash::NamedCapture::flags + &UNIVERSAL::isa + &UNIVERSAL::can + &UNIVERSAL::DOES + &UNIVERSAL::VERSION + &utf8::is_utf8 + &utf8::valid + &utf8::encode + &utf8::decode + &utf8::upgrade + &utf8::downgrade + &utf8::native_to_unicode + &utf8::unicode_to_native + &version::() + &version::new + &version::("" + &version::stringify + &version::(0+ + &version::numify + &version::normal + &version::(cmp + &version::(<=> + &version::vcmp + &version::(bool + &version::boolean + &version::(nomethod + &version::noop + &version::is_alpha + &version::qv +]]; sub new { my($class, $root, $mask) = @_; |