K
kj
The following test script fails when run under -T, but runs without
error otherwise:
#!/usr/bin/perl
# VERSION 1
use Inline (Config =>
DIRECTORY => '/home/roth/berriz/local/pub/work/proj/BuildSynergizer/_Inline');
use Inline C;
use strict;
hello();
__END__
__C__
#include <stdio.h>
void hello() {
printf("hello world\n");
}
The error is:
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 1257, <DATA> line 1.
INIT failed--call queue aborted, <DATA> line 1.
I Googled the error message, and found a workaround, consisting of
the added Config => DIRECTORY lines shown below:
#!/usr/bin/perl
# VERSION 2
use Inline (Config =>
DIRECTORY => '/home/jones/tmp/_Inline');
use Inline C;
use strict;
hello();
__END__
__C__
#include <stdio.h>
void hello() {
printf("hello world\n");
}
The new script still fails if run under -T, but now the error now
is different:
Insecure dependency in require while running with -T switch at /usr/local/share/perl/5.10.0/Inline.pm line 498.
INIT failed--call queue aborted.
The offending line in Inline.pm (498) is "require DynaLoader;", so
I added the following untainting code at the top of the script,
but it did not get rid of this error:
#!/usr/bin/perl
# VERSION 3
BEGIN {
@INC = map { /(.*)/; $1 } @INC;
}
# etc.
I've run out of ideas.
What must one do to run Inline::C code under -T ???
TIA!
~K
P.S. I'm aware of the UNTAINT config option for Inline, but, AFAICT
enabling it would defeat the use I want to make of taint mode.
error otherwise:
#!/usr/bin/perl
# VERSION 1
use Inline (Config =>
DIRECTORY => '/home/roth/berriz/local/pub/work/proj/BuildSynergizer/_Inline');
use Inline C;
use strict;
hello();
__END__
__C__
#include <stdio.h>
void hello() {
printf("hello world\n");
}
The error is:
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 1257, <DATA> line 1.
INIT failed--call queue aborted, <DATA> line 1.
I Googled the error message, and found a workaround, consisting of
the added Config => DIRECTORY lines shown below:
#!/usr/bin/perl
# VERSION 2
use Inline (Config =>
DIRECTORY => '/home/jones/tmp/_Inline');
use Inline C;
use strict;
hello();
__END__
__C__
#include <stdio.h>
void hello() {
printf("hello world\n");
}
The new script still fails if run under -T, but now the error now
is different:
Insecure dependency in require while running with -T switch at /usr/local/share/perl/5.10.0/Inline.pm line 498.
INIT failed--call queue aborted.
The offending line in Inline.pm (498) is "require DynaLoader;", so
I added the following untainting code at the top of the script,
but it did not get rid of this error:
#!/usr/bin/perl
# VERSION 3
BEGIN {
@INC = map { /(.*)/; $1 } @INC;
}
# etc.
I've run out of ideas.
What must one do to run Inline::C code under -T ???
TIA!
~K
P.S. I'm aware of the UNTAINT config option for Inline, but, AFAICT
enabling it would defeat the use I want to make of taint mode.