DBD-Oracle
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$val = join $Config{path_sep}, @ENV{@envs}
}
else {
$ldlibpthname = $Config{ldlibpthname} or return;
$val = $ENV{$ldlibpthname} || '';
}
print "Your $ldlibpthname env var is set to '$val'\n" if $verbose;
return ( $ldlibpthname, $val, split /\Q$Config{path_sep}/, $val );
}
sub check_ldlibpthname {
my $libdir = shift || join '/', $OH, ora_libdir();
$libdir =~ s:[\\/]$::; # cut final / or \
my ($ldlibpthname, $val, @dirs) = ldlibpth_info(1);
my $warn_name = $ldlibpthname;
# It is also ok if we are using symbolic links
return 1 if grep { s:[\\/]$::; $_ eq $libdir }
map { $_, Cwd::abs_path($_) } @dirs;
# on solaris, it can be under LD_LIBRARY_PATH_(32|64)
if ( $^O eq 'solaris' ) {
my $ld_library_path_name = 'LD_LIBRARY_PATH_'
. ( perl_is_64bit() ? '64' : '32' );
$warn_name .= " or $ld_library_path_name";
my @dirs = split quotemeta($Config{path_sep}),
$ENV{$ld_library_path_name};
s#[\\/]$## for @dirs; # cut potential final / or \
return 1 if grep { $_ eq $libdir } @dirs;
}
warn "WARNING: Your $warn_name env var doesn't include '$libdir' but probably needs to.\n";
}
sub check_security {
# check for the SUID/SGID bits on ORACLE_HOME/bin/oratclsh
# if set, this allows a user to fork a root shell!
# Get the octal portion of perms that indicates
# SUID and SGID, and warn if either is set
my @files = map { ($_,$_.'0') } qw(
oratclsh lsnrctl oemevent onrsd osslogin tnslsnr
tnsping trcasst trcroute cmctl cmadmin cmgw names namesctl otrccref
otrcfmt otrcrep otrccol
);
my @bad;
foreach (@files) {
my $file = "$ENV{ORACLE_HOME}/bin/$_";
my ($mode) = (stat($file))[2];
next unless defined $mode;
push @bad, $file if ($mode & 04000 and $mode & 00111)
or ($mode & 02000 and $mode & 00111);
}
return unless @bad;
print "\n";
warn "*** WARNING - YOUR ORACLE INSTALLATION HAS A SECURITY PROBLEM.$BELL\n";
warn " This is just a warning. It does not affect DBD::Oracle in any way.\n\n";
sleep 6;
}
sub check_macos_symbol_table {
# Check for symbol table problem in libclntsh.dylib.9.0 on MacOS X
return unless $^O eq 'darwin';
my $oracle_lib = "$OH/lib/libclntsh.dylib";
return unless -f $oracle_lib;
open my $nm_fh, '-|', "nm $oracle_lib"
or die "couldn't run 'nm $oracle_lib': $!";
while ( <$nm_fh> ) {
return if /^\s+U _(dlsym|dlclose)/;
}
warn <<"END_WARNING";
WARNING: symbol table may need modification in Oracle library:
$oracle_lib
If the build fails in the linking stage, manual modification is
required - see DBD::Oracle::Troubleshooting::Macos
END_WARNING
return;
}
__END__
( run in 0.553 second using v1.01-cache-2.11-cpan-5837b0d9d2c )