Subject: | Inline doesn't work in taint mode |
Inline version 0.44
Tried with:
This is perl, v5.8.3 built for x86_64-linux-thread-multi
Linux entropy 2.6.10-prep #3 SMP Tue May 17 18:56:08 AKDT 2005 x86_64 x86_64 x86_64 GNU/Linux
Also tried with:
This is perl, v5.8.0 built for sun4-solaris
SunOS babar.gina.alaska.edu 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-280R
Code:
#!/usr/bin/perl -T
use Inline Config => UNTAINT => 1;
Inline->bind(C => 'char *abc() { return "xyz\n"; }');
print abc();
Error message:
Insecure dependency in require while running with -T switch at blib/lib/Inline.pm (autosplit into blib/lib/auto/Inline/find_temp_dir.al) line 1247.
Code:
#!/usr/bin/perl -T
mkdir '/tmp/inline-test';
use Inline Config => UNTAINT => 1, DIRECTORY => '/tmp/inline-test';
Inline->bind(C => 'char *abc() { return "xyz\n"; }');
print abc();
Error message:
Insecure dependency in rmdir while running with -T switch at blib/lib/Inline.pm (autosplit into blib/lib/auto/Inline/rmpath.al) line 1194.
Running the second example without -T and then again with -T makes it work... (because the compiled code is cached)
Adding SAFEMODE=>0 doesn't make it work.