NAME

olprsrv - PPR RFC 1179 (lpr/lpd) server


SYNOPSIS

olprsrv [--help] [--version] [--hostname] [--fully-qualify]
[-s port] [-p] [-A seconds] [-S list]


DESCRIPTION

In PPR version 1.32, lprsrv was heavily reworked. Most of the command line options have changed and the access control scheme has been radically altered. The pre-1.32 lprsrv is preserved as olprsrv. You should not use it except as a stopgap measure until you can switch over to the new one.

olprsrv is a Berkeley lpr/lpd compatible print server. It will accept print jobs and invoke ppr to handle them. If the requested printer is not defined in PPR, olprsrv will hand them to the computer's native spooling system which is generally lp or lpr).

Access Control

Unless invoked with the -p (permissive) switch, olprsrv will only accept connections from hosts allowed by /etc/hosts.lpd, /etc/hosts.lpd_deny, and /etc/hosts.equiv.

Each line in an authorization file must be either the fully qualified name of a host (That is, as returned by gethostbyaddr() would return it) or the name of a domain. If it is a domain, it must begin with a period. A domain name is considered to match all hosts in that domain.

For example, if the file /etc/hosts.lpd contains:

    # This is /etc/hosts.lpd
    .cs.trincoll.edu
    mouse.cc.trincoll.edu

and /etc/hosts.lpd_deny contains:

    # This is /etc/hosts.lpd_deny
    fiend.cs.trincoll.edu

then the computers ``starbase.cs.trincoll.edu'' and ``mouse.cc.trincoll.edu'' can connect but ``fiend.cs.trincoll.edu'' cannot.

If the -p switch is used, any client can connect and clients not listed in /etc/hosts.lpd or /etc/hosts.equiv need not connect from a reserved port.

If you don't know the fully qualified form of the name of a host you wish to put in one of the authorization files, the --fully-qualify option may be used to determine it:

    $ /usr/lib/ppr/lib/olprsrv --fully-qualify=shakti
    shakti.cc.trincoll.edu

Setup With Inetd

To use olprsrv through inetd, make sure a line like this is in /etc/services:

    printer             515/tcp         spooler

Then put a line like this in /etc/inetd.conf:

    printer stream tcp nowait ppr /usr/lib/ppr/lib/olprsrv olprsrv

Or, if you want to run it in `permissive' mode:

    printer stream tcp nowait ppr /usr/lib/ppr/lib/olprsrv olprsrv -p

If you wish to use olprsrv and lpd together, you must either run olprsrv on a port other than 515, or you must arrange for inetd to be started before lpd. If inetd is started before lpd, lpd will be unable to bind to port 515 but will still work otherwise and olprsrv will pass remote jobs to lpr. (Unfortunetly, some versions of lpd will die when they fail to bind to the port.)

Setup for Standalone Mode

If olprsrv is run with the -s switch it will run in standalone mode. The argument of the -s switch is the name or number of the TCP/IP port on which it should listen for requests. For example, you might put this command in /etc/rc.local:

    /usr/lib/ppr/lib/olprsrv -s printer

Queue Listing Options

When a client requests a queue listing for a PPR queue, olprsrv will return the output of ppop lpq for the short format and ppop list for the long format. The ppop lpq output is designed to look similiar to the output of BSD lpq.

If the -A switch is used, olprsrv will pass the switch and its argument on to ppop. The argument is an integer which indicates an age in seconds. Arrested jobs older than the specified age will not be shown in queue listings.

When a client requests a queue listing for an LPR/LPD queue, olprsrv simply executes lpq and returns the output.

When a client requests a queue listing for a System V lp queue, olprsrv runs lpstat. Some lpq options are not supported for lp queues.

Removing Jobs

Job access control is fully implemented for PPR queues. An ordinary user may only cancel jobs which he submitted. He must send the cancel request from the machine the job origionated at. The user ``root'' on any machine may cancel any job submitted from that machine.

The user ``root'' on certain machines may cancel any job from any machine. The list of machines on which root has this privledge is specified with the -S switch. (The mnemonic is ``Super Root''.) The argument is a colon separated list. The machine names used in this list should be fully qualified. The olprsrv --fully-qualify switch may be used to determine the fully qualified form of a name:

    $ /usr/lib/ppr/lib/olprsrv --fully-qualify cberry.trincoll.edu
    cberry.cc.trincoll.edu
    $

An entire domain can be included by specifying the domain name starting with a dot. For example, you might put this in /etc/inetd.conf:

    printer stream tcp nowait ppr /usr/lib/ppr/lib/olprsrv olprsrv -S .cs.trincoll.edu:mouse.cc.trincoll.edu

This will grant ``Super Root'' privledge to hosts such as ``sisko.cs.trincoll.edu'', ``ro.cs.trincoll.edu'', and ``mouse.cc.trincoll.edu'' but not ``pauling.labs.trincoll.edu''.

If no -S switch is used, olprsrv will attempt make a default list containing only the fully qualified form of the name of the host it is running on. This process requires several DNS queries, so you may wish to do it once and add an -S switch to the olprsrv command line. The --hostname switch will determine the fully qualified name of the node it is running on and print the result:

    $ /usr/lib/ppr/lib/olprsrv --hostname
    mouse.cc.trincoll.edu
    $

This name may then be added to the olprsrv command line in /etc/inetd.conf:

    printer stream tcp nowait ppr /usr/lib/ppr/lib/olprsrv olprsrv -S mouse.cc.trincoll.edu

Access control for lpr and lp queues is much more primative. Any user may cancel any job submitted through olprsrv.

Support for DEC Extensions

The version of lpr supplied with DEC OSF/1 has many more options than the BSD version. Using these extra options results in extra lines in the queue file which lpr sends to olprsrv. These extensions are supported by olprsrv whenever possible.


FILES

The directory /tmp is used for temporary files. This program reads the files /etc/hosts.lpd /etc/hosts.lpd_deny, and /etc/hosts.equiv.

This program may invoke ppr(1), ppop(1), lp(1), cancel(1), lpstat(1), lpr(1), lpq(1), and lprm(1).


SEE ALSO

ppr(1), lp(1), lpr(1), ppop(1), lpstat(1), lpq(1), cancel(1), lprm(1). ``PPR, a PostScript Print Spooler'', ``Installing and Using PPR'', inetd.conf(5), and inetd(8).


HISTORY

PPR was written at Trinity College during 1993--1997.


AUTHORS

David Chappell, Trinity College Computing Center, Hartford, Connecticut.