@(#) README 1.8 93/09/14 18:21:16 This package allows a system to perform uucp communications over a TCP/IP network. It is designed for systems that use TCP/IP, but the vendor-supplied `uucico' lacks any support for the network. There are two programs in this package. The first is a port of the Berkeley `uucpd' daemon (version 5.9 6/1/90) to System V. This daemon is normally run out of `inetd'. It authenticates incoming uucp requests and starts up a uucp session to talk to the remote system. The second program is a new program called `uucpm'. It is a daemon turns a pseudo-terminal (pty) into a device that can be used for network communications. The daemon sits on the master end of the pty. It allows `uucico' to connect to the slave end of the pty and issue requests to connect to systems across the network. Once `uucpm' is installed, it takes a simply one-line modification to the Systems and Devices files to implement TCP/IP capability. Here is a schematic diagram of how the pieces fit together: +---------+ | uucico | +---------+ | | \|/ /dev/ttyXX +---------+ | pty | +---------+ | /dev/ptyXX | \|/ +---------+ +---------+ +---------+ +---------+ | uucpm | | inetd |-->| uucpd |-->| uucico | +---------+ +---------+ +---------+ +---------+ | /|\ | socket | `--------------' When `uucico' connects to the pty, the `uucpm' daemon issues a `host:' prompt. The originating system then sends the name of the remote machine. The `uucpm' daemon establishes a socket to the well known uucp port on that system, and from there on a standard uucp login is performed. Here is a sample `Systems' entry that uses uucpm: chinacat Any TCPIP 9600 - host: chinacat gin: upeavine word: XXXXXX And here is the `Devices' entry that is used: TCPIP ttyp7 - 9600 direct In this example, the `uucpm' daemon is running on /dev/ptyp7. That makes /dev/ttyp7 available for uucp connections. This is what the uucp startup looks like: fixline(5, 9600) getto ret 5 expect: (host:) ^Jlocal uucp (version 1.10) server ready^Jremote host:got it sendthem (chinacat^M) expect: (gin:) login:got it sendthem (upeavine^M) expect: (word:) Password:got it sendthem (XXXXXX^M) ISTRIP cleared imsg > ^PShere=chinacat^@Login Successful: System=chinacat There are two ways to compile and operate the `uucpm' program. In SERVER mode, the `uucpm' daemon is started at boot time and runs continuously. This mode is appropriate for systems that lack an inittab, such as SCO Xenix. In non-SERVER mode, `uucpm' is launched through /etc/init. This mode is appropriate for systems that support an inittab. This program is copyright 1990-1993, Unicom Systems Development, Inc. All rights reserved. You are granted a non-exclusive license to use, modify, copy, and distribute this software subject to the following conditions. You must ensure all copyright notices and license notices remain intact in the copies you use or distribute. Any modifications, other than those in the areas clearly reserved for site-specific modifications, must be marked as such. This software is provided "as is". No warranties have been expressed or implied. Since this license was provided to you at no charge, you must assume the entire risk and liability for all use of this software. This product includes software developed by the University of California, Berkeley and its contributors. INSTALLATION - Edit the site-specific customizations at the top of the `Makefile'. - Run `make'. - Install the `uucpd' and `uucpm' binaries. I place them in a directory called `/etc/local'. They may reside anywhere, but the rest of these directions assume that's where they are. - Ensure your `/etc/services' has a line such as: uucp 540/tcp uucpd # uucp daemon - Add a line to `/etc/inetd.conf' that says: uucp stream tcp nowait root /etc/local/uucpd uucpd Yes, `uucpd' does need to run as root. It is required to do login authentication. (The above example is for the SCO/Lachman networking. Your mileage may vary.) - Decide how many outgoing TCP/IP connections you want to support, and which pty(s) you wish to allocate to them. Myself, I only support a single connection, and allocate the /dev/[pt]typ7 pair. The rest of these notes assume that configuration. - Add the commands to start the `uucpm' daemon. SERVER mode enabled - You need to start `uucpm' at boot time. On SCO XENIX, I added a line to `/etc/rc.d/7/udaemons' saying: /etc/local/uucpm /dev/ptyp7 SERVER mode disabled - If you compiled with SERVER disabled, then you need to run `uucpm' through `init'. On SCO UNIX, I added a line to `/etc/inittab' saying: u7:2:respawn:/etc/local/uucpm /dev/ptyp7 - Declare the pty device(s) available for uucp. This may be done with an entry in your /usr/lib/uucp/Devices file such as: TCPIP ttyp7 - 19200 direct Note that `uucpm' was started on the master end of the pty (ptyp7), but here we give the slave end (ttyp7). If you are supporting multiple sessions, provide similar entries for all of the pty's. - Finally, enter the /usr/lib/uucp/Systems information for machines on the network: coldsnap Any TCPIP Any - host: coldsnap gin: NAME word: PASSWORD ^^^^^^^^^^^^^^ The highlighted portion of the chat script is where the connection to the remote machine is established. All you need to do is send out the machine name, and the `uucpm' daemon will establish a socket to the specified machine. The `uucpm' daemon will prompt with `host:' so you can use that in an expect string. If there is no password on the account, the remote `uucpd' will not prompt for one, and thus it may be left off. Also note that for security reasons, `uucpd' insists that the login shell is `/usr/lib/uucp/uucico'. - At this point, the installation is complete and you are ready to test. If you encounter problems, the `uucpm' program has an undocumented `-D' option to run in a debug mode. THEORY OF OPERATION - SLAVE SIDE When a connection is established upon port 540, the `well known port' for uucp, the `inetd' superserver starts up the `uucpd' program. This program prompts for and receives (through the network) the username and password for a uucp login. It does the loginish things, like setup an environment and make /etc/wtmp entries. Then, it forks off a child to run `uucico' for the remote system. When `uucico' terminates `uucpd' cleans up (i.e. makes the logout entry into /etc/wtmp, shuts down the socket, etc.) and terminates. THEORY OF OPERATION - MASTER SIDE The `uucpm' daemon sits upon the master end of a pty, waiting for an incoming request. When `uucico' attempts a connection to a networked system, it selects one of the TCPIP devices - the slave end of the pty. `uucpm' reads one CR delimited line - the name of the remote system. The chat script shown above starts with an `expect "host:"/send system name' sequence, which provides `uucpm' the information it requires. `uucpm' then attempts to establish a socket to port 540 on the named system, and if successful just passes data between the pty and the socket. When either the socket shuts down (i.e. the remote slave uucico finishes) or the pty shuts down (i.e. the local master uucico finishes), `uucpm' closes up everything. If compiled with SERVER defined, then `uucpm' reopens the pty awaiting another request. If SERVER was not defined then `uucpm' exits, and `init' should start up a new copy. Chip Rosenthal Unicom Systems Development, Inc.