develooper Front page | perl.beginners | Postings from February 2002

RE: No access to /etc/protocols

Thread Previous | Thread Next
Paul Murphy
February 28, 2002 00:28
RE: No access to /etc/protocols
Message ID:

This *is* my new ISP.  I understand their stance, they work are working from a standard security perspective.  "Don't open it unless you need to".  This is an admirable stance, although misapplied in this case.  You always have to strike a balance between security and funcionality and I feel that they have erred more on the side of security than is necessary and so removed a fundamental part of functionality.

So I need to work around the problem.

Jenda has kindly provided me a way to get around it, and I have now encountered my next problem.

getprotobyname() returns a list: { $name, $alias, $number }

If I do

 @proto = getprotobyname();
 print @proto;

I get "tcpTCP6".

My getprotobyname() has a 

  return { "tcp", "TCP", "6" } ;

But if I do:

 @proto = getprotobyname();
 print @proto;

I get HASH<whatever>.

I am wondering how to return list correctly.



> -----Original Message-----
> From: Randal L. Schwartz []
> Sent: 27 February 2002 16:45
> To:
> Subject: Re: No access to /etc/protocols
> The following message is a courtesy copy of an article
> that has been posted to perl.beginners as well.
> >>>>> "Paul" == Paul Murphy <> writes:
> Paul> Hello everyone.
> Paul> My ISP doesn't have /etc/protocols world readable, and so IO::Socket
> Paul> doesn't work, as getprotobyname and getprotobynumber fail.
> Time to get a new ISP, unless you can clue them in that this file is
> necessary.  ISPs are a dime a dozen these days, so doing stoopid
> tricks like this is just a way of saying "we don't want any clueful
> users".
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 
> 503 777 0095
> <> <URL:>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See for onsite and open-enrollment 
> Perl training!

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About