From owner-freebsd-arch Sat Sep 2 8: 4:15 2000 Delivered-To: freebsd-arch@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id CBDD137B422 for ; Sat, 2 Sep 2000 08:04:10 -0700 (PDT) Received: from localhost (localhost [::1]) (authenticated) by peace.mahoroba.org (8.11.0/8.11.0/peace) with ESMTP/inet6 id e82F32E56060; Sun, 3 Sep 2000 00:03:04 +0900 (JST) (envelope-from ume@FreeBSD.org) Date: Sun, 03 Sep 2000 00:02:59 +0900 (JST) Message-Id: <20000903.000259.104074195.ume@FreeBSD.org> To: n@nectar.com Cc: arch@freebsd.org Subject: Re: Request for review: nsswitch From: Hajimu UMEMOTO In-Reply-To: <20000901163728.C19985@hamlet.nectar.com> References: <20000831130504.A26641@hamlet.nectar.com> <200009010047.RAA43862@vashon.polstra.com> <20000901163728.C19985@hamlet.nectar.com> X-Mailer: xcite1.20> Mew version 1.95b38 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-OS: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>>>> On Fri, 1 Sep 2000 16:37:28 -0500 >>>>> "Jacques A. Vidrine" said: n> This goal is satisfied without putting a file in /etc/defaults. The n> defaults are dictated by the traditional behavior -- there will never n> be merging to do on the part of the admin. There is some confusion around search order of hard-coded default sources. gethostby*() dns -> files getnetby*() dns -> files getipnodeby*() files -> dns getaddrinfo() files -> dns getnameinfo() files -> dns It should be unified. Recently, FreeBSD's default behavior is lookup /etc/hosts first by /etc/host.conf. Here is a patch. Index: lib/libc/net/gethostnamadr.c diff -u lib/libc/net/gethostnamadr.c.orig lib/libc/net/gethostnamadr.c --- lib/libc/net/gethostnamadr.c.orig Fri Sep 1 16:28:26 2000 +++ lib/libc/net/gethostnamadr.c Sat Sep 2 23:37:10 2000 @@ -51,8 +51,8 @@ /* Host lookup order if nsswitch.conf is broken or nonexistant */ static const ns_src default_src[] = { - { NSSRC_DNS, NS_SUCCESS }, { NSSRC_FILES, NS_SUCCESS }, + { NSSRC_DNS, NS_SUCCESS }, { 0 } }; Index: lib/libc/net/getnetnamadr.c diff -u lib/libc/net/getnetnamadr.c.orig lib/libc/net/getnetnamadr.c --- lib/libc/net/getnetnamadr.c.orig Fri Sep 1 16:28:27 2000 +++ lib/libc/net/getnetnamadr.c Sat Sep 2 23:40:38 2000 @@ -48,8 +48,8 @@ /* Network lookup order if nsswitch.conf is broken or nonexistant */ static const ns_src default_src[] = { - { NSSRC_DNS, NS_SUCCESS }, { NSSRC_FILES, NS_SUCCESS }, + { NSSRC_DNS, NS_SUCCESS }, { 0 } }; Index: lib/libc/net/name6.c diff -u lib/libc/net/name6.c.orig lib/libc/net/name6.c --- lib/libc/net/name6.c.orig Fri Sep 1 20:20:41 2000 +++ lib/libc/net/name6.c Sat Sep 2 23:43:11 2000 @@ -189,8 +189,8 @@ /* Host lookup order if nsswitch.conf is broken or nonexistant */ static const ns_src default_src[] = { - { NSSRC_DNS, NS_SUCCESS }, { NSSRC_FILES, NS_SUCCESS }, + { NSSRC_DNS, NS_SUCCESS }, #ifdef ICMPNL #define NSSRC_ICMP "icmp" { NSSRC_ICMP, NS_SUCCESS }, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message