New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem globbing in a Safe Compartment #9439
Comments
From tgg_ch@ntlworld.comCreated by tggbiz@ntlworld.comUnder normal circumstances globbing does not work in a Safe compartment, In order to reproduce the results just paste the code into 3 files I have included test results with Perl 5.10 as well as 5.8 - note that they # Begin File: SafeGlobDemo.pl use Safe; print "Running SafeGlobDemo\n"; do_list_files('*'); sub some_sub sub do_list_files if (defined($cpt) && exists &{$cpt->varglob('list_files')}) sub load_compartment # End File: SafeGlobDemo.pl # Begin File: rdo.pl print "Loading rdo.pl\n"; sub list_files for my $file (glob($filespec)) # End File: rdo.pl # Begin File: glob.pl for (glob('*')) 1; # End File: glob.pl # End Code # Test Results # Begin Tests on Perl 5.10 # Test failure C:\GLB\test\SafeGlobDemo>perl SafeGlobDemo.pl # Workaround C:\GLB\test\SafeGlobDemo>perl SafeGlobDemo.pl xxx C:\GLB\test\SafeGlobDemo>perl -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread Copyright 1987-2007, Larry Wall Binary build 1003 [285500] provided by ActiveState http://www.ActiveSt Perl may be copied only under the terms of either the Artistic License Complete documentation for Perl, including FAQ lists, should be found # End Tests on Perl 5.10 # Begin Tests on Perl 5.8 # Test failure D:\GLB\test\SafeGlobDemo>perl SafeGlobDemo.pl # Workaround D:\GLB\test\SafeGlobDemo>perl SafeGlobDemo.pl xxx D:\GLB\test\SafeGlobDemo>perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread Copyright 1987-2007, Larry Wall Binary build 822 [280952] provided by ActiveState http://www.ActiveSta Perl may be copied only under the terms of either the Artistic License Complete documentation for Perl, including FAQ lists, should be found # End Tests on Perl 5.8 Perl Info
|
From tgg_ch@ntlworld.comI was advised to try sharing *Config and &Internals::SvREADONLY, which I It didn't work but the result was different on Perl 5.10 as follows. C:\GLB\test\newtest\SafeGlobDemo>perl SafeGlobDemo.pl Does this help any? Tom ----- Original Message -----
|
From tggbiz@ntlworld.comWhoops, I forgot to include the extra code line, which is obviously $cpt->share('*Config', '&Internals::SvREADONLY'); as well as sending the mail from the wrong email address. I also added &mro::method_changed_in to the share but then Perl moaned about Please send responses to tggbiz@ntlworld.com. Thanks, Tom ----- Original Message -----
|
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#57554 (status was 'open')
Searchable as RT57554$
The text was updated successfully, but these errors were encountered: