From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14197 invoked from network); 23 Aug 2000 06:56:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Aug 2000 06:56:25 -0000 Received: (qmail 28371 invoked by alias); 23 Aug 2000 06:56:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12690 Received: (qmail 28363 invoked from network); 23 Aug 2000 06:56:04 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Bart Schaefer" , "ZSH workers mailing list" Subject: RE: PATCH: test for network libraries (for test only)/problems with name resolution Date: Wed, 23 Aug 2000 10:55:59 +0400 Message-ID: <000001c00ccf$3175a110$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <1000822170232.ZM7764@candle.brasslantern.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > > } - I'm trapped on my own system. The problem is, now, when > } gethostbyname2 is correctly found, name resolution goes via resolver > } library. But this is using /etc/hosts only as fallback "if nameserver > } is not running" (at least in original bind implemetation as found > } here). Due to our infrastructure, it is unacceptable to me. > > I'm not sure I understand ... do you mean that your nameserver *is* > running, but is not able to properly resolve all the names you need? > The gethostbyname() from -lnsl on SVR4-derived systems supports service switch via /etc/netconfig file; here you can define the order of name resolution much like in Solaris /etc/nsswitch.conf. I normally define it to use both DNS and /etc/hosts. The gethostbyname2() from -lresolv does not use service switch and behaves as described above. It means, that if host is not defined in DNS but in /etc/hosts, it is not found (assuming, that DNS is properly setup and functional). In our case, not everything is defined in DNS, hence the problem. Yes, it is broken system, but there is no (real) chance to ever get it fixed, now, that development is about to officially stop. So, I have to devise some workaround. -andrej