[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Detecting dialup connections
On Mon, Sep 27, 1999 at 09:14:12PM +0200, Jo Even Skarstein wrote:
> > in init scripts etc. without requiring modifications for new hardware.
>
> I admit this is an advantage, but there are better ways to do this. See my
> posting from yesterday. Just renaming the devices won't give you any details
> about baudrates, handshake or other properties.
Yes, but there are situations where you don't need that information but
just want to know whether a device is a serial line or not. If you have
to know more, use ioctl(), but for many purposes (including mine) it is
just enough. I want to syslog something like:
DIALUP AT ttyS2 BY hackerjoe
Do you really want to see something like this?
DIALUP AT serial1 BY hackerjoe
ALERT! ALERT! ALERT! hackerjoe (the guy that has stolen
your root password btw) HAS LOGGED IN AT A SERIAL PORT
THAT HAS __NO__ CD ALTHOUGH IT IS POSSIBLY EQUIPPED
WITH AN ESCC (SCREWED UP BY HSMODEM), PROBABLY USING
A US ROBOTICS. HE HAD SOME DIFFICULTIES DOING A DICTIONARY
ATTACK TO YOUR /etc/passwd BECAUSE THE DEVICE DRIVER
HAD SOME BLACKOUTS. PLEASE FIX THAT!!!
To come to an end: I will guess that a device is a dialup line if it is
named "ttyS*". For the sake of peace I will also accept "modem[12]",
"serial[12]" and "tty[a-z0-9]" (at least for now). But Sparemint docs
will recommend that all serial ports have at least one name that matches
"ttyS*" (so that you don't have to do ioctls from a shell script just to
find out if /dev/superfastchip is a serial line or not).
Ciao
Guido
--
http://stud.uni-sb.de/~gufl0000/
mailto:gufl0000@stud.uni-sb.de