Skip Menu |
 

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 115704
Status: new
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: jrdallman [...] wisc.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Net::Domain::hostfqdn() should use /etc/nsswitch.conf and /etc/hosts to determine fqdn
Date: Tue, 28 Jun 2016 20:02:13 +0000
To: "bug-libnet [...] rt.cpan.org" <bug-libnet [...] rt.cpan.org>
From: Jimmy DALLMAN <jrdallman [...] wisc.edu>
Download (untitled) / with headers
text/plain 741b
Hello, Net::Domain::hostfqdn() does not currently consider the rules given in /etc/nsswitch.conf when determining the domain, opting instead to start checking files like /etc/resolv.conf. In order to properly emulate getaddrinfo(), I would suggest using nsswitch.conf to determine the methods in which to search for the fqdn. In addition, I believe /etc/hosts should be high in the list of files to consult, possibly first, to determine the fqdn. The domainname subroutine should check that $hostname is defined, then read /etc/hosts looking for the line where the third column matches the hostname, and assign $fqdn to the second column's value. $domain can then be set by removing $hostname from the beginning of $fqdn. Thanks, Jimmy


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.