This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: as one gets roots - rights ...
- From: "Max Bowsher" <maxb at ukf dot net>
- To: "Norbert Pfeiffer" <norbert at itbw dot de>,<cygwin at cygwin dot com>
- Date: Thu, 25 Jul 2002 11:54:16 +0100
- Subject: Re: as one gets roots - rights ...
- References: <006101c2336f$6a69cbe0$1f00a8c0@npf>
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/