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

Re: Net::Ping and sudo

Thread Previous
From:
H.Merijn Brand
Date:
November 2, 2016 13:35
Subject:
Re: Net::Ping and sudo
Message ID:
20161102143510.0e395987@pc09.procura.nl
On Wed, 2 Nov 2016 12:37:07 +0000, Dave Mitchell <davem@iabyn.com>
wrote:

> 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':
> 
>     To: root@iabyn.com
>     Subject: *** SECURITY information for robin ***
>     Message-Id: <20161102122201.16A7B240D0E@iabyn.com>
> 
>     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.

+1

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.25   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About