Re: Perl Net::Ping; (Win32)

From: Glynn Clements (glynn@sensei.co.uk)
Date: Fri Oct 20 2000 - 17:10:56 EST


Chris Knipe wrote:

> This is coded in ActivePerl (Win32), and I am experiancing some weird
> problems in regards to sending ICMP ping packets?
>
> If I do not send the packet as a user with Administrative rights, the
> ping packet responds with a "Unknown Socket Error" message, but when
> I do have Administrative rights, it works perfectly... Someone dont
> perhaps know why / have some pointers for me as to why this is
> happening? Is this a restriction in Windows NT itself??

This sounds not unlike Unix, where you need root privilege to send
ICMP packets.

> - From what I am seeing at the moment, it almost wants to look to me
> like Microsoft is denying any access to ICMP data except if the NTLM
> Authenticated user has Administrative rights (or perhaps some other
> odd setting). This is however totally upsurd, because any user is
> able to use the ping.exe command... If anyone has experianced
> similar weirdness, will you perhaps please let me know how you got to
> fix this? I'm really desparate...

Well, on Unix ping is normally setuid root. I don't know what the
Windows equivalent would be.

> The code looks as follows:
>
> # Do our monitoring here. These values are unique per DB
> entry.
> $ping = Net::Ping->new("icmp", 10);
> if (!($ping->ping($IPAddr))) {
> Notify_Mail($Email);
> Notify_Admins($LineNumber);
> };
> $ping->close();

Does this work on any Unix systems without root privilege?

-- 
Glynn Clements <glynn@sensei.co.uk>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:24 EST