Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <007101c233c9$9ef90c40$0100a8c0@wdg.uk.ibm.com>
From: "Max Bowsher" <maxb@ukf.net>
To: "Norbert Pfeiffer" <norbert@itbw.de>, <cygwin@cygwin.com>
References: <006101c2336f$6a69cbe0$1f00a8c0@npf>
Subject: Re: as one gets roots - rights ...
Date: Thu, 25 Jul 2002 11:54:16 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

Norbert Pfeiffer wrote:
> $ ./subnet.pl 192.168.0. 50
> icmp ping requires root privilege at ./subnet.pl line 9
...snip...
> use Net::Ping;

From Net::Ping: croak("icmp ping requires root privilege") if ($> and $^O ne
'VMS');

That $> is a check for euid == 0 (root). The problem is, that on Windows, there
isn't really a 'root' user. ICMP pings are allowed to everyone in the
Administrators group, IIRC. So, the quick fix is to comment the above line out
in /lib/perl5/5.6.1/cygwin-multi/Net/Ping.pm. (Although your script may fail
with a non obvious error if a non-admin tries to run it.) The long term fix is
for cygwin specific logic to be added to Net::Ping.

Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

