Path: utzoo!attcan!uunet!jarthur!brutus.cs.uiuc.edu!samsung!think!snorkelwacker!mit-eddie!mit-amt!media-lab.media.mit.edu!saus From: saus@media-lab.media.mit.edu (Mark Sausville) Newsgroups: comp.unix.ultrix Subject: Re: Use Domain In Hostname Or Not? Message-ID: Date: 21 Feb 90 18:06:46 GMT References: <4940@itivax.iti.org> <2929@decuac.DEC.COM> Sender: saus@mit-amt.MEDIA.MIT.EDU Organization: /u/saus/.organization Lines: 41 In-reply-to: avolio@decuac.dec.com's message of 15 Feb 90 02:24:41 GMT There are host of bugs in Ultrix which caused by inconsistent uses and assumptions about hostnames. Many seem indeed to be caused by insufficient buffer space to hold the fully qualified domain name. One I ran across the other day was in /etc/dms. The line SERVER=`/usr/ucb/netstat -i |grep $device |egrep -v "af12|DECnet" | awk '{print $4}'` is used during some checks which figure out what network the client and server share. <#6 hub:/u/saus>netstat -i Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll scs0 8444 amt-hsc ci-hub.media.mi 787619 0 784094 0 0 ni0 1500 amt-net hub.media.mit.e 19501287 0 23738036 0 0 xna0 1500 amt-garden2 exahub.media.mi 91730 0 142740 0 0 lo0 1536 127 LOCALHOST 62 0 62 0 0 /usr/ucb/netstat -i doesn't have enough room to print the whole hostname in it's 4th field so /etc/dms reports that the host can't be found on the net because it checks using a truncated version of the domain name. Very annoying. My workaround was to fish out the host part of the domain name and use that for the check. Not guaranteed to work under all circumstances (such as a real long hostname (i.e. asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf.foo.com). It's ironic because there's a lot of code dedicated to seeing that things are done properly and then there's this really gross bug. It would be nice if this sort of problem just went away sometime soon. Regards, Mark. Mark Sausville MIT Media Laboratory Computer Systems Administrator Room E15-354 617-253-0325 20 Ames Street saus@media-lab.media.mit.edu Cambridge, MA 02139