*BSD News Article 99252


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.telstra.net!nsw.news.telstra.net!news.syd.connect.com.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!shift.utell.net!nobody
From: brian@shift.utell.net (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Hostname for box w/ part time internet connection
Date: Tue, 8 Jul 1997 16:50:09 +0100
Organization: Awfulhak Ltd.
Lines: 38
Message-ID: <hjntp5.jm1.ln@shift.utell.net>
References: <33B462A3.C9A68B9C@auburn.campus.mci.net>
    <5pknen$l9c$1@the-fly.zip.com.au> <38gqp5.rqd.ln@shift.utell.net>
    <Pine.NEB.3.92.970708023122.256A-100000@port199.aixdialin.siu.edu>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:44122

In article <Pine.NEB.3.92.970708023122.256A-100000@port199.aixdialin.siu.edu>,
	Jim Dutton <jimd@port199.aixdialin.siu.edu> writes:
[.....]
> --- Sample /etc/ppp/ip-up script ---
> 
> #!/bin/sh
> # echo "arg #4 = $4"
> port=`echo $4 | sed 's/131.230.[0-9]*.//'`
> `/bin/hostname port$port.aixdialin.siu.edu`
> `/usr/bin/logger PPP connection as port$port.aixdialin.siu.edu`
> 
> if [ -f /var/run/sendmail.pid ]; then
>    sendmail_pid=`cat /var/run/sendmail.pid | sed '/sendmail/d'`
> #    echo "old sendmail.pid = $sendmail_pid"
>    `kill $sendmail_pid`
> fi
> 
> 
> `/usr/sbin/sendmail -bd -q1h`
> sendmail_pid=`ps -ax|grep sendmail | sed '/grep sendmail/d' | sed 's/\?.*$//'`
> `/usr/bin/logger Sendmail started [$sendmail_pid]`
> exit

So what happens when you send mail off-line ?  What does your From:
address look like ?  What about other programs such as nmbd (old
versions that use hostname) and rwhod ?  How would something like
innd handle it ?

I would advise against changing your hostname on the fly without
being aware of which exact processes it affects (you seem to be
aware of what's affected on your machine).  This brings us
back to my original argument that hostnames are an evil "easy
answer" for programs to misuse.

-- 
Brian <brian@awfulhak.org> <brian@freebsd.org>
      <http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour !