This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: as one gets roots - rights ...


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]