1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 3<html> 4 <head> 5 <meta name="generator" content="HTML Tidy, see www.w3.org"> 6 <title>Testing and Diagnostic Facilities</title> 7 <meta name="GENERATOR" content= 8 "Modular DocBook HTML Stylesheet Version 1.7"> 9 <link rel="HOME" title=" LPRng Reference Manual" href= 10 "index.htm"> 11 <link rel="PREVIOUS" title="License" href="license.htm"> 12 <link rel="NEXT" title= 13 "Setting Up The Test Version Spool Queues" href="x11663.htm"> 14 </head> 15 16 <body class="APPENDIX" bgcolor="#FFFFFF" text="#000000" link= 17 "#0000FF" vlink="#840084" alink="#0000FF"> 18 <div class="NAVHEADER"> 19 <table summary="Header navigation table" width="100%" border= 20 "0" cellpadding="0" cellspacing="0"> 21 <tr> 22 <th colspan="3" align="center">LPRng Reference Manual: 5 23 Sep 2003 (For LPRng-3.8.22)</th> 24 </tr> 25 26 <tr> 27 <td width="10%" align="left" valign="bottom"><a href= 28 "license.htm" accesskey="P">Prev</a></td> 29 30 <td width="80%" align="center" valign="bottom"> 31 </td> 32 33 <td width="10%" align="right" valign="bottom"><a href= 34 "x11663.htm" accesskey="N">Next</a></td> 35 </tr> 36 </table> 37 <hr align="LEFT" width="100%"> 38 </div> 39 40 <div class="APPENDIX"> 41 <h1><a name="TESTING"></a>Appendix C. Testing and Diagnostic 42 Facilities</h1> 43 44 <div class="TOC"> 45 <dl> 46 <dt><b>Table of Contents</b></dt> 47 48 <dt>C.1. <a href="testing.htm#AEN11656">Compiling the 49 Test Version</a></dt> 50 51 <dt>C.2. <a href="x11663.htm">Setting Up The Test Version 52 Spool Queues</a></dt> 53 54 <dt>C.3. <a href="x11691.htm">Running the Test Version 55 Software</a></dt> 56 </dl> 57 </div> 58 59 <p>The <b class="APPLICATION">LPRng</b> code has the ability 60 to run as non-setuid software, and to use the non-default 61 TCP/IP ports for communication. This facility allows a <span 62 class="emphasis"><i class="EMPHASIS">Test Version</i></span> 63 to be run in parallel with the normal <b class= 64 "APPLICATION">LPRng</b> software.</p> 65 66 <p>To simplify testing and portability issues, a simple test 67 version of the spool queues and jobs has been supplied with 68 the <b class="APPLICATION">LPRng</b> distribution. These 69 queues can be placed in a suitable location (<tt class= 70 "FILENAME">/tmp</tt> is common) and the <b class= 71 "APPLICATION">LPRng</b> software tested.</p> 72 73 <p>The test version of the software will use the <var class= 74 "LITERAL">LPD_CONF</var> environment variable to specify the 75 location of the configuration file. It will read this 76 configuration file on startup and use the values to override 77 the normal defaults. Since a user could maliciously set up 78 their own configuration files with values that could 79 compromise system security, it is strongly recommended that 80 the test version is not made SETUID root. In fact, the <b 81 class="APPLICATION">LPRng</b> code will chatter messages when 82 the LPD_CONF ability is enabled and it is run as root.</p> 83 84 <div class="SECT1"> 85 <h1 class="SECT1"><a name="AEN11656">C.1. Compiling the 86 Test Version</a></h1> 87 88 <p>Edit <tt class="FILENAME">src/Makefile</tt>, and 89 uncomment the indicated line. Then run <var class= 90 "LITERAL">make</var> to regenerate the distribution.</p> 91 92 <div class="INFORMALEXAMPLE"> 93 <a name="AEN11661"></a> 94<pre class="SCREEN"> 95 #### ****** TESTING AND SECURITY LOOPHOLE ****************************** 96 # Define GETENV to allow the LPD_CONFIG environment 97 # variable to be used as the name of a configuration file. In non-testing 98 # systems, this is a security loophole. 99 #CF := $(CF) -DGETENV 100</pre> 101 </div> 102 <br> 103 <br> 104 </div> 105 </div> 106 107 <div class="NAVFOOTER"> 108 <hr align="LEFT" width="100%"> 109 110 <table summary="Footer navigation table" width="100%" border= 111 "0" cellpadding="0" cellspacing="0"> 112 <tr> 113 <td width="33%" align="left" valign="top"><a href= 114 "license.htm" accesskey="P">Prev</a></td> 115 116 <td width="34%" align="center" valign="top"><a href= 117 "index.htm" accesskey="H">Home</a></td> 118 119 <td width="33%" align="right" valign="top"><a href= 120 "x11663.htm" accesskey="N">Next</a></td> 121 </tr> 122 123 <tr> 124 <td width="33%" align="left" valign="top">License</td> 125 126 <td width="34%" align="center" valign="top"> </td> 127 128 <td width="33%" align="right" valign="top">Setting Up The 129 Test Version Spool Queues</td> 130 </tr> 131 </table> 132 </div> 133 </body> 134</html> 135 136