develooper Front page | perl.perl5.porters | Postings from November 2016

Net::Ping and sudo

Thread Next
Dave Mitchell
November 2, 2016 12:37
Net::Ping and sudo
Message ID:
A recent pull into blead of Net::Ping from CPAN (which is under dist/, but
Reini seems to be pushing new versions to CPAN) has added code to
t/500_ping_icmp.t that says: "if not running as root, try re-executing the
script under sudo, but quietly skip if sudo doesn't succeed".

This has two issues: firstly, I now get an angry local email when running
'make test':

    Subject: *** SECURITY information for robin ***
    Message-Id: <>

    robin : Nov  2 12:22:01 : davem : user NOT in sudoers ; TTY=pts/1 ; PWD=/home/da
    vem/perl5/git/bleed/dist/Net-Ping ; USER=root ; COMMAND=/home/davem/perl5/git/bl
    eed/perl -I../../lib t/500_ping_icmp.t

which is annoying.

Secondly, I think people would find it unexpected for a perl test script
to be run as root when 'make test' has been invoked as a normal user.  To
a certain extent you could say that people using an account set up so that
it can sudo to root and run any command without needing a password,
deserve anything they get anyway.

In either case, I think we should remove the sudo from this test script.

The Enterprise is captured by a vastly superior alien intelligence which
does not put them on trial.
    -- Things That Never Happen in "Star Trek" #10

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About