From owner-freebsd-questions Thu Jan 2 19:38:37 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 337AF37B401 for ; Thu, 2 Jan 2003 19:38:35 -0800 (PST) Received: from fb.homeunix.org (b3ia35ony1219.ab.hsia.telus.net [66.222.134.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 744D543EC5 for ; Thu, 2 Jan 2003 19:38:34 -0800 (PST) (envelope-from sysop@fb.homeunix.org) Received: from winxp (winxp [10.0.0.3]) by fb.homeunix.org (8.12.6/8.12.6) with SMTP id h033cXpv003048 for ; Thu, 2 Jan 2003 20:38:34 -0700 (MST) (envelope-from sysop@fb.homeunix.org) Message-ID: <004501c2b2d9$976940a0$0300000a@winxp> From: "Konstantin Borovik" To: Subject: command host does not check /etc/hosts. Date: Thu, 2 Jan 2003 20:38:33 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, Command host does not check /etc/hosts file. Is it a bug or normal behavior? My sendmail could not deliver mail to localhost. I had to comment the following lines in the config file. # Resolve map (to check if a host exists in check_mail) #Kresolve host -a -T #C{ResOk}OKR My system: uname -a FreeBSD fb.homeunix.org 4.7-STABLE FreeBSD 4.7-STABLE #1: Tue Dec 31 21:29:27 MST 2002 bkn@fb.homeunix.org:/usr/obj/usr/src/sys/BSD i386 I did some investigation: ******************************** start **************************************************** bkn@fb /home/bkn> ktrace host localhost localhost.ab.hsia.telus.net has address 10.166.205.185 ********************************** end *************************************************** ******************************** start **************************************************** bkn@fb /home/bkn> kdump | less ...... 3032 host CALL readlink(0x18120194,0xbfbff770,0x3f) 3032 host NAMI "/etc/malloc.conf" 3032 host RET readlink -1 errno 2 No such file or directory 3032 host CALL mmap(0,0x1000,0x3,0x1002,0xffffffff,0,0,0) 3032 host RET mmap 403931136/0x18138000 3032 host CALL break(0x8896000) 3032 host RET break 0 3032 host CALL break(0x8897000) 3032 host RET break 0 3032 host CALL gettimeofday(0xbfbff3c8,0) 3032 host RET gettimeofday 0 3032 host CALL getpid 3032 host RET getpid 3032/0xbd8 3032 host CALL break(0x8898000) 3032 host RET break 0 3032 host CALL open(0x807bca2,0,0x1b6) 3032 host NAMI "/etc/resolv.conf" 3032 host RET open 3 3032 host CALL fstat(0x3,0xbfbff2c0) 3032 host RET fstat 0 3032 host CALL break(0x889c000) 3032 host RET break 0 3032 host CALL read(0x3,0x8898000,0x4000) 3032 host GIO fd 3 read 132 bytes "search ab.hsia.telus.net nameserver 216.123.198.243 nameserver 209.115.152.130 nameserver 209.115.131.51 nameserver 209.115.152.150 " 3032 host RET read 132/0x84 3032 host CALL read(0x3,0x8898000,0x4000) 3032 host GIO fd 3 read 0 bytes "" 3032 host RET read 0 3032 host CALL close(0x3) 3032 host RET close 0 3032 host CALL socket(0x2,0x2,0) 3032 host RET socket 3 3032 host CALL connect(0x3,0x8893770,0x10) 3032 host RET connect 0 3032 host CALL sendto(0x3,0xbfbef410,0x2d,0,0,0) 3032 host GIO fd 3 wrote 45 bytes "\^P\M-%\^A\0\0\^A\0\0\0\0\0\0 localhost\^Bab\^Dhsia\^Etelus\^Cnet\0\0\^A\0\^A" 3032 host RET sendto 45/0x2d ...... ********************************** end *************************************************** Have a nice day. Konstaintin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message