On Wed, 2007-03-07 at 00:12 +0000, John Levon wrote:

> getfqdn(name='')
>     Get fully qualified domain name from name.
>      
>     An empty argument is interpreted as meaning the local host.
>      
>     First the hostname returned by gethostbyaddr() is checked, then
>     possibly existing aliases. In case no FQDN is available, hostname
>     is returned.
> 
> Let me know if you'd like further details here.

I don't believe that this is an airtight way of constraining this
service to local use only.  

I think you'd be far safer binding the socket to 127.0.0.1 by default;
relying on gethostbyaddr() to only return "localhost" for a loopback
address doesn't strike me as particularly clever.

                                                - Bill




Reply via email to