home *** CD-ROM | disk | FTP | other *** search
- $Header: README,v 1.2 89/12/29 10:17:06 howard Exp $
-
- DESCRIPTION
-
- The callback system implements callback for dialup login
- sessions. A user dials in and enters a symbolic name for a
- stored telephone number. The line is dropped, and a new call is
- placed to the corresponding number. On connection a normal
- login session is established. Unlike callback firmware in some
- modems, the list of phone numbers may be arbitrarily long.
- Different lines may use different lists, or any number of lines
- may share the same list.
-
- The system has two purposes: to charge (almost all of) the cost
- of the telephone calls to the host, and to improve security. I
- do no guarantee that callback is secure, but at least you can
- look at the source code; it's not firmware burned into a PROM.
-
- Callback has been tested on an ALM port on a Sun 3/280 running
- SunOS 4.0.3, and on a CPU serial port on a Sun 3/60 runing first
- SunOS 4.0.1, then SunOS 4.0.3. Callback may work on other UNIX
- versions that use termio and /dev/cua* special files for dialing
- out. It will not work on SunOS 3.x. It has been tested with
- Octocom OSI8596 modems and Alfanet ANC 8x224TT modems, both of
- which are Hayes-compatible. Callback is designed to be general
- enough to operate with most autodial modems. Extensive logging
- shows all traffic to and from the modem, with timestamps.
-
- Callback works with the normal getty and login functionality,
- including line speed selection. It allows different modem
- commands for each line speed, if necessary.
-
- As distributed, callback needs verbose text responses from
- modems, e.g. "CONNECT 2400" instead of "10." This makes it
- incompatible with some UUCPs, since they require numeric
- response codes. It should be easy to modify callback to handle
- numeric response codes, however.
-
-
- LICENSE
-
- Callback is free software under the GNU general public license.
-
-
- HOW IT WORKS (KLUDGEOLOGISTS TAKE NOTE)
-
- The /etc/ttytab file is modified for the dialup line. Instead
- of running the usual getty, callback is run. Callback
- immediately execs a special getty, named getty-cb. Getty-cb
- works exactly like the ordinary getty, except that after it has
- the tty set up correctly and has read the login name, it does
- not exec login but instead execs callback0. Callback0 does the
- actual callback. It prompts the user for the symbolic name for
- the telephone number, hangs up, sends the dialing command to the
- modem, waits for answer, turns off the hangup-on-close (HUPCL)
- bit, and then simply exits. Since the getty process has died,
- init starts up another one, so another callback is started. But
- this time, callback does not exec getty-cb, it execs login, so
- the user can finish logging in. Callback execs either getty-cb
- or login, depending on a state file that callback0 modifies.
- And getty-cb is really just the vendor-supplied getty
- executable, with "/bin/login" changed to a path to callback0.
-
-
- PREREQUISITES
-
- You must have my library of C functions. It was posted to
- comp.sources.misc on 1 October 1989 (volume 8, issues 80-87) and
- 28 October 1989 (volume 8, issue 96). The archive name was
- libhoward.
-
- You also need some way to change a string in an executable, or
- you need source for a getty that will work on your system. GNU
- Emacs is an excellent tool for editing executables; adb will
- also work.
-
- The libhoward package itself has a number of prerequisites.
- ANSI-C float.h and limits.h include files must be on the C
- include file search path. If you don't have them, you can use
- Steven Pemberton's config program to make them. Config was
- posted to comp.sources.misc on 30 April 1989 as volume 6 issue
- 96, archive name config2.
-
- The makefiles use features that may only be in GNU make, version
- 3.54 or later. (There are a lot of different make commands out
- there, and I haven't tested them all, so I don't know for sure
- which will work and which won't. GNU make 3.54 will definitely
- work. The make supplied with SunOS 4.0.3 will not work.)
-
- Chris Tweed's sets command must be on the command search path.
- It was posted to comp.sources.unix on 24 February 1988 as volume
- 13, issue 68, archive name sets.
-
- Some of the documentation is in LaTeX. You do not *have* to
- read it, but it may be helpful. If you want to read it, you
- will need LaTeX to format it.
-
-
- INSTALLATION
-
- It will be easier to understand the installation if you first
- read my report "Sharing software in a network of heterogeneous
- UNIX hosts." This comes with libhoward.
-
- Install the dialup lines in the normal way, including the
- /dev/cua* files. For Suns, see section 11.4, "Adding a Modem to
- Your System," in the System & Network Administration Manual.
- Make sure the dialup lines are working in the normal manner,
- without callback, before installing callback.
-
- Figure out where you want to install various files. Here I'll
- assume a separate directory for everything, but it's easy to
- make a different choice. I discuss an alternative example
- below.
-
- I'll call the master source directory $DD.
-
- Create a directory for compiling on this machine type. I'll
- call it /usr/local/free/callback.
-
- Find out the version. Look at the Header line (typically the
- first line) of the FREEZE file. The version is the first
- number, and ends at the period. The first externally released
- version was version 2.
-
- Create a subdirectory for this version. e.g.
- /usr/local/free/callback/2.
-
- Create the following subdirectories for results:
- bin Installed executables.
- man/man1 Manual entries.
- man/cat1 On-line formatted manual entries.
-
- For example:
- % cd /usr/local/free/callback/2
- % mkdir bin man man/{cat,man}1
-
- Create a subdirectory for doing the actual compilations. I'll
- call it sun34:
- % mkdir sun34
- % cd sun34
-
- Create an mk shell file. Make it executable. Here's a starting
- point for SunOS 4.x:
-
- DD=/usr/local/free-dist/callback/2/dist
- SRCS=`cd $DD; echo *`
- RM='rm -f'
- export DD SRCS RM
- make -f uMakefile
- exec make \
- CATMAN=catman \
- FMTMAN=mkManPS \
- $*
-
- If you don't have a catman command, drop that line. FMTMAN
- should be the name of a command to turn manual entries into
- printable form. Add any local changes you need here. If your C
- compiler doesn't understand different optimization levels, add
- CFLAGS=-O as an argument to the last make.
-
- Here is an alternate mk file for a system using GCC, and with
- results installed in more conventional places.
-
- DD=/usr/local/free-dist/callback/2/dist
- SRCS=`cd $DD; echo *`
- CC=gcc
- CFLAGS='-g -O -traditional'
- INCLUDES=-I/usr/local/include
- RM='rm -f'
- export DD SRCS CC CFLAGS INCLUDES RM
- make -f uMakefile
- exec make \
- CATMAN=catman \
- CID=/usr/local/bin \
- LIBPATH='-L/usr/local/lib' \
- MID=/usr/local/man \
- $*
-
- Get MakeCommon and uMakefile from the master source directory,
- e.g.
- % mkDistI MakeCommon $DD
- % mkDistI uMakefile $DD
-
- Make any changes you need to make to callback.h. Near the top
- are some absolute path names that you may want to change.
-
- If your telephone line has double clearing, and if you're
- concerned about security, you should increase the value of the
- DROPSEC macro defined near the top of callback.h. Double
- clearing is a telephony feature. A calls B and B answers. With
- double clearing, B can hang up for a short time and then pick up
- the call again. This is convenient, for example, to walk to a
- phone in a different room. However, double clearing also makes
- spoofing possible. The bad guy calls up and initiates the
- callback, but does not hang up. Instead, the bad guy supplies
- dial tone. The host modem hangs up the line for a while, and
- when it goes off hook again it detects the dial tone supplied by
- the bad guy. It dials the number and then waits for answer.
- The bad guy removes the dial tone and answers.
-
- To avoid spoofing, DROPSEC must be longer than the double
- clearing timeout. This is typically about 90 seconds, but you
- can test for yourself by having a partner call you, hanging up,
- and timing how long you need to stay on hook before you can go
- off hook and get dial tone instead of your partner.
- Unfortunately, DROPSEC is the time between when the callback
- request is accepted and when it is processed, so making it
- longer than a few seconds will annoy your users and lead them to
- suspect that the callbacks they request have failed. It's much
- better to get a line with single clearing, if possible. Most
- PABX lines have single clearing.
-
- Callback as distributed assumes verbose responses from the
- modem. With Hayes-compatible modems, the command "atv1" puts
- them in verbose mode. If you prefer numeric response codes, you
- will need to modify the mrctab[] table in callback.h to handle
- them. You will probably also need to modify the code in main()
- in callback0.c to do exact matching on the result codes instead
- of prefix matching.
-
- When you have the modem programmed with the configuration you
- wish, save the configuration in non-volatile memory. With
- Hayes-compatible modems, the command "at&w" does this.
-
- Run mk.
-
- Run "mk install".
-
- Make a getty that execs callback0 instead of login. If you have
- source for getty, you can use that. If you don't, make a copy
- of your vendor-supplied getty executable, and edit it. I call
- the result getty-cb. It should go where callback and callback0
- go. I used GNU Emacs to edit a copy of /usr/etc/getty. I used
- incremental search to find /bin/login, then I changed it to
- /bin/.cb0 followed by an extra NUL (Ctl-Q 000) so the new string
- takes up exactly the same space as the old. I then made
- /bin/.cb0 a symbolic link to where callback0 really is:
- # mount -o remount,rw /usr (If /usr is mounted read-only)
- # ln -s /usr/local/free/callback/0/bin/callback0 /bin/.cb0
-
- Set up control, log, and state files.
- I put these in /etc/local/callback. In this example there's
- only one callback line, ttyd1:
- # cd /etc
- # mkdir local
- # chmod g+s local
- # cd local
- # mkdir callback
- # chmod o= callback
- # cd callback
- # mkdir control log state
- # chmod o= *
- # touch {control,log}/ttyd1
- # chmod o= control/* log/*
-
- Edit the control files. See callback(1) for an example.
-
- The log files grow without bound, so you should include them in
- your periodic log file trimming scripts.
-
- Edit /etc/ttytab. The lines that use callback should have
- /usr/etc/getty replaced by a full path to callback, e.g.:
-
- ttyd1 "/usr/local/free/callback/0/bin/callback 2400-baud" dialup on
-
- Make the newly installed version of callback version 0:
- # cd /usr/local/free/callback
- # /bin/rm -f 0; ls -s 2 0
-
- Have init read the changed /etc/ttytab:
- # kill -1 1
- --
- Howard Gayle
- TN/ETX/TT/HL
- Ericsson Telecom AB
- S-126 25 Stockholm
- Sweden
- howard@ericsson.se
- uunet!ericsson.se!howard
- Phone: +46 8 719 5565
- FAX : +46 8 719 8439
-