Package: nscd Version: 2.3.5-6 Severity: important When ssh make a lookup of a node with changed IP-address, nscd returns the old address. If I stop nscd, ssh get the right address. But as soon as I start nscd again, the old address is delivered to ssh. All other applications I've tested get the right address, even when nscd is running. Applications I've tested includes 'getent hosts', host and ping. sid:~> ssh -v bostrom.dyndns.org OpenSSH_3.8.1p1 Debian-8.sarge.4, OpenSSL 0.9.7g 11 Apr 2005 debug1: Reading configuration data /home/anders/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to bostrom.dyndns.org [83.250.193.68] port 22. sid:~> getent hosts bostrom.dyndns.org 83.250.197.26 bostrom.dyndns.org sid:~> host bostrom.dyndns.org bostrom.dyndns.org has address 83.250.197.26 sid:~> strace from ssh: connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = 0 poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 5000) = 1 writev(3, [{"\2\0\0\0\r\0\0\0\6\0\0\0", 12}, {"hosts\0", 6}], 2) = 18 poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}], 1, 5000) = 1 recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"hosts\0", 6}], msg_controllen=24, {cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, 0) = 6 fstat(4, {st_mode=S_IFREG|0600, st_size=217016, ...}) = 0 pread(4, "\1\0\0\0h\0\0\0\0\0\0\0\1\0\0\0\255\215\\C\0\0\0\0\323"..., 104, 0) = 104 mmap(NULL, 217016, PROT_READ, MAP_SHARED, 4, 0) = 0x2aaaaaaf8000 close(4) = 0 close(3) = 0 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(22), sin_addr=inet_addr("83.250.193.68")}, 16) = ? ERESTARTSYS (To be restarted) strace from getent hosts: connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = 0 poll([{fd=3, events=POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 5000) = 1 writev(3, [{"\2\0\0\0\r\0\0\0\6\0\0\0", 12}, {"hosts\0", 6}], 2) = 18 poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}], 1, 5000) = 1 recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"hosts\0", 6}], msg_controllen=24, {cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, 0) = 6 fstat(4, {st_mode=S_IFREG|0600, st_size=217016, ...}) = 0 pread(4, "\1\0\0\0h\0\0\0\0\0\0\0\1\0\0\0\34\221\\C\0\0\0\0\323\0"..., 104, 0) = 104 mmap(NULL, 217016, PROT_READ, MAP_SHARED, 4, 0) = 0x2aaaaaf87000 close(4) = 0 close(3) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaafbc000 write(1, "83.250.197.26 bostrom.dyndns.o"..., 3583.250.197.26 bostrom.dyndns.org If I remove /var/db/nscd/hosts and restart nscd, ssh works again. But if I replace /var/db/nscd/hosts with the old db-file again, and restart nscd, the problem reappear. The corrupt(?) hosts-file is attached. / Anders -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing'), (500, 'stable'), (50, 'unstable'), (1, 'sarge-unsupported') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.13.4 Locale: LANG=C, LC_CTYPE=C (charmap=ISO-8859-1) (ignored: LC_ALL set to sv_SE) Versions of packages nscd depends on: ii libc6 2.3.5-6 GNU C Library: Shared libraries an nscd recommends no packages. -- no debconf information
Attachment:
hosts.bz2
Description: Binary data