in reply to Re: using -T doesn't work
in thread using -T doesn't work

This is what I get when running it with #!/usr/bin/perl -T

Insecure dependency in connect while running with -T switch at /usr/libdata/perl5/Net/Ping.pm line 914.

Replies are listed 'Best First'.
Re^3: using -T doesn't work
by Corion (Patriarch) on Dec 28, 2004 at 19:37 UTC

    This is most likely because you did not clean up $ENV{PATH} to be secure. Most likely, if your Unix installation is a standard installation, the following should work at the top of your script:

    $ENV{PATH} = '/bin:/usr/bin:/usr/local/bin';

    If that doesn't work, you need to find out in which directory the ping executable lives, and put the name of that directory into $ENV{PATH} instead.


      Neither works, Im running openbsd 3.6. ping lives in sbin and is suid root.

        My instructions said:

        If that doesn't work, you need to find out in which directory the ping executable lives, and put the name of that directory into $ENV{PATH} instead.

        So, did you try the following:

        $ENV{PATH} = '/sbin';

        at the top of your script?

        If so, what do you mean by Does not work ? In what way does it not work? Does it report all hosts as reachable ? All hosts as unreachable? Does it claim that the ancient gods of Egypt will conquer the world tomorrow when you know that their uprising is scheduled for next year?

      Neither of those suggestions work...