[Bug 736149] Re: Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2
Geez this is ugly. If that's the way it is, then I'll just write a replacement for host to work sensibly. If this is the designed behavior of the host command, then host will hang anytime DNS is stopped. Very bad. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to bind9 in ubuntu. https://bugs.launchpad.net/bugs/736149 Title: Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2 -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 736149] Re: Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2
root@net1# strings /lib/libresolv.so.2 | grep /etc /etc/hosts -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to bind9 in ubuntu. https://bugs.launchpad.net/bugs/736149 Title: Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2 -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 736149] Re: Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2
ping works as expected... root@net1# strace -e open /bin/ping localhost 21 open(/etc/ld.so.cache, O_RDONLY) = 3 open(/lib/libc.so.6, O_RDONLY)= 3 open(/etc/resolv.conf, O_RDONLY) = 4 open(/etc/resolv.conf, O_RDONLY) = 4 open(/etc/nsswitch.conf, O_RDONLY)= 4 open(/etc/ld.so.cache, O_RDONLY) = 4 open(/lib/libnss_files.so.2, O_RDONLY) = 4 open(/etc/host.conf, O_RDONLY)= 4 open(/etc/hosts, O_RDONLY|O_CLOEXEC) = 4 Hum... Looks like resolver conf files are walked in libc... root@net1# ldd /bin/ping linux-vdso.so.1 = (0x7fff63452000) libc.so.6 = /lib/libc.so.6 (0x7f6585db6000) /lib64/ld-linux-x86-64.so.2 (0x7f6586145000) root@net1# strings /lib/libc.so.6 | grep /etc /etc/localtime /etc/gai.conf /etc/mtab /etc/hostid /etc/ttys /etc/shells /etc/fstab /etc/.pwd.lock /etc/resolv.conf /etc/host.conf /etc/nsswitch.conf /etc/hosts.equiv /etc/bindresvport.blacklist So the question is why the host command ignores all these files and ping honors them. Or rather howto configure system wide honoring of all these files for resolver access from any command. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to bind9 in ubuntu. https://bugs.launchpad.net/bugs/736149 Title: Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2 -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 736149] Re: Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2
The 'host' command is not reading /etc/hosts by design. The command: host foo dns-server performs a dns lookup of host 'foo' from dns-server. If dns-server is not provided, as in: host foo then, per the man page: server is an optional argument which is either the name or IP address of the name server that host should query instead of the server or servers listed in /etc/resolv.conf. If you believe this is not working as designed please change the status from 'Invalid' ** Changed in: bind9 (Ubuntu) Status: New = Invalid -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to bind9 in ubuntu. https://bugs.launchpad.net/bugs/736149 Title: Ubuntu 10.10 /etc/hosts ignored by /lib/resolv.so.2 -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs