New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Net∷Domain∷hostfqdn() produces different result from hostname -f #17135
Comments
From laurence.rochfort@oracle.comThis is a bug report for perl from laurence.rochfort@oracle.com, The function Net�Domain�hostfqdn() provides different results from hostname -f Obvervations: 1) It doesn't respect hosts/DNS resolution ordering in nsswitch.conf and resolv.conf Example: $ cat /etc/hostname $ cat /etc/hosts x.x.x.x spacewalk-27 spacewalk-27.vagrant.test $ cat /etc/resolv.conf $ grep hosts /etc/nsswitch.conf $ hostname -f $ perl -le 'use Socket; use POSIX; print ((gethostbyname((POSIX::uname)[1]))[0])' $ perl -le 'use Net::Domain (); print Net::Domain::hostfqdn' For reference: man 1 hostname: The recommended method of setting the FQDN is to 127.0.1.1 ursula.example.com ursula Technically: The FQDN is the name getaddrinfo(3) Therefore it depends on the configuration of the man 5 resolv.conf: search Search list for host-name lookup. Flags: Site configuration information for perl 5.16.3: Configured by Red Hat, Inc. at Mon Jan 21 09:25:23 PST 2019. Summary of my perl5 (revision 5 version 16 subversion 3) configuration: Locally applied patches: @INC for perl 5.16.3: Environment for perl 5.16.3: |
From @jkeenanOn Wed, 21 Aug 2019 15:45:37 GMT, laurence.rochfort@oracle.com wrote:
Thank you for this report. Net::Domain is part of the libnet distribution which, while it is shipped with the Perl 5 core distribution, is maintained upstream on CPAN. Could you please file this report in libnet's issue tracker by sending email to: bug-libnet@rt.cpan.org Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
@jkeenan - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#134379 (status was 'rejected')
Searchable as RT134379$
The text was updated successfully, but these errors were encountered: