Subject: Re: Serial setup.
To: John Maier <JohnAM@datastorm.com>
From: Brett Lymn <blymn@awadi.com.AU>
List: netbsd-help
Date: 03/01/1995 17:56:14
According to John Maier:
>
>Why CD high?  Because when NetBSD sees CD high, BSD will send a login prompt 
>message to the port, in effect setting the modem's port speed (no more 
>garbage!)
>

Hmmmm dunno about your modems but the Netcomm ones I play with have an
option for locking the DTE speed (ATRxx where xx sets the DTE speed).

Forcing the CD high on an incoming dial up is very very bad practice.
Envision this:

Person A logs in via the modem, hacking away finds they need to fix
something as root.... ok su and away we go.  Partway through some line
crud drops the connection.  Person B just happen to dial in at that
moment - blammo one root shell just waiting to be abused!

The dropping of the CD signal will kill any processes on associated
with the dial in session and restarts getty on that line making sure
the next person gets a login prompt.

>
>NetBSD/i386 (jam.datastorm.com) (tty01)
>
>login:
>
>Notice in datastorm, there is the sequence 'ata', this tell the modem to 
>answer the phone, ring or no ring.  So get a nice answer each time
>I restart BSD, but after that it's fine.  So I initalized my modem with an 
>additional command of 'L1' (low volume, my string is 'ATE0Q1L1&CS0=1').
>

Again if you do not force CD high but lock the DTE speed then you will
not have this problem because the message will not be produced until
the connection has been established.

>If anyone has a better way of initializing the modem, please tell me!
>

Fix the DTE speed as above - most modern modems allow you to do this.
We run all the modems in our dial-in pool with fixed DTE speeds
because of a similar problem (though ours talk via an annex terminal
server the concept of the autobaud problem is the same).

Remember - forcing CD always high on a dialin is very very bad!

-- 
Brett Lymn, Computer Systems Administrator, AWA Defence Industries
===============================================================================
"Also, it takes a lot longer to get up North ..... The slow way"
        - "Clever Trevor" Ian Drury