LPRng-HOWTO: 15 Oct 2001 (For LPRng-3.7.9)
Prev |  | Next

# Appendix C. Testing and Diagnostic Facilities

The LPRng code has the ability to run as non-setuid software, and to use the non-default TCP/IP ports for communication. This facility allows a Test Version to be run in parallel with the normal LPRng software.

To simplify testing and portability issues, a simple test version of the spool queues and jobs has been supplied with the LPRng distribution. These queues can be placed in a suitable location (`/tmp` is common) and the LPRng software tested.

The test version of the software will use the `LPD_CONF` environment variable to specify the location of the configuration file. It will read this configuration file on startup and use the values to override the normal defaults. Since a user could maliciously set up their own configuration files with values that could compromise system security, it is strongly recommended that the test version is not made SETUID root. In fact, the LPRng code will chatter messages when the LPD_CONF ability is enabled and it is run as root.

# C.1. Compiling the Test Version

Edit `src/Makefile`, and uncomment the indicated line. Then run `make` to regenerate the distribution.

        #### ****** TESTING AND SECURITY LOOPHOLE ******************************
        # Define GETENV to allow the LPD_CONFIG environment
        #  variable to be used as the name of a configuration file.  In non-testing
        #  systems,  this is a security loophole.
        #CF := $(CF) -DGETENV

Prev | Home | Next
License |  | Setting Up The Test Version Spool Queues