Date: Sun, 03 Sep 2000 00:02:59 +0900 (JST) From: Hajimu UMEMOTO <ume@FreeBSD.org> To: n@nectar.com Cc: arch@freebsd.org Subject: Re: Request for review: nsswitch Message-ID: <20000903.000259.104074195.ume@FreeBSD.org> In-Reply-To: <20000901163728.C19985@hamlet.nectar.com> References: <20000831130504.A26641@hamlet.nectar.com> <200009010047.RAA43862@vashon.polstra.com> <20000901163728.C19985@hamlet.nectar.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> On Fri, 1 Sep 2000 16:37:28 -0500 >>>>> "Jacques A. Vidrine" <n@nectar.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000903.000259.104074195.ume>