1Version LPRng-3.8.22 - Fri Sep  5 08:45:33 PDT 2003
2
3   Updated the LPRng, IFHP, and LPRngTool LICENSE with the new
4   Artistic License from the www.opensource.org web site.
5
6   Updated the DISTRIBUTIONS/FreeBSD port information to meet the current
7   (new) port format.
8
9   Renamed LPRng HOWTO to LPRng Reference Manual.  Added notes to the
10    Printing Cookbook.
11
12  lpf.c - removed log() and fatal().
13    (Suggested by: Torsten Rohlfing <rohlfing@IGL.Stanford.EDU>)
14  Filter command line options now allows ${X} to reference a control file
15    option.  You can now use:
16	$X   with -X<value>      (if present)
17	$0X  with -X <value>     (adds space)
18	$'X  with -X'<value>'    (adds quotes)
19	$-X  with  <value>       (drops key)
20	$0-X with  <value>       (same as $-X)
21	$'-X  with  '<value>'    (adds quotes)
22	${ss}  with value of printcap option ss
23	$'{ss} with quoted value of printcap option ss or job control file option
24
25    Example:  filter=ifhp -Z '${S},${O}'
26    This will get the O and S options from the job control file.  Note that
27    $S is the 'printer comment name' and '$P' is the 'actual printer name'.
28    (prompted by a question from: Paul Armstrong <army@cyber.com.au>)
29
30   Fixed vars.c 'fifo' option - 
31     -{ "fifo", 0, STRING_K, &Fifo_DYN,0,0,0},
32     +{ "fifo", 0, FLAG_K, &Fifo_DYN,0,0,0},
33   (Thanks to the Debian folks - especially Craig Small <csmall@debian.org>)
34
35   Fixed up printer@remotehost%port parsing so you can do:
36      localhost:lp=pr@%P and it gets expanded to:
37      localhost:lp=pr@localhost
38    This is pretty far down the extrema of wierd... But somebody
39    came up with a use for it. Sigh...
40   (Lots of head scratching caused by: Michael J. Carter <mcarter@lanl.gov>)
41
42   Filters no longer have file descriptor 3 connected to the 'accounting
43   file'.  Since the '-a accounting_file' option provides the name of the
44   file and this should be used instead.
45
46   plp_snprintf now handles '*' in floating precision correctly.
47   (Patch by: Henrik Edlund <henrik@edlund.org>)
48
49   if( Run_OF_filter(), Status_file_DYN ) problem found.
50   (Thanks to the Debian List: Sam Lown <samuel.lown@cern.ch>
51     and Craig Small <csmall@debian.org>)
52
53   If you want to use force_lpq_status according to the docs (HOWTO), the
54   following patch has to be applied. Otherwise it doesn't work when you have
55   several ip netmasks listed as in the example:
56     force_lpq_status=s=pc*.eng.com,130.192.12.0/24,l=sun*.eng.com
57   Change is:
58     -       Split(&l,t,Value_sep,0,0,0,0,0,0);
59        Value_sep DEFINE( = " \t=#@" );
60     +       Split(&l,t,File_sep,0,0,0,0,0,0);
61        File_sep DEFINE( = " \t,;:" );
62   (Pointed out to me by: Henrik Edlund <henrik@edlund.org>)
63
64   Updated the configure and src/krb5_auth.c to be consistent with latest Kerberos
65   releases.
66
67   Added 'accounting_namefixup' option as suggested by Henrik Edlund <henrik@edlund.org>
68    accounting_namefixup=list[,list]*
69       where list is:   host(,host*)[=user(,user*)]
70    The incoming job is check to see if the originating host (RemoteHost_IP)
71    is in the list of hosts;  the first matching one found is used.
72
73    Each host list has the format: host,host... where host has the
74    same format used for the 'oh' and other host name matching
75    options.  You can  use '!host' to invert matching.  For example:
76    host1,127.*,!somehost
77
78    When a host match is found,  the name to be used for the user
79    is determined from the user list; if none is specified then no
80    changes are made.  Each entry in the user list has the format
81    ${option}  or 'name'; the ${option} values are extracted from
82    the control file (capital letters) or printcap/configuration
83    information (lower case letters/names).  The first non-empty
84    value found is used.
85
86    For example:   ${R},${L},${accounting_name},default
87     If the control file 'R' option is present, the R option value is used
88     else if the control file 'L' option is present, the L option value is used,
89     else if the printcap/config option 'accounting_name' is not empty then
90     it is used, otherwise the 'default' value is used.
91
92   (Original suggestion and patches by:  Henrik Edlund <henrik@edlund.org>)
93
94   Fought with the various Kerberos distributions and appear to
95   have a new version that compiles with the Kerberos 1.3.1 release
96   and with other legacy releases.
97
98   Added the "# REJECT NOT SERVER" comment to the lpd.perms file to cause
99   LPRng to reject all jobs/connections from external (non-localhost)
100   clients
101
102Version LPRng-3.8.21 - Mon Mar 17 07:06:57 PST 2003
103
104  The LPQ 'stalled' indication is now based on status information updates,
105  rather than the job run time.  If there has been no status update for the
106  specified stall time, i.e. - log file (lf=...) or status file (ps=...) then
107  the stalled indication will be displayed.
108
109  Karol Lewandowski discovered that psbanner, a printer filter that
110  creates a PostScript format banner and is part of LPRng, insecurely
111  creates a temporary file for debugging purpose when it is configured
112  as filter. The program does not check whether this file already
113  exists or is linked to another place writes its current environment
114  and called arguments to the file unconditionally with the user
115  id daemon.
116    -- reported by security.debian.org
117    -- Debian Security Advisory DSA 285-1
118      Fixed.
119
120Version LPRng-3.8.20 - Tue Jan 7 09:18:15 PST 2003
121
122  The lpd.conf now uses (EMPTY STRING) for defaults which are
123  empty strings... Before it was '0'. Oops.  Patrick
124
125  At the request of Karl Kopper <karl@unfiw.com> I reviewed the issues
126  of queue starting,  polling the queues for done jobs, and other
127  issues.  A small side effect of this is that the LPD server process
128  now starts printing processes.  This is actually beneficial as it can
129  now limit the total number of printing processes and allow some
130  LPQ/LPC/LPR etc actions. Here is a summary of the current operation
131  and the options that control it:
132   Options:
133      lpd_force_poll - forces a check of the spool queues, even when there
134        is most likely no reason to.  Used when you have some REALLY odd
135        programs running that will directly manipulate the LPD spool queues
136        and you do not want to have to connect to the server.
137        (default is OFF).
138     lpd_poll_time - interval in secs between checking queues for work.
139        Done if there is some reason to suspect that some spool queue
140        had problems and might need to be restarted.  This also handles a
141        race condition where a job arrives just as the process servicing
142        the spool queue exits.
143        (default is 5 minutes or 600 seconds)
144     lpd_poll_start_interval - if there are spool queues which need service,
145        fork up to 'lpd_poll_servers_started' processes at a time and then
146        wait for lpd_poll_start_interval seconds before forking more.
147        This prevents the deadly situation where the LPD server is started
148        and in turn  starts a gizillion process; the rc starupt scripts
149        may fail because there are no free processes (I kid you not on this
150        one, it drove me nuts trying to find out why the system would crash
151        ONLY when LPD ran with NO debugging - the IO caused it to slow down
152        enough so that the other scripts could run).
153        (default now 1 second)
154     lpd_poll_servers_started - maximum number of processs to fork to be
155        spool queue servers at a time.  this prevents the massive forking a huge
156        number of processes at once.
157        (default now 3)
158     max_servers_active - the maximum number of children of LPD that are handling
159        spool queues.  Since each spool queue process may have up to 5 children,
160        and these in turn make fork other ones,  you should make sure that the
161        limits for the LPD server are set as high as possible, or use this
162        value to throttle activity.  The actual limit used by LDP value
163        is the minimum of max_servers_active value and
164           maximum children processes per process/2
165        as determined by the getrlimit(), sysconf(), or other appropriate system
166        calls.  Most problems reported by systems with heavy load are caused by
167        restrictive process limits.  Run 'lpd -F -D1 | grep Get_max_servers'
168        (as an ordinary user) and see the limits for processes and file
169        descriptors.
170
171    Summary:
172     lpd_force_poll=0
173     lpd_poll_time=600   (5 minutes)
174     lpd_poll_start_interval=1  (1 second)
175     lpd_poll_servers_started=3  (3 per start interval)
176     max_servers_active=1024
177
178    Experiments with heavily loaded systems (FreeBSD 4.7, Solaris
179    2.8, Linux RedHat 7.3, and Mandrake 8) indicate that these
180    values should not cause system trauma.  Your milage may vary;
181    if the load average goes up very high, then set lpd_poll_start_interval
182    to a larger value and/or decrease the lpd_poll_servers_started
183    value.  Both is best.  The amount of free memory seems to be
184    the limiting factor on the system loading.
185
186    When you send a job via LPR, the LPD server forks a 'service socket'
187    process to handle job reception;  in previous versions after receiving
188    the job the process would then call Do_queue_jobs() to take on the
189    duties of the 'handle the jobs in the spool queue' process.  In
190    this version the 'service socket' process sends a 'start queue'
191    request to the LPD server and then exits.  The LPD service will
192    then fork a process to become the 'handle the jobs' process.
193    Similarly, when an lpc operation needs to start a 'handle the jobs'
194    process,  a message is sent to the LPD server to start the process.
195
196    While there is no real difference in performance on lightly loaded
197    systems,  there is a big difference on heavily loaded systems.  Now
198    the LPD server can control the total number of active spool queues
199    much easier,  and the system does not get overloaded as easily.
200
201    Also, the LPRng server does not clobber the system at startup
202    time as badly now.
203
204    By the way,  queues which are started or have jobs put in them
205    by LPC or LPR have priority over queues that are started by the
206    LPD process looking for work,  and the LPD server will brutally
207    try to start as many as possible.  Thus, if you do an 'lpc start all'
208    you can bring the system to its knees for a short time until
209    all of the forking and file reading activity is completed.
210    Since only the administrator can do an 'lpc start' command,
211    this should not be an issue...
212
213  Keith ("HP Printer Dies Horrible Death") Rinaldo
214  <rinaldok@egr.unlv.edu> has reported that some HP printers lock
215  up and do not report status, etc., and display a nasty low level
216  error message on the printer console such as 7900FE.  The IFHP
217  filter or LPD would sit there waiting for a response.  The 'keepalive'
218  TCP/IP facility does not solve this problem,  as sometimes the
219  TCP/IP stack is OK but the job handling code (i.e. - print engine)
220  is non-functional.  You need to try to get a response from the
221  printer,  which is what the IFHP filter does.
222
223  NOTE: send_job_rw_timeout default value is now 0 (no timeout).
224  In order to not surprise new users,  the default value for
225  send_job_rw_timeout is now 0, i.e.- no timeout.  Details below.
226
227    The send_job_rw_timeout is now used to set a maximum time that
228    the printer (network, parallel port or serial port) connection
229    will be 'inactive', i.e. - no data input and not available for
230    data output, OR, starting with this release, that the various
231    filter processes do not update the status file (by default,
232    ${spooldir}/status.printer).  When the timeout expires the job
233    will terminate with a JTIMEOUT status, which will be treated
234    as a JFAIL status.
235
236       /* LPRng internal        process exit status */
237       #define JTIMEOUT 43      /* 12 timeout */
238    
239    The IFHP filter (ifhp-3.5.11) now has a similar 'send_job_rw_timeout'
240    option that has the same effect as the LPD 'send_job_rw_timeout'.
241    If the file descriptor used to communicate with the printer is
242    inactive for this period of time,  then the IFHP filter will
243    exit with a JTIMEOUT error code, which will be treated as a
244    JFAIL status.
245
246    This will only work if the printer goes totally catatonic and
247    does not reply with status, or the print filter goes catatonic
248    and does not update the status file.  This situation, unfortunately,
249    can happen when the printer is taken offline in the middle of
250    a job in order to put paper in the paper tray.  You can't win
251    them all...  but if the time taken to put the paper in the tray
252    is less than the send_job_rw_timeout then you should be OK.
253
254Version LPRng-3.8.19 - Thu Dec 5 12:34:45 PST 2002
255  Check_for_missing_files was not writing control file.
256  (Spotted by Keith ("Wanna bet on that?") Rinaldo <rinaldok@egr.unlv.edu>
257
258Version LPRng-3.8.18 - Mon Dec 2 12:08:34 PST 2002
259  Added the 'fifo' option  - this now makes LPRng handle
260  one incoming job at a time in FIFO order.  If you send
261  jobs A B C then they get delivered in order A B C.
262  For users who MUST have sequential delivery of jobs.
263
264  Some Linux distributions set 'unlimited' resources for all
265  parameters, such as user processes.  Added limit of 1024
266  processes for such cases as the system will die a horrible
267  death at startup.
268
269
270Version LPRng-3.8.17 - Sat Oct 26 20:11:28 PDT 2002
271  Found a race condition between LPD printing, LPRM, and LPC actions
272   that would cause LPD to stop printing if you removed or did
273   an LPC action on a job.  After a bit of thought, decided that
274   the job would get moved or removed anyways.  Sigh...
275   But you might get a bogus error message about 'cannot
276   find id' as the job hold file has been removed.
277
278Version LPRng-3.8.16 - Mon Aug 12 15:26:05 PDT 2002
279
280  lpr now honors :mx=xx values so you can check job size
281  before you send it.
282   (Suggested by:  Rick Cochran <rcc2@cornell.edu>)
283
284  configure --disable-werror removes the -Werror option from CFLAGS.
285   (From the wish list of: Rick Cochran <rcc2@cornell.edu>)
286
287  Bad incoming jobs are removed.  You do not get the jobs
288  left in the queue as errors.  Note - spoolers will
289  keep trying to send jobs even when they get error and
290  sit in an endless loop.  No solution for this one except
291  to get a better print spooler or whatever...
292
293Version LPRng-3.8.15 - Sun Aug 11 13:11:48 PDT 2002
294  
295  Remove_done_jobs
296    - checks to see if the INCOMING flag is set BEFORE
297    it checks to see if there is an error and only checks
298    for the data files if the ERROR or DONE flags are set.
299    This removes a race condition.  It was bloody obvious
300    when I looked at it... I wonder why I did not see it
301    before?
302
303Version LPRng-3.8.14 - Tue Aug  6 09:14:06 PDT 2002
304
305  man page fixes.
306    (Spotted by the eagle eyes of: Eric S. Raymond <esr@golux.thyrsus.com>)
307
308  Based on third hand reports, some installations of GNU compilers
309  on HPUX and other systems now have 'fd_set' data types.
310  I have modified configure so that it checks for 'fd_set' being
311  present.  I wish there was a way to read the man pages and
312  find out if this was the real case.
313
314  The configure 'enable-ssl/disable-ssl/' option was not working.
315  Once again beating on autoconf 1.53 ...  It now understands
316  'enable-OPTION' and 'disable-OPTION'.
317  
318  The Samba examples in the LPRNG-Howto were not consistent.
319   changed 
320        queuepause command = /usr/sbin/lpc -P%p stop
321        queueresume command = /usr/sbin/lpc -P%p start
322   to
323         queuepause command = /usr/local/sbin/lpc stop %p
324         queueresume command = /usr/local/sbin/lpc start %p
325   (Suggested by: Jim Van Sickler <vansickj-eodc@Kaman.com>)
326
327Version LPRng-3.8.13 - Mon Jul 22 09:07:57 PDT 2002
328
329  Major Enhancement In Printcap and Configuration Functionality
330  After much consideration, added the 'client.xxx' and 'server.xxx'
331  facility.  Briefly,  if you have a printcap entry of the form
332  client.xxx or server.xxx then this can be used to set the corresponding
333  xxx variable when the printcap entry is used by the lpd server
334  or the LPRng client programs lpr, lpq, lprm, checkpc, etc.
335
336    Entry               Program Type          Sets
337    server.xxx = vvv    lpd (server)          xxx = vvv
338    client.xxx = vvv    lpr,lpq... (client)   xxx = vvv
339
340  The purpose of this enhancement is to allow a single printcap
341  entry to be used for both client and server operation, especially
342  in situations where the lpd server is forwarding or sending jobs
343  to another lpd queue.
344
345  Example of use:
346    lp:
347        # used by clients, forcess them to send to
348        # specified server
349     :lp=%P@server.hostname:force_localhost@
350        # used by lpd server
351        # the server will now send jobs to the
352        # specified destination
353     :server.lp=%P@destination
354
355  This is equivalent to and replaces the :client and :server
356  printcap flags, as shown below:
357
358    lp:client
359     :lp=%P@server.hostname:force_localhost@
360    lp:server
361     :lp=%P@destination
362
363  This selection operation also works with values in the
364  lpd.conf file, allowing global overrides for clients and
365  servers.  (I can't imagine a use for this,  but it is there
366  if somebody wants to use it.)
367
368  The lpc client and lpc server commands will display the
369  selected client.xxx and server.xxx values.  They are also
370  propagated to the PRINTCAP_ENTRY environment variables
371  for filters.
372
373  Typo's in documentation corrected.
374  (Patch by: Stepan Kasal <kasal@math.cas.cz>)
375
376  lpr Kerberos authentication failures were not being reported.
377  (Problem noticed by: Rick Cochran <rcc2@cornell.edu>)
378
379  Added SSL authentication.  See the README.SSL.SECURITY file for
380  the truly complicated details.  Note that testing with certificates
381  signed by non-root CA indicates that the client is not sending
382  a certificate, even though one has been requested and the
383  certificates and signing certs are in the right places.
384
385  lpd.conf did not have 'include' functionality working.
386    (Patch by: Stepan Kasal <kasal@math.cas.cz>)
387  
388  Added Yet Another LPRng Option: user_is_authuser
389      user_is_authuser:
390       if( header_info && User_is_authuser_DYN
391               && (s = Find_str_value(header_info,AUTHUSER,Value_sep)) ){
392               Set_str_value(&job->info,LOGNAME,s);
393               DEBUG1("Check_for_missing_files: authuser '%s'", s );
394       }
395  printcap:
396  lp:auth=kerberos5:user_is_authuser:...
397   Causes the principle name to be used as the user name.
398
399  lpq_in_perl was screwed up
400  (Patches by: Anthony Thyssen <anthony@cit.gu.edu.au>)
401
402  generate_banner core dumped.  Turned out not to be setting
403  banner format ("f") when generating entry, so that control
404  file generation core dumped when generating new control file.
405  (Problem reported by: "Keith Rinaldo" <rinaldok@egr.unlv.edu>)
406
407  Updated Remove_done_jobs to sort jobs by completion time.
408  Added 'Set_nz_flag_value' function to stop the ERROR_TIME value
409  from being gratuitously updated by various routines.
410
411  Found possible cause of 'job data files not removed' problem
412  in the Remove_done_jobs() code.  There is a possibility of a
413  data file being orphaned if a 'done job' is removed by the
414  spooler at the same time that another processes such as lpq
415  information gathering examines the print job.  Rare, but possible.
416
417  Put warnings in the LPRng-HOWTO section on Samba about the
418  done_jobs option and interaction with SAMBA job status.
419  (Suggested by: Marcus Manske <manske@dramedia.de>)
420
421  Added yet another wakeup and kick to the master server process
422  so that printer pools will respond faster.  Sigh...
423
424Version LPRng-3.8.12 - Mon May 6 08:21:49 PDT 2002
425
426  patch for TCPWRAPPERS added a gratuitous -lwrap to the src/Makefile.
427  (Spotted by: Rabellino Sergio <rabellino@di.unito.it>)
428
429Version LPRng-3.8.11 - Thu Apr  4 07:49:30 PST 2002
430
431  Subtle problem when a filter fails and produces zero
432  length file.  This is now treated as a JABORT level
433  error.  The problem is that RFC1179 treats a file
434  length as 0 as a 'read until end of file on socket'.
435  This means that folks who have filters that WILL produce
436  zero length files need to do something to produce at
437  least one byte of 'dummy' output.
438    (Brought to my attention by:
439      Sergij Kovalenko <s.kovalenko@drgueldener.de>)
440
441  Fixed up a portability issue for Solaris 2.6, in linksupport.c.
442  Need to do an unsigned long cast to do comparison of INADDR_NONE.
443  (Original patch from: Dr Andreas F Muller <afm@othello.ch>)
444
445  Added patches to support TCP wrappers.  Use:
446    configure --enable-tcpwrappers
447  (Patch by:  Tobias Burnus <burnus@net-b.de>)
448
449  Added a 'Linux Standards Base' (LSB) style startup script
450    for Linux systems.
451  (Provided by:  Tobias Burnus <burnus@net-b.de>)
452
453  Missing initialization for statb
454  (Patch by: Rob Joyce <robjoyce@EE.Princeton.EDU>)
455
456  Clobbering Logfile_LPD in common/lpd.c
457  (Patch by: Hugh McDonald <hugh@gw1.symac.dhs.org>)
458
459  Added a call to 'Remove_done_jobs()' in lpd_status.c;
460   then modified Remove_done_jobs to return indication that
461   a job was removed so that lpd_status.c would RESCAN
462   queue... Sigh... OK, but it now works 'right'.
463  (Stale jobs not getting removed noted by:
464    Richard Ems <r.ems.mtg@gmx.net>)
465
466  The problem of saturating a server when checking for work was
467   re-examined.  The new approach is:
468    a) if some work was done,  then check for success at
469        lpd_poll_time intervals.  If there remains work to
470        be done and there is no process actively doing the
471        work, mark the queue as needing service.
472    b) for the marked queues, start at most 'lpd_poll_servers_started'
473       queues at once,  and start these at intervales of
474       'lpd_poll_start_interval' seconds.
475   The effect of this will be to limit the number of processes
476     that LPD will start at a time.
477   (Pushed to look at the problem by: Johan Bengtsson <elijah@dd.chalmers.se>)
478
479  Found a very odd bug... the escape code for '\:' in printcap entries
480   appears to be broken.  The fix was to assume that the only places where
481   it would be used was in 'filter' or other options where the 'expand
482   escape sequences' code would be called and would take care of replacing
483   "\:" by a ":".
484.
485  The 'Printer_device()' routine, when opening a filter as an output
486  device, did not provide 'stdout' for the filter.  Some filters such
487  as pap from Appletalk seem to need this as they produce messages
488  on STDOUT (fd 2) as well as STDERR (fd 3).
489
490Version LPRng-3.8.10 - Sun Mar 31 11:31:19 PST 2002
491
492 printcap.5 had :as and :ae examples reversed
493  (Spotted by the guy with the red pen and the eagle eyes:
494    Craig Small <csmall@eye-net.com.au>)
495
496 Slew of patches sent in by Tim Waugh <twaugh@redhat.com> 
497   - silly little kerberos include file patch
498   - can't spell printer patch
499   - si no moleste the files in the spool queue patch
500     (already done)
501   - added configure ability to find 'pr' program
502   - GCC flags -W -Wall -Werror -Wno-unused-parms
503      - also fixed up &*)*(&)*(& unsigned and signed
504        integer casts
505 Added patch to allow tcp wrappers to be used.  Configure updated
506   configure --enable-tcpwrappers     use tcp wrappers (-lwrap)
507   (Patch from: Tobias Burnus <burnus@net-b.de>)
508
509 The authentication and connection information for permissions
510  checking is now recorded so it can be used for permissions checking.
511  and a couple of new fields have been added.
512  The following permission tags now have the indicated values
513   UNIXSOCKET - true (match or 1) if connection was over a UNIX socket,
514     i.e. - the local host.
515   When SERVICE=P 
516     REMOTEHOST - the original remotehost from which the job was sent
517      (previously was the HOST value)
518     REMOTEPORT - the original port from which the job was sent
519      (previously was undefined )
520     AUTH - true (match or 1) if job sent using authentication
521     AUTHTYPE - authentication type
522     AUTHUSER - value of authentication key for user who originated
523        job.  For example, for kerberos this is the user's principle value
524     AUTHFROM - value of authentication key for sender of job.  For example,
525        if the job was from the LPR program,  this would have the same
526        value as AUTHUSER.  However, if it was forwarded from a server,
527        it would have the server's authentication name or value.
528  lpd.perms.in update to match the new entries
529   (Requested by: Toby Blake <toby@cogsci.ed.ac.uk>)
530
531  Once again the checkpc file creation stuff is modified so that
532   it can create files in a directory NOT owned by the lpd group/user.
533   This is necessary for log files and other items.  Note that this
534   MAY cause problems for log file truncation as you need to copy
535   file contents rather than just renaming them.  But it turns out
536   that I am already doing this so it appears to be OK.
537     CAVEAT EMPTOR.
538   (Reported by: Torsten Wiebesiek <wiebesiek@tnt.uni-hannover.de>)
539
540  Usage messages now display version information as well as options
541   and available debug flags.  Idea shamelessly swiped from somebody else.
542   (Stolen from: 'Guido' Van Rossen)
543
544Version LPRng-3.8.9 - Sat Mar  2 15:02:11 PST 2002
545
546  The 'unix_socket_path' and 'lpd_port' options have been modified
547  slightly to correct some ambiguous behaviour, and a 'lpd_listen_port'
548  option has been added.
549    lpd -p lpd_listen_port -P unix_socket_path
550     - the -p and -P command line options override the
551       lpd.conf lpd_listen_port and unix_socket_path options
552     - the default values for lpd_listen_port is "", indicating
553       the use the 'lpd_port' value.
554   The value "off" suppresses opening a port or socket.
555
556     This allows the following operation:
557     No unix socket:
558        lpd -Poff   (/etc/lpd.conf unix_socket_path=off)
559     No lpd listening socket:
560        lpd -poff   (/etc/lpd.conf lpd_listen_port=off)
561        Note that LPD will still open connections to the
562        remote LPD servers using 'lpd_port'.
563   If you want to override the destination lpd port, you must
564      modify the lpd.conf file.
565
566  Jeff Chua of FedEx (Federal Express) <jchua@fedex.com>
567  showed up at my office armed with a set of test scripts and a laptop
568  running LPRng.  He demonstrated the problem of the 'missing datafile'
569  during job transfers.  I have fixed the problem in this release.
570  See the UTIL/testpr file.  
571   (Thanks to: Jeff Chua: <jchua@fedex.com>)
572    
573  more autoconf + automake + libtool insanity:
574     WITH_LINK removed
575     STRIP now used by libtool, changed to STRIP_OPTION
576     Added AC_C_VOLATILE (see note on volatile below)
577  (Reported by: Rick Troxel <rick@helix.nih.gov>)
578
579  Forced a rescan of the input queue when the number of done jobs
580   exceeds 'done_jobs' or the time since the first done job exceeds
581   done_jobs_max_age .  This solves a silly problem that shows up
582   when you have a slew of jobs in a queue,  the subserver is processing
583   them,  and no new jobs arrive while it is processing them.  Under these
584   conditions the 'done jobs' would not have been removed until all were
585   done.  If you were printing 1000 jobs then you could not submit any
586   new jobs, even though you have done 999 of them... :-)
587
588   Sigh... these boundary conditions are the pits.
589
590  Added the 'volatile' option to declarations of static and nonstatic
591  variables updated in signal handlers.  You really don't want to
592  hear the frothing about over-enthusiastic optimizing compilers, do you?
593
594  Ran the Kerberos tests, discovered minor definition problems with
595  krb4_auth.h and Kerberos4 support.  Have no way to test this,  hope
596  the problem is resolved.
597
598  The AUTHUSER information received at job submission time was not
599  being stored and used later when printing permissions were checked.
600  (Discovered by: Toby Blake <toby@cogsci.ed.ac.uk>)
601
602  Added a 'UTILS/README.ForKerberosHackers' file so that Kerbero Hackers
603  can quickly and brutally set up a test LPRng system.  Not for the
604  faint hearted.  Carry a dog nummy when you read this stuff...
605
606  Some users hit themselves in the head and complain about headaches.
607  If the 'lpd_port' value is 0,  then checkpc and lpd squawk.
608   (Not telling me who the user was, but reported by:
609      Craig Small <csmall@eye-net.com.au>)
610
611 
612
613Version LPRng-3.8.8 - Sat Feb 23 07:35:45 PST 2002
614
615  Restored include file functions to lpd.conf.  Also put in recursion
616  depth checks so that it will stop if you have a loop.
617
618Version LPRng-3.8.7 - Fri Feb 22 12:24:38 PST 2002
619
620  Modified the wildcard lookup so that it returns some sane
621   values for defaults, i.e. - '*' is not treated like
622   a real printer and the first 'real' printer is used.
623     Sigh...
624
625  autoconf, automake, and libtoolize insanity.
626    Each of these facilities has a different version of the
627    config.guess and config.sub files, and will brutally copy
628    them to the distribution directory when you run automake,
629    autoconf, or libtoolize.  Problem sort of solved by
630    running through the /usr/local/share/{auto*,libtool}
631    directory and finding latest versions of things.  As the
632    CarTalk guys say, "Bo-0H-OH-OH Gus!".  Sigh. 
633
634  The 'Service_connection: bad request...' error message now has
635   the IP address of the sender added.
636  (Good idea from: Rainer Tammer <rainer.tammer@spg.schulergroup.com>)
637
638  Makefile.in had the diagnostic options left enabled after
639   regression tests.
640   BAD! Bad Programmer! BAD! No coffee for you today.
641   (Reported by: Petri Kaukasoina <kaukasoi-lprng@elektroni.ee.tut.fi>
642      among others...)
643
644  Portability stuff,  // comments, and src/Makefile referencing
645   ${SRC}/../UTILS instead of ../UTILS.
646   (Reported by: Hans Peter Verne <h.p.verne@usit.uio.no>)
647
648  Missing check in lpstat for end of string condition:
649   for( t = Printer_DYN; t && !isspace(cval(t)); ++t );
650    => for( t = Printer_DYN; !ISNULL(t) && !isspace(cval(t)); ++t );
651   (Reported by: Villy Kruse <vek@pharmapartners.nl>)
652
653  psbanner was creating a /tmp/before file.
654   (Reported by:
655     Anthony R Iano-Fletcher <Anthony.Iano-Fletcher@cbel.cit.nih.gov>)
656
657  Fixed the 'job done' status message so that it shows the job id.
658   (Suggested by: Christoph Beyer <christoph.beyer@desy.de>)
659
660  Added some sanity checks to handle cases when hold files and
661   control files do not have identifier information in them.
662
663  Checkpc now checks for duplicate spool directories.
664
665Version LPRng-3.8.6 - Fri Feb  8 19:31:52 PST 2002
666
667  HF_NAME not getting set when hold file read and it is not
668  in file.  This makes updates miserable.
669  (Problem spotted by: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>)
670
671  Fixed typeo in configure where I had unixsocket and unixsocketpath
672  instead of unix_socket and unix_socket_path...
673  (Pointed out by: Craig Small csmall@eye-net.com.au)
674
675  Modified the host/printer lookup behavior when clients
676  are using 'force_localhost'.  You now use the 'original'
677  queue name rather than the 'destination' queue name.
678  Wonder how long this has been there.
679  (Prompted by a problem report from: Andrew Gray" <grayaw@egr.unlv.edu>)
680
681  Missed a 'AF_UNIX' definition.  Now guarded with ifdefs.
682 
683  Corrected LPRngHOWTO accounting information:
684   (Error reported by: "Dirk Krause" <d.krause@fh-sm.de>)
685
686    Example:
687     lpd generates:  
688      jobstart  - from the lpd.conf 'as=' option
689      jobend    - from the lpd.conf 'ae=' option
690        -H   - host name
691        -n   - user name
692        -P   - printer
693        -k   - control file name
694        -b   - byte count of job/file
695        -t   - current printing time
696        -J   - Jobname (if present in control file)
697        -C   - class (if present in control file)
698        -M   - mailname (if present in control file)
699    
700     ifhp filter generates:
701       start/end         - of filter, for entire job
702       filestart/fileend - if or other filter, for each file
703       (options above are same)
704        -A  - identifier information (if present in control file)
705        -q  - process id of filter
706        -p  - current value of page counter, 0 indicates no
707              page counter on printer or it is not readable
708    
709    jobstart '-Hh110.private' '-nroot' '-Plp' \
710       '-kcfA129h110.private' '-b48780' '-t2001-10-19-09:36:36.000'
711                               ^^^ bytes in file
712    
713    start '-q26130' '-p105340' '-t2001-10-19-09:36:38.330' \
714                     ^^^^^^^  starting page counter value for job
715        '-Aroot@h110+129' '-nroot' '-Plp' 
716    filestart '-q26132' '-p105340' '-t2001-10-19-09:36:38.350' \
717                          ^^^^^^^  starting page counter value for file
718        '-Aroot@h110+129' '-nroot' '-Plp' 
719    fileend '-b19' '-T435' '-q26132' '-p105359' '-t2001-10-19-09:43:51.504'
720                                      ^^^^^^^  ending page countvalue for file
721             ^^^ number of pages printed for this file
722        '-Aroot@h110+129' '-nroot' '-Plp'
723    end '-b19' '-T435' '-q26130' '-p105359' '-t2001-10-19-09:43:51.504'
724                                      ^^^^^^^  ending page countvalue for job
725         ^^^ number of pages printed for this job
726        '-Aroot@h110+129' '-nroot' '-Plp'
727    jobend '-Hh110.private' '-nroot' '-Plp' \
728        '-kcfA129h110.private' '-b48780' '-t2001-10-19-09:43:51.000'
729                               ^^^ bytes in file
730
731Version LPRng-3.8.5 - Tue Jan 22 15:58:46 PST 2002
732
733  Added a minor fix to lpq so that it will check all queues.
734   (Courtesy of Jim Trocki <trockij@transmeta.com>)
735
736Version LPRng-3.8.4 - Thu Dec 13 08:25:17 PST 2001
737
738   ARGH! ARGH!  screwed up lpq -a by forgetting to
739   get the 'all' printer information.  Doh!
740   (Spotted by and slapped his forehead by:
741      Patrick Powell <papowell@lprng.com>)
742
743   "Why do we need a TCP/IP port?"  quoth the raven,  I mean
744   Craig Small <csmall@eye-net.com.au>.
745   "I have a version that has this facility..." respondeth
746   Patrick ("Mr. Grumpy") Powell.  "But I think you will not
747    be happy".  I merged the two versions.  Be Happy.
748
749   configure:
750     Added these options
751       --enable-unix_socket  (default disabled)
752       --with-unix_socket_path=PATH  (default /dev/lprng)
753
754   /etc/lpd.conf:
755    OPTION      TYPE   DEFAULT PURPOSE
756     unix_socket FLAG   1       enables/disables the UNIX socket
757     unix_socket_path STR   /dev/lprng    path to the pipe using this
758
759    Also: lpd_port = 0 will disable the TCP/IP port
760
761     lpd -p 0    - disables the TCP/IP port
762       or /etc/lpd.conf  lpd_port=0
763     lpd -P /path   - enables, unix socket specified by path
764       or /etc/lpd.conf  unix_socket@
765     lpd -P off     - disable unix socket
766
767      Permissions:
768       Connections to the UNIX socket will appear to come
769       from localhost, (127.0.0.1) port 0.  You can use the
770       UNIXSOCKET to check for this condition, or explicitly for
771       localhost/port 0
772         ACCEPT/REJECT ... UNIXSOCKET
773    Also updated the INSTALL note.
774
775   checkpc:  I was using 'To_daemon()' calls all through the
776     code.  This was not needed and would cause a substantial
777     slowdown in operation.  I now do exactly ONE call at the
778     start of operations.
779
780   updated the config.guess and config.sub to the latest version
781   provided by autoconf.
782
783   Incoming jobs now have a status entry.  This is to support IPP
784   and status reporting for incoming jobs.  The idea is that you
785   can start transferring a job and then,  when the whole job is
786   transferred,  the job will be done.  To make this happen you
787   need to put an entry in the queue to act as a place holder and
788   reserve the job number for this action.  When transfering an
789   IPP job,  you can send it in chunks.  This now allows the IPP
790   system to send the job header (request), set up the job status,
791   and then the job contents.  Just to make life interesting...
792
793   Found some places where I was using 'sizeof(xxx)' instead of a
794   passed value for an error message buffer.  Very short error
795   messages - 3 chars long... :-)
796
797   LPD now REALLY uses the lock files to prevent multiple
798   instances from running.  This might/will/could break on
799   systems that NFS mount their lock directories.
800
801   Cleaned up the error message about bad print job formats.
802    Clearly there are some REALLY strange printing systems out there.
803    (reported by: Phil Moses <pmoses@physics.ucsd.edu>)
804
805   Checkpc -A XX -r now has nicer format:
806     t1:  file 'hfA877', age 24.57 hours > 24.00 hours maximum
807     (Spotted by: (Craig Small) csmall@eye-net.com.au)
808
809   Added the following to the pass_env options:
810    LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
811    LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
812    LC_IDENTIFICATION LC_ALL
813    This should help with LOCALE support.
814
815Version LPRng-3.8.3 - Mon Dec 10 20:40:02 PST 2001
816
817   Fixed the operation of 'lpr -Pxx' when printcap for xxx
818   has the format:
819     xx:direct:lp=...
820     Sigh... too many special cases...
821       (Pointed out at LISA2001, and fixed on site...
822       Now who was that masked Sysadmin???...)
823    (From the mailing list:
824      James Thomas Klaas <jklaas@engin.umich.edu> )
825
826   Removed spurious commas in control file Z options.
827
828   Configure did not set 'done_jobs_max_age' correctly.
829   (Patch from: Dejan Ilic <dejan.ilic@home.se>)
830
831   lpc flush now cleans out status as it should have done...
832    GRRR... user pointed this out at LISA 2001...
833
834   Fixed up a problem with global variable Name.
835      From:  Rick Cochran <rcc2@cornell.edu>
836    I got LPRng to build under OSX.  It required only one patch which
837    seems to be due to the fact that "Name" is declared "extern" all
838    over the place, but is only defined in getopt.c.  Since lpstat
839    doesn't use getopt, ld complains.  I'm not sure why GNU ld should
840    complain under OSX and not on other platforms.
841     (Patch by:  Rick Cochran <rcc2@cornell.edu>)
842
843   Editted the lpr man page.  Updated the information about
844    obsolete options.
845
846   Updated the installation procedures for FreeBSD, linux, etc.
847   The STANDARD_configuration script now checks to see if there
848   is a /usr/share/man and if so, runs  configure with
849   --mandir=/usr/share/man.  Man pages now show up in the
850   right place.  This was true on *BSD, various LINUX distros,
851   and some versions of SunOS/Solaris.
852
853   Updated the DISTRIBUTIONS/FreeBSD entry and the postinstall
854   scripts so that the port stuff works better.  Now if you do:
855         cd LPRng/DISTRIBUTIONS/FreeBSD*
856         make PREFIX=/usr SYSCONFDIR=/etc
857   You will get the same effect as:
858         cd LPRng
859         sh STANDARD_configuration
860         make clean all install
861   But, as you might suspect, there are some minor gotchas.
862   The man pages usually get installed in /usr/share/man, but
863   when you use the PORT system and override PREFIX it
864   insists on installing them in /usr/man... and various
865   versions of the FreeBSD and OpenPort stuff INSISTS that
866   when generating a port that the originals of the man pages
867   are in the ${PREFIX}/man/manX directories.
868
869   I gave up and cheated:  you get an obnoxious warning to
870   either create /usr/man or to make a symbolic link from
871   to /usr/share/man from /usr/man before installation starts.
872   I know, I know.  But I don't have that many brain cells
873   left to fry...
874
875
876Version LPRng-3.8.2 - Mon Dec  3 12:26:52 PST 2001
877
878  MAJOR CONFIGURATION CHANGE:
879
880  LPRng can retain status of last N completed jobs
881     configure --with-done_jobs=N
882         - set done_jobs value, default 1
883     configure --with-done_jobs_max_age =N
884          - set done_jobs_max_age value, default = 0 (no expiry)
885
886     Or in the printcap/lpd.conf:
887       :done_jobs=1
888       :done_jobs_max_age=1
889
890   Example:
891    Printer: t1@h110 'Test Printer 1'
892     Queue: no printable jobs in queue
893     Server: no server active
894     Status: job 'cfA231h110.private' removed at 18:25:36.281
895     Rank   Owner/ID         Class Job Files             Size Time
896    done   papowell            A   278 /tmp/hi              3 18:25:31
897
898  Controlled by:
899    :save_on_error        - all jobs with error saved, status not removed
900    :save_when_done       - all jobs with no error saved, status not removed
901    :done_jobs=N          - last N jobs completed (error or no error) saved
902    :done_jobs_max_age=N  - jobs with status older than N seconds removed
903
904  This is best explained by:
905    On job completion:
906    if( (no error && save_when_done)
907       || (error && save_on_error)
908       || done_jobs > 0 || done_jobs_max_age > 0 ){
909      do not remove job
910    }
911
912    When queue updated:
913    if( !(save_on_error || save_when_done) ){
914       while( done_jobs_max_age >= 0
915         && the time since completion of oldest done job > done_jobs_max_age ){
916               remove the oldest done job
917       }
918       while( done_jobs >= 0 && total number of done jobs > done_jobs ){
919          remove the oldest done job
920       }
921    }
922
923  Fixed up the order of 'require_explicit_q' in the variable list.
924
925  Added 'lpd -p port' so that lpd port can be specified at run time.
926   (Suggested by: Chris J. Herbst <chris@herbst.com>)
927
928  Added 'PrintingCookbook' to the distribution.
929
930  The 'shorthost' DNS lookup result was not being set correctly
931  if DNS lookup failed and you had to drop back to using IP address.
932  Clearly the shorthost form of IP10.0.0.1 is IP10.0.0.1, not
933  IP10.
934
935  Added patches to help support Win32 porting using Cygwin:
936  UID 0 is now ROOTUID instead of 0 value.
937  ROOTUID is set by ifdef in portable.h
938
939  checkpc -f no longer puts out the annoying '/var/run/lpd.515
940   does not exist' message.
941
942  List_sep (which is only used in Check_for_rg_group) needs
943  a comma.
944    (Discovered by: Graeme Wood <Graeme.Wood@ed.ac.uk>)
945
946  Reworked the 'start lpd subprocess' code so that it is a little more
947  civilized.
948
949  Modified portable.h so that LPRng compiles properly on HPUX 11.xx
950  systems.
951
952  lpc help fixed up - 'redo - reprints jobs'
953
954  Cleaned up the 'Make_sort_key' code so it does not do needless
955   malloc.
956
957Version LPRng-3.8.1 - Thu Nov 15 16:08:41 PST 2001
958
959  The original default actions and values for the LPD_PRINTCAP_PATH
960  have been restored, as it broke too many other things.  A work around
961  for the problems with using LPD and database based configuration
962  has been found... ugly, but it works.
963
964  Chooser also now will wait when it cannot find a queue instead of
965  just exiting.  This solves the problem of 'hung' load balance print
966  queues using 'chooser' support.
967
968  Trim the accounting file information.  This now solves the 'mysterious
969  full spool partition' error messages.
970
971  'indefinately' is really 'indefinitely' ... so says 'ispell'
972
973  The 'remove_z' now really removes 'Z' options.
974   (Found by: Ryan Lovett <ryan@stat.Berkeley.EDU>)
975
976  The 'require_explicit_q' added for those folks who absolutely require
977  that a queue be specified and do not want them to use a default queue.
978   (Patch to code supplied by: James Thomas Klaas <jklaas@engin.umich.edu>
979     with a little help from Dan Escapa)
980
981  Grrr... left in a line of code when I was doing some testing of the
982  setuid functions in Win32 and screwed up the setuid stuff.
983
984  Fixed up a silly problem with file descriptor 0 not bound to
985  /dev/null in lpd subprocesses.
986
987  Fixed the 'Trim_status_file' routine so that it now treats file
988  descriptor 0 and -1 as 'closed' files.  This prevents some silly
989  problems with initialization.
990
991Release LPRng 3.8.0 Mon Oct 15 12:09:13 PDT 2001
992
993   At line 174 in accounting.c:
994     } else if( safestrncasecmp( s, "hold", 4 ) ){
995   This should be
996     } else if( !safestrncasecmp( s, "hold", 4 ) ){
997   otherwise anything send back to lpd from the accounting filter
998   other than accept will result in a JHOLD!
999    (Spotted by: "C. L. McAvaney" <chrismc@deakin.edu.au>)
1000
1001   Added :force_ipaddr_hostname option.  This causes the IP address of the
1002   remote host to be used for the hostname, overriding the information
1003   in the control file.  This can be used when you really need the
1004   IP address rather than the hostname in the control file.
1005     (Needed by: Rick Cochran <rcc2@cornell.edu>)
1006
1007Release LPRng 3.7.9 Mon Oct 15 06:18:43 PDT 2001
1008
1009  Version control strikes again.  Sigh...
1010  Now all the files are carefully put into place
1011   (Fumble fingers by:  Patrick Powell <papowell@astart.com>)
1012
1013Release LPRng 3.7.8 Tue Sep 25 12:35:46 PDT 2001
1014
1015  Can't spell... fixed typos in man pages.
1016  (Corrections from: Karsten Weiss <knweiss@gmx.de>)
1017
1018  lpd_logger.c - free(sp); s=0 ... this sure does make
1019   free() and malloc() unhappy...
1020   (Found totally by accident: Patrick Powell <papowell@astart.com>)
1021
1022  lpr '-Y' (enable lpr_filter) processing fixed up a bit.  Now has better
1023   diagnostics and information.
1024
1025  An extremely rare but annoying network condition causes LPQ print
1026  status to fail.  When running as root (setuid root),  and doing an LPQ
1027  operation,  the lpq process will try to bind to a port in the low
1028  port range (512 - 1023).  This will sometimes fail with a timeout
1029  if the port has been recently used and bound to.  I have put a bit
1030  more 'randomization' into the selection of the port,  but there is really
1031  nothing that can be done,  as the TCP/IP error status does not distinguish
1032  between 'connection refused because you just connected from this port'
1033  and the remote printer being off line.  Sigh...  The obvious answer
1034  to this is to bind to the low ports only when needed, but this requires
1035  users to know when to set the option.  I give up.
1036
1037
1038Release LPRng 3.7.7 Fri Sep 14 15:54:48 PDT 2001
1039
1040  checkpc whooped its cookies when running checkpc -f and
1041  the device is /dev/null (lp=/dev/null).   Apparently I
1042  cannot set /dev/null to use blocking IO...  Sigh...  So I
1043  do not count 'changing non-blocking IO to blocking IO'
1044  as an error.
1045
1046  i8n French Translation (gettext) added.
1047  (Supplied by: Francois Mescam <Francois.Mescam@onera.fr>)
1048
1049  The files generated by the 'incoming control filter' were not
1050  being re-read by the LPRng system.  Silly me.
1051  (Discovered by: Tuomas Toropainen <tuomas@nic.funet.fi> )
1052
1053  The 'bq_format' option was not being handled correctly
1054  for defaults.  This option has the value:
1055    bq_format=IoIo...D
1056       I = original input format (or '*' for wildcard match)
1057       o = filter output format
1058       D = default (if present),  otherwise keep original
1059  It now handles the case where no translation is required
1060  correctly.
1061  (Prompted by a question from:
1062     Rainer Tammer <rainer.tammer@spg.schulergroup.com>)
1063
1064  Did not check to see that I was a client before doing
1065    setgroup to daemon.  Stupid of me.  GRRRR... I now have
1066    a test for this in the code.
1067   (Warning from: Petri Kaukasoina <kaukasoi-lprng@elektroni.ee.tut.fi>)
1068
1069Release LPRng 3.7.6 Fri Sep  7 05:36:00 PDT 2001
1070
1071  There was no call to Getdaemon_group so the default daemon group
1072  was 0.  This, as they say, was double plus ungood.
1073   (Spotted and reported with a cackle of diabolical laughter by:
1074       Petri Kaukasoina <kaukasoi@elektroni.ee.tut.fi> )
1075
1076  I added a 'half_close' flag so that you can force a 'close(fd)'
1077  rather than a 'shutdown(fd,1)' to be done for those problem child
1078  network printers that whoop their TCP/IP stacks and die horrible
1079  deaths when they get a half closed connection.  This is,  as they
1080  say, a bug in the print server,  but I have encountered worse.
1081  The same printers also whoop their cookies when reporting status
1082  but I don't seem to be doing a half-close on 'lpq' connections
1083  so this doesn't seem to be a problem.  I have modified the 'lpq'
1084  code so it does not do a 'half-close'.
1085
1086   Example:
1087     lp:lp=host%9100    # happy, well behaved, print spooler box
1088     lpb:lp=host%9100:half_close@  # buggy print spooler box
1089
1090  Grammar fixed in LPRng-HOWTO.
1091    (Red pencil work done by: <Jeffrey.H.Knodel@chase.com>)
1092
1093Release LPRng 3.7.5 Sun Sep  2 12:43:39 PDT 2001
1094
1095  I was not closing all open file descriptors.  This caused checkpc and
1096  lpd (when running as 'spool queue server') to die mysteriously after
1097  processing a couple of jobs.
1098  (Clue to cause supplied by: Heiko Burghardt <burghardt@riege.de>)
1099
1100  The lpc -s status only reported number of jobs.  Now it also reports
1101  queue status,  as it used to, and should have.  And it reports only
1102  the number of printable jobs.
1103  (Patch by:  Garry Zacheiss <zacheiss@MIT.EDU>)
1104
1105  Patch to accommodate Broken RFC1179 Implemenation #39 from Apple.
1106  (Gory details and a patch by: Darius Davis <s328919@student.uq.edu.au>)
1107
1108  The 'Read_fd_len_timeout' and 'Write_fd_len_timeout' code would not
1109  pause indefinately if the timeout value was 0.
1110  (Noticed by: David E. Cross <crossd@cs.rpi.edu>)
1111
1112  A slew of patches from Crutcher Dunnavant at redhat.com:
1113  From the LPRng-3.7.4-23.src.rpm at the RedHat ftp site:
1114    LPRng-3.7.4-direct.patch - fixed a typeo in vars.c
1115    LPRng-3.7.4-inet_ntop.patch - conflicting/duplicate
1116        definition of inet_ntop.
1117        NOTE: I also fixed the inet_pton() definition to
1118        be consistent with the patch.
1119    LPRng-3.7.4-jobfilescan.patch, LPRng-3.7.4-lockfile.patch
1120        a little less agressive checkpc operation.  Checkpc
1121        now does not NOT update the targets of symbolic links.
1122        This solves the problem of various tools creating
1123        files in the spool directory as well as symbolic links
1124        to filters.  The FILES need to be accessible by
1125        filters running as the LPD user, the targets of the
1126        symbolic links should not be touched.
1127    LPRng-3.7.4-kerb5.patch - not used, do not want to hardwire
1128        paths into configure.  Modified RPM config file to add
1129        /usr/kerberos/{include,lib} instead
1130    LPRng-3.7.4-lockfile.patch - lockfile created now
1131    LPRng-3.7.4-manpage.patch - typo in lpr.1 fixed
1132    LPRng-3.7.4-nointl.patch - configure using wrong -lintl
1133        value.
1134    LPRng-3.7.4-nonblock.patch - changed some blocking opens
1135        to nonblocking opens in checkpc so that checkpc did not
1136        hang.  Silly of me not to have done this,  as the
1137        Check_write() routine even had a nonblocking flag just
1138        for this purpose.
1139    LPRng-3.7.4-s390.patch, LPRng-3.7.4-setgroups.patch
1140        This is a fiddle, not a major problem.  The only
1141        exploit possible is if the lpd server is started
1142        with "extra" groups besides the default one.  If
1143        you do not install lpd SETUID root (which is the default)
1144        then you have to be root to start this (su root OR login
1145        as root),  and this means that either login or su is
1146        not setting up the group membership correctly.
1147        But it is better to err on the side of paranoia than
1148        be careless.
1149    LPRng-3.7.4-shutdown.patch
1150        Note: the 'shutdown()' patch was NOT applied as it breaks
1151        a slew of other things.  Clearly we have some problem
1152        printers out there that need to be identified.
1153  (Courtesy of: Crutcher Dunnavant <crutcher@redhat.com>)
1154
1155  Updated GETTEXT/i8n support to gettext-0.10.39.
1156
1157  The printcap option 'prefix_option_to_option' is declared as a flag in
1158  src/common/vars.c in both versions 3.7.4 (line 355) and 3.6.26.
1159  { "prefix_option_to_option", 0, FLAG_K, * &Prefix_option_to_option_DYN,0,0},
1160  should be:
1161  { "prefix_option_to_option", 0, STRING_K, &Prefix_option_to_option_DYN,0,0},
1162  (From: Anthony R Iano-Fletcher <Anthony.Iano-Fletcher@cbel.cit.nih.gov>)
1163
1164  Redid the authentication documentation and code...  cleaned it up a bit.
1165  And comments.  And printcap.5 updated, HOWTO updated.  Sort of works now.
1166  Fixed up '$a' filter options so that :af=xxx is put on command line only
1167  if it is NOT a filter.  This clears up the mysterious Linux Printfilter
1168  deaths.
1169
1170  Permission checking now works for SERVICE=X.  You can only do remote host
1171  and port comparisions (REMOTE_IP=, REMOTE_HOST=, PORT=).  This was initiated
1172  by a bug report about address mask generation.
1173  (From: Willi Burmeister <wib@cs.uni-kiel.de>)
1174
1175  'lpc client' now displays defaults.
1176
1177  The changes to use the 'initgroups()' call for setting process group and
1178  effective group also cleared up problem reported by some Debian users.
1179
1180  You can now put a colon in printcap entry values using: \:.  This makes
1181  life a little easier for some folks who need to have options of the form
1182  "http://...".  You can now do:  filter=/.../sendftp -d ftp\://some/site
1183
1184  The configure defaults for filter_path (PATH value for filters)
1185    are now /bin:/usr/bin:/usr/local/bin
1186  The configure defaults for filter_ld_path (LD_LIBRARY_PATH value for filters)
1187    are now /lib:/usr/lib:/usr/local/lib
1188
1189  Reviewed LOTS and LOTS of documentation.  Fiddles all over the place.
1190
1191Release LPRng 3.7.4 Wed Dec 27 07:10:27 PST 2000
1192  ARGH ARGH!  Distributed the test version and not the release
1193  version for 3.7.3 - this has not been a good week.
1194
1195  The printcap entry '*:client:rm=IPADDR:force_localhost' now works correctly
1196  with lpq -a.  Side effect: you do not get status if you do not have a
1197  default printer.  i.e. - 'lp|*:client:rm=IPADDR' is better.
1198
1199  I now kill off process by using SIGHUP, SIGINT, SIGQUIT and SIGCONT.
1200    Even Guido thinks this is overkill but expects that there will be
1201    some system where even this does not work.
1202
1203  Added a check for the VERSION of gdbm as well.
1204
1205  ARGH ARGH ARGH... I fixed a problem with signals (SIGINT) killing off
1206   the process waiting for a lock on a file descriptor,  but I did
1207   it wrong.
1208   (Pointed out most gleefully,  complete with TRUSS output by:
1209     Doug Morris <doug@daynetwork.com>
1210       AND
1211     John Perkins <john@cs.wisc.edu>)
1212
1213Release LPRng 3.7.3 Sun Dec 24 17:47:52 PST 2000
1214  Updated the default printcap file with a simplified set
1215   of instructions.
1216  There was a 'sleep(1000)' instead of a 'plp_usleep(1000)'.
1217   Needless to say,  this did slow things down a bit.
1218  LPRng HOWTO Section on Samba had 'printcap file' instead of 'printcap name'
1219   (Spotted by: Marcel Kunath" <kunathma@pilot.msu.edu>)
1220  HPUX compilation without GCC had a gratuitious CFLAGS=-Aa.  I removed the flags.
1221   (Reported by: Ryan Novosielski <novosirj@umdnj.edu>)
1222
1223Release LPRng 3.7.2 Fri Dec 22 10:45:00 PST 2000
1224  Discovered that job moves were not working correctly.  Was
1225  removing the lpd_port value by mistake.
1226
1227  Close_gdbm() was not defined,  and the #if HAVE_GDBM_H
1228   confused some compilers.
1229  (Reported by: Shane Voss <Shane.Voss@glg.ed.ac.uk>)
1230
1231  ifhp.conf got the 'reverse_priority' description wrong.
1232  (Proof-reder was: Michael J. Carter <mcarter@lanl.gov>)
1233
1234  When I added the user printcap stuff I did not set a return
1235  value and the 'tc=' broke.  Sigh.
1236  (Reported by:  gizillions of people, including
1237     Michal Kouril <mkouril@ececs.uc.edu>)
1238
1239  RFC1179 does not ABSOLUTELY PROHIBIT some print spooler
1240    expecting multiple LPQ request.  So it does not close
1241    the connection after sending status.  So I now do a
1242    shutdown() to cause it to not expect further commands.
1243   (Detective work done by Rainer Tammer <rainer.tammer@spg.schulergroup.com>)
1244
1245  The 'short_status_date' and 'full_time' options seem to conflict
1246    with each other.  The 'full_time' means to use full time formats
1247    in LPQ status,  and the 'short_status_date' means to use short
1248    date formats.  The 'full_time' option now controls both of these,
1249    which is probably what was intended in the first place.
1250    (Pointed out by: Bill Kemp <bkemp@srp.gov>)
1251
1252  Get_all_printcap_entries() was not clearing All_line_list so you
1253    would get duplicate entries. Solved the 'mystery duplicate printer'
1254    problem observed during testing.
1255
1256  Natter in the README and INSTALL for Solaris users.
1257
1258Release LPRng 3.7.1 - Tue Nov 28 06:33:32 PST 2000
1259
1260 Major Changes That Effect Backwards Compatibility
1261
1262  1. local printcaps for users - ${HOME}/.printcap
1263     This allows users to specify a printcap in their local
1264     directories.  Of course, you can use the 'user_printcap@'
1265     option to disable this.  But why bother?
1266
1267  2. job file filtering always enabled
1268
1269     The classical 'store and forward' behavior has been changed.
1270     If you have a print queue with filters
1271        AND you have a file with the format specified for a filter
1272        THEN the file is filter and the filtered output is used.
1273
1274     This is CONTRADICTORY to 'vintage' BSD and 'legacy' LPRng
1275     behavior.
1276
1277     If you want to have 'job flattening',  that is,  to have
1278     the job combined into a single file with all the files
1279     processed, you need to use 'lpd_bounce'.  If you are currently
1280     using 'lpd_bounce' you will see no difference in behavior.
1281
1282     The bq_format option is used to get the 'new' formats after
1283     filtering.  Bq_format has the form:
1284       OnOnOn...D
1285         where O is the original format, n is new format,
1286         and D is default if there is the original format
1287         is not present.
1288
1289         If no default then original is retained.
1290
1291     The bq_format default is now 'f', not 'l'.
1292
1293     Example:
1294       bq_format=f    (default)
1295          all processed files have 'f' format
1296       bq_format=flmf (default)
1297          f -> l, m -> f, others unchanged if processed.
1298
1299   3. lpr -k option is now re-enabled to allow lpr to handle
1300       pipe input without creating large data files.  Note
1301       that if you kill programs off then you might end up
1302       with a truncated job.
1303
1304       You can use:  cat | lpr -k  OR cat | lpr -k -- -
1305
1306   4.  You can now have :lpr= Command Line Options
1307      This will prepend the command line option flags to the lpr
1308     command.  Note that this now allows you to set up a user printcap
1309     entry that has command line options suitable for lpr.
1310
1311   5. Super lightweight no spooler printing to devices
1312      with filter support.
1313        New command line options:  -B, -X filter, -Y
1314        New printcap option: :direct
1315
1316      SEND JOB DIRECTLY TO REMOTE TCP/IP PORT:
1317          lpr -Y -Phost%port file1 file2
1318       OR:
1319          use :direct flag in printcap
1320          In your ${HOME}/.printcap or /etc/printcap file put:
1321            lp:direct:lp=h14%9100:remote_support=R:client
1322          And use:
1323            lpr -Plp file  (:direct is effectively the same as -Y)
1324
1325          Effectively:
1326            ( for i in file1 file2 ; do ${filter} <$i; done ) > h14%9100
1327          where ${filter} is chosen from the printcap entry.
1328
1329          Note: if you do not specify a file then this reduces to reading
1330                  from STDIN, e.g.-
1331                  ${filter} > h14%9100
1332
1333      NOTE EXTREMELY WELL- for 1 file jobs:
1334             The STDOUT of the filter is the TCP/IP port connection.
1335      This allows the filter to get status and other information from the
1336      remote printer.
1337
1338      SEND JOB VIA A PROGRAM (SAMBA smbclient, for example):
1339
1340          lpr -Y -P '|/smbclient //server/share' file
1341       OR:
1342             lp:direct:lp=|/smbclient //server/share:remote_support=R:client
1343          lpr -Plp file
1344             Effectively:
1345                   ${filter} <file |/smbclient //server/share
1346
1347      SEND JOB TO LPD SPOOLER (Network Print Server):
1348          Ummm... well we already do this.  The :direct flag
1349      and the -Y flag are basically NO-OPS for this.
1350
1351          lpr -Y -P pr@host file  == lpr -Ppr@host file
1352        OR:
1353          lp:direct:lp=pr@host:client
1354             == lp:lp=pr@host:client
1355
1356          lpr -Plp file1 file2
1357             Effectively:
1358            for i in file1 file2; do filter $i >temp.$i ; done
1359             lpr -Ppr@host temp.file1 temp.file2 ...
1360
1361      USER SPECIFIED FILTER:
1362
1363      To use a user specified filter: lpr -X filter
1364
1365        Example
1366           lpr -Y -Phost%port -X userfilter file
1367        OR:
1368           lp:direct:...:filter=userfilter:client
1369
1370           Effectively:
1371               cat file | userfilter >host%port
1372
1373      NOTE EXTREMELY WELL- for 1 file jobs:
1374             The STDOUT of the filter is the TCP/IP port connection.
1375          This allows the filter to get status and other information from the
1376           remote printer.
1377
1378
1379       SPECIAL CASE for lp=queue@host:
1380
1381            lpr -X userfilter -Pqueue@host file1 file2
1382            Effectively:
1383              send control file;
1384              for i in file1 file2 ; do
1385                 userfilter $i > tempfile
1386                 send tempfile;
1387              done
1388
1389       EXTREMELY SPECIAL CASE:  -k option
1390
1391          The -k option with RFC1179 spooling AND a single file will
1392          case the following actions to be taken:
1393
1394                send control file
1395                send a 'expect BIG file' command
1396                cat userfile | filter > server
1397
1398         You can also add -X userfilter and get:
1399
1400                send control file
1401                send a 'expect BIG file' command
1402                cat userfile | userfilter > server
1403
1404
1405       This is done so that you could run
1406    lpr as a filter and send HUGE data files to the printer.
1407    This is done by invoking the '0 length file is read to
1408    EOF' facility of RFC1179.  Unfortunately,  this is
1409    not supported by all network print spooler boxes,  so the
1410    'fakelargefile' option allows you to fake this by sending
1411    a very large file number (in K bytes).  I suggest using
1412    1000000 - i.e. - a 1 Gigabyte file.
1413
1414 Start of a new branch:
1415  iNTERNATIONALIZATIOn (i18n) Support Revisted
1416
1417 iNTERNATIONALIZATIOn support has been reviewed and incorporated
1418  in a much more stable and maintainable manner.  Rewrote the
1419  ABOUT-NLS.LPRng file.  Modified the Makefile to update version
1420  information in the po/*.po files as well.  Reviewed much of the
1421  error message and status messages,  and added them to the translation
1422  list.  Added the N_() facility for 'static' messages and tables.
1423
1424  On 4 Sep 2000,  a compromise problem with the gettext facility
1425  was announced.  This was based on the standard 'fprintf' functions,
1426  which have a '%n' option to allow values to be written to memory.
1427  I have totally eradicated the use of the standard printf, fprintf,
1428  and so forth,  and use a safe version of snprintf without this
1429  capability.  This allows LPRng to be used on systems where similar
1430  attacks can be launched.  In addition, if the executable is running
1431  with uid or euid 0 (i.e. - root), then NLSPATH environment variable
1432  is unset.  This may break some of the 'set process name' code on
1433  some systems, but I cannot think of another method that will do this.
1434
1435 You can now use FreeBSD/BSDI/ and most likely some other newer versions
1436  of the BSD Make in addition to GMake.  What a pain this was.
1437  If your make supports VPATH it should work.  Hopefully.
1438
1439 GDBM used to store information.  This now makes handling LARGE numbers
1440  of files, etc., in a spool queue directory feasible.  Needless to say,
1441  status generation time is VERY small.
1442
1443  There are several caveats on this. If you kill off the lpd server
1444  when it is in the middle of updating the database file,  you will
1445  end up corrupting the database file or having an incomplete one.
1446  To resolve this problem, the 'checkpc -f' command can be used,
1447  as well as the 'lpc flush' command.  Also,  the initial queue
1448  scan done at system startup will rebuild the databases.
1449
1450 IPV6 portability was not quite there.  Some minor fiddles.  So I stopped
1451  playing the violin.  Maybe some time in the future.
1452  (Fiddling done and patch supplied by: John Perkins <john@cs.wisc.edu>)
1453
1454 Fixed the lpq.c status trimming functions to be a little more robust.
1455  Also, put back the recursive lpq functionality.
1456  (Recursion loss spotted by: Christoph Beyer <christoph.beyer@desy.de>)
1457
1458 The lpraccnt program is removed from the distribution.  The 'monitor' program
1459  can be used instead.  I wonder why I had two of these in the distribution.
1460
1461 The load balance queues are now treated like 'first class' queues and jobs
1462  moved to them are treated like incoming jobs.  This allows all of the
1463  incoming filters to be run,  routing to be done, and other abuses
1464  far too esoteric to grace these CHANGES notes.  This involved doing some
1465  very odd things with chdir(), etc. to make sure that the filters would
1466  run with the correct directory.  Also, status information for load balance
1467  queues changed so that you don't get silly messages about non-existent
1468  jobs which have been moved to the load balance queue.  Fixed up problems
1469  when you run out of file space with load balance queues.  Fixed up debug
1470  and status file information logging with load balance queues.  Fixed
1471  a really silly design flaw in Setup_printer() that closed the status
1472  file just when you did not want it closed - and then truncated it.
1473  Debug file is now closed and opened only ONCE during a call to Do_queue(),
1474  making it possible to debug the queue service.  All in all, a really
1475  thorough redoing of the queue handling was necessary to make them
1476  into first class citizens.
1477  (Motivated by the questions of: Jason Keltz <jas@cs.yorku.ca>)
1478
1479 lpd now mumbles at you when you try to start it up and it has
1480  problems.  Of course, most folks do 'lpd >/dev/null 2>&1' but
1481  we will ignore them...
1482  (Inspired by the well chosen arguments of:
1483   <eric@lammerts.org> and Craig Small <csmall@eye-net.com.au>)
1484
1485 lpd now CORRECTLY opens output filters - lp=|/path
1486  (Spotted by: Seth Chaiklin <seth@psy.au.dk>)
1487
1488 LPRng-HOWTO - Samba example corrected
1489  (Correction by: Philippe Weill <philippe.weill@aero.jussieu.fr>)
1490
1491 lpd_port=[ipaddr%]port now will cause lpd to bind to the interface with
1492   the specified IP address.
1493   (Prompted by the whingings of some anonymous Debian user and
1494     forwarded by: Craig Small <csmall@eye-net.com.au>)
1495
1496 checkpc runtime help was wrong.
1497   (Spotted by: James P. Dugal <jpd@louisiana.edu>)
1498
1499 INSTALL_PREFIX replaced by DESTDIR to be consistent with other distributions
1500   and packages.
1501
1502 lp -f formname now makes the CLASS information 'formname' as well.
1503   (Inspired by: Dave Lovelace <dave@fci.izzy.net>)
1504
1505 In LPRng/common/linelist.c,  many missing checks for null pointers.
1506   (Found in a core dump supplied by: Mike Whitson <mwhitson@MIT.EDU>)
1507
1508 lpr -o option is now the same as lpr -Z option
1509   (Suggestion to save sanity of SYSV users by: Joseph Krahn <jkrahn@nc.rr.com>)
1510
1511 lpq did not always have a space before job file size.
1512   (Noted by: Jonathan Briggs <jbriggs@esoft.com>)
1513Release LPRng 3.6.26 Fri Oct 13 07:38:38 PDT 2000
1514 unsetenv() is not available on some systems.  Fallback
1515   to setenv and then putenv() if not present
1516 (Found by: Niklas Edmundsson <nikke@ing.umu.se>)
1517
1518Release LPRng 3.6.25 Tue Oct  3 09:19:11 PDT 2000
1519 syslog Compromise -
1520   modified syslog to use 'syslog(xx,"%s", msg).
1521 gettext Compromise -
1522   added the following to Initialize():
1523    if( getuid() == 0 || geteuid() == 0 ) unsetenv("NLSPATH");
1524 IN6_ADDR removed,  in fact IPV6 stuff removed.
1525
1526   See the various CERT advisories.  Sigh...
1527
1528Release LPRng 3.6.24 - Fri Aug 11 08:03:23 PDT 2000
1529 LPRng-HOWTO - added update for Samba print queue configuration.
1530 LPRng-HOWTO - added section on how to configure Solaris lp printing
1531  to communicate with LPRng.
1532  (Changes courtesy of: Gerald Damian <gdamian@ford.com>)
1533 Typo in gethostinfo.c spotted.
1534  (Courtesy of the debugging talents of: Robin Sommer <rsommer@uni-paderborn.de>)
1535 And I removed the wrong line so that the data files were not being
1536  deleted when a job was completed.  Helps to read the control file and
1537  get the data file names...
1538  (Pointed out by: Thomas Emmel <emmel@mechanik.tu-darmstadt.de>)
1539 There was a 'cut and pasteo' that caused me to use the wrong value
1540  to get trim lpq status.
1541  (Core dump and clues supplied by: John Perkins <john@cs.wisc.edu>)
1542 LPRng HOWTO - added small section on setting up Solaris lp queues to
1543  forward jobs to LPRng/BSD printers.
1544 IPV6 Support fixed up a bit to actually work...
1545  (Spotted during testing,  now that we actually have IPV6 working
1546  on our router.)
1547 Added a 'flush cached status' when a spool server exits.  Now you
1548  get the correct status when there is no active server.
1549 Modified the 'Read_write_timeout' code to be consistent with reading
1550  status from parallel port printers the way that the ifhp filter
1551  does it.
1552 Found a minor sillyness in the 'send_to_logger()' code - I carefully
1553  format data and then toss it way.  Now I do checks first.
1554 Fixed up lpq status generation - only read a small part of the status
1555  file for information.
1556
1557Release LPRng 3.6.23 - Fri Aug 11 08:03:23 PDT 2000
1558
1559 The Linux Printing Summit was held from July 27-28, 2000
1560  in San Jose,  and was Sponsored by VA Linux.  There was an
1561  extremely enjoyable interchange of views between all of the
1562  various interested factions.  You will see some additional changes
1563  in LPRng as a result of these meetings and the input from users
1564  and developers.
1565
1566 Support for status caching has been incorporated in LPRng.
1567  In addition, 'spool queue lookup throttling' has been
1568  added in order to improve the speed of status gathering.
1569  And there are now facilities to control the format of returned
1570  status.
1571
1572  This is implemented as follows:
1573
1574    a) Each queue has a file containing keys corresponding to
1575       status queries.  For example, if you do 'lpq' then the
1576       query key would be "4_"  corresponding to the "\004\n"
1577       query sent to the server.  If you do 'lpq this that'
1578       you have the key "4_this_that_" and so forth.
1579
1580    b) Corresponding to each query is a file containg the status
1581       for the query.  If the status is 'stale', that is,
1582       older than 'lpq_status_stale' seconds,  then the lookup
1583       is redone.
1584
1585    c) When a job is submitted to a queue,  or the status of a job
1586       changes,  or a control operation is performed on the queue,
1587       then the cache is flushed.  Currently,  this means that
1588       the status has to be regenerated for all queries.
1589
1590    d) If the queue status was changed less than 'lpq_status_interval'
1591       seconds ago,  then the cached status (if any) will be used.
1592
1593    e) If the process needs to update the print queue, it will
1594       attempt to lock the status file.  This means that at most
1595       one process will be scanning the print queue for status
1596       at a time.  This has had an extremely good improvement on
1597       status reporting, especially under high load conditions
1598       and multiple processes attempting to scan the queue.
1599       This locking actually improved throughput much to my
1600       surprise.  A careful analysis showed that by having only
1601       one or two processes scanning the directory at a time,
1602       the OS was better able to cache and buffer data.  In actual
1603       fact,  the second process would then find the files that
1604       it was looking for already in memory or in the buffer cache.
1605       Also,  if the two processes were getting the same data
1606       (lpq -a),  the first one would set up the data in the cache
1607       and the next one would simply read the cached data.
1608
1609  The 'lpc flush' command has been added to flush all of the
1610    cached status.  This was added for testing and for administrative
1611    purposes.
1612
1613  A new Super Secret option (well, it is documented now) has
1614    has been added to the 'lpq' facility.  The following
1615    only works with LPRng servers (as of this release, of course):
1616
1617        lpq -- -lines=N   (in general: lpq -- -opt=v,opt=v)
1618
1619    The '-lines=N' is passed directly through to the LPRng
1620    lpd server,  where used to set the size of the returned status.
1621    It is NOT propagated to other servers,  BUT it is used to
1622    truncate status returned from them.  This will effectively
1623    give you a VERY compressed status extremely quickly when
1624    combined with the caching facility.
1625
1626    The -- is used to indicate that the -lines=N is actually an
1627    option to be passed through to the server.  This capability
1628    has been in LPRng,  but this is the first documented use
1629    of it that will be supported.
1630
1631    The addition of this facility has some interesting implications.
1632    You can now have a VERY lightweight lpq facility,  for getting
1633    the status of one printer,  if you know the server it is on:
1634
1635    echo "\004printer -lines=2 xx xx xx" > nc host 515
1636     (nc is the 'netcat' program written by mudge@avian.org)
1637
1638    Of course you do not have authentication,  etc., but this is
1639    One Of Those Tradeoffs.  YOU ARE WARNED: USE THE SOCKET CONNECTION
1640    METHOD AT YOUR OWN RISK AND DON'T WHINE WHEN YOU DISCOVER THAT
1641    THE LACK OF AUTHENTICATION IS CAUSING YOU PROBLEMS.  If this
1642    is a problem, use the 'lpq' application and turn on authentication.
1643
1644    On the other hand,  you can now get printer status WITHOUT the
1645    use of an 'lpq' process to format it.  I expect the various
1646    folks building WebServer interfaces for LPRng print status will
1647    be more than happy now, as this works well in a multi-threaded
1648    environment,  is strictly socket/connection based.
1649
1650    Another benifit is that NonLPRng (can you say Microsoft?)
1651    based applications can now use the -lines=N entry to select
1652    the amount of status that they want returned.  This allows
1653    remote clients not LPRng based to select the level of verbosity.
1654
1655  This work was inspired by the Samba Developers, especially Andrew
1656  Tridgell, John Terpstra, and Jeremy Allison,
1657  <http://www.samba.org/samba/team.html>,  and their presentations
1658  and discussions at the Linux Printing Summit held in San Jose,
1659  July 26-31, Sponsored by VALinux.
1660
1661 You can now specify a filter for your input files at the user level.
1662  This is to support the requirements and/or desires of the various
1663  users of print spooling software to have a filter applied at the
1664  application end.
1665
1666  The syntax is:
1667     lpr -X /path file1 file2
1668  equivalent to:
1669     for each file in filelist; do
1670       tempfile=maketempfile;
1671       /path <$file >$tempfile
1672     end
1673     lpr $tempfile1 $tempfile2 ...
1674
1675  The filter is invoked once per job file,  on each job file.
1676  The options passed to the filter are the usual ones for all
1677  LPRng filters.  Some will not have any meaning,  such as job
1678  number, etc., and will not be present or have a '0' value.
1679  The filter will run as the user's id, and will not have root
1680  capabilities.  If this is needed,  then the filter must have
1681  the capability of acquiring them.
1682
1683  This work was inspired by the GIMP Project presentation of Robert
1684  Krawitz <rlk@alum.mit.edu> http://www.tiac.net/users/rlk/ Project
1685  lead for The Gimp Print --  http://gimp-print.sourceforge.net at
1686  the Linux Printing Summit held in San Jose, July 26-31, Sponsored
1687  by VALinux.
1688
1689  I ran into problems with the SysV to LPRng option passing. Apparently
1690   different versions of SysV printing pass options as S, O, or
1691   whathave you values in the control file.  The prefix_o_to_z
1692   option has been replaced by the more general 'prefix_option_to_option'
1693   facililty.  This specifies the control file option lines to
1694   prefix to a control file option line.  For example:
1695
1696    prefix_option_to_option=S,O Z  will prefix S and O to Z
1697    prefix_option_to_option=Z O    will prefix Z to O.
1698
1699    This now appears to cover all cases,  and the LPRng HOWTO
1700    has been modified as well.
1701
1702  The simple minded 'send mail to user' facility had some problems.
1703   I fixed them up,  and added a 'sendmail_to_user' flag that allows
1704   the facility to be disabled for sending mail to users,  but still
1705   sends mail to operator.  I have also updated the HOWTO with some
1706   notes about using this facility.
1707   (Patches sent by: Maja Gorecka-Wolniewicz <M.Gorecka-Wolniewicz@cc.uni.torun.pl>)
1708
1709  Several calls to Print_job(...) assumed that a file will respond with
1710   status information,  as would a real printer.  Not a good assumption.
1711   I wonder where my mind is at somedays...
1712  The 'Network Grace' timeout should only be used when a server is trying
1713   to connect - clients should not have to wait.
1714
1715  I have once again changed the checkpc code to be very very very
1716   conservative in what it removes from the spool queues.  This will make the
1717   folks who use netatalk,  etc.  very happy.  The bad news is that files
1718   put into these directories by other tools will not get removed.  C'est
1719   la vie,  C'est la guerre...
1720   (Patches inpiring the changes sent by: "William R. Knox" <wknox@mitre.org>)
1721
1722  pclbanner had a stupid typeo left over from debugging.
1723   It wrote debugging information out to /tmp/before
1724  The 'lpr_bounce' code did not work after the last fix to solve problems
1725   with Print_job closing files.  Now you can use filters again from lpr.
1726
1727  I have added the 'wildcard' print queue names and 'incoming_control_filter'
1728   options.  Together, they implement a way to put options and
1729   other information into the control file when a job is submitted.
1730   This method was exploited by Adeel Khurshid <kurshid@cs.odu.edu>
1731   while at Fujitsu Network Communications,  and is used by the
1732   'apsfilter' by Andreas Klemm and Thomas Bueschgens.
1733
1734     Example:
1735      lp|lp_*:lp=%P@server
1736      lp|lp_*:server
1737        :incoming_control_filter=/.../update_z
1738        :...
1739
1740   When you use lpr -Plp_landscape_ledger you will actually end up
1741   sending the job to the lp queue, with the queue name (Q control
1742   file line) set to lp_landscape_ledger.  This information can be
1743   used to update the various control file lines.  The LPRng/UTILS/update_z
1744   file has an example of a script that will do this.  Note that this
1745   makes the use of the apsfilter utility even easier.
1746   (Inpired by a control filter by: Adeel Khurshid <kurshid@cs.odu.edu>)
1747
1748  I removed a couple of bogus entries that I was putting into the
1749   job control file.  These appear to be holdovers from some testing.
1750   They were put in but never used.  Strange, that.
1751
1752  The append_z, prefix_z, and other related Z operations are done
1753   only when the job is received.  This now allows the job to be
1754   processed by filters and not have the work undone.  sigh.
1755   Documentation cleaned up as well.
1756
1757  The control file processing has been cleaned up and the redunant
1758   and erroneous (sigh) copy of the control file in the job{} data
1759   structure has been ruthlessly purged.  I sure wish Ruth worked
1760   for me,  I seem to be doing so much ruthless cleanup.
1761   I see the hand of testing and debugging in much of this stuff,
1762   and the tracking down of memory leaks as well.
1763
1764  You can now use [^x] in the glob patterns.  Sigh...  The things
1765   people do when they get the bit in their teeth.
1766
1767  The LPD support for 'lpq' and 'lprm' requests has been modified so that
1768   if there are chained queues and each queue is on the server THEN
1769   I simply call a routine and do not fork a process.  This solves a
1770   problem with process exhaustion when somebody had a loop in their
1771   printcap.  I also put in some tests for this.  However, without
1772   adding Yet Another Option to the LPRM and LPQ stuff I don't see
1773   how I can do it.
1774
1775  You can now send up to 'max_jobfiles' (default 52) to the server.
1776   Note:  you can actually only send 52*52 = 2704
1777   The data files are given names
1778     dfAnn -> dfZnn -> dfann -> dfznn ->
1779     dgAnn -> dgZnn -> dgann -> dgznn ->
1780     dzAnn -> dzZnn -> dzann -> dzznn ->
1781     daAnn -> daZnn -> daann -> daznn ->
1782     deAnn -> deZnn -> deann -> deznn ->
1783     dAAnn -> dAZnn -> dAann -> dAznn ->
1784     dZAnn -> dZZnn -> dZann -> dZznn
1785
1786  There is now support for the HP extensions:
1787  (Courtesy of Richard Hart USG <hart@zk3.dec.com>,
1788    who sent me the following information)
1789
1790     Summary of HP's Extensions to RFC-1179
1791
1792     1. 4-Digit Job Numbers
1793     HP preserves the System V-style 4-digit sequence number, or job number, in
1794     file names and attributes, while BSD uses 3-digit job numbers.
1795
1796     2. Control and Data File Naming Conventions
1797     Control files are named in the following format:
1798        cA<seqn><host>
1799        <seqn> is the 4-digit sequence number (aka job number).
1800        <host> is the originating host name.
1801     The data file naming sequence format is:
1802         dA<seqn><host>   through   dZ<seqn><host>     followed by...
1803         da<seqn><host>   through   dz<seqn><host>     followed by...
1804         eA<seqn><host>   through   eZ<seqn><host>     followed by...
1805         ea<seqn><host>   through   ez<seqn><host>     ... etc. ...
1806     So the first data file name in a request begins with "dA", the second with
1807     "dB", the 27th with "da", the 28th with "db", and so forth.
1808
1809     3. HP-Specific BSD Job Attributes (Control File Lines)
1810     The following control file lines are extensions of RFC-1179:
1811        R<login>
1812           Write to the named login's terminal when the job is complete.  This is
1813           an alternate to the RFC-1179-style e-mail completion notification.
1814           This notification is selected via the lp "-w" option.
1815  -- R line -> M line
1816        A<priority>
1817           Specifies the System V-style priority of the request, a single digit
1818           from 0-7.
1819  -- A value -> priority
1820        N B<banner>
1821           Note that this line begins with an "N", a space, and then a "B".  The
1822           argument is the banner page title requested via the lp "-t" option.  If
1823           that option was not given then the argument is null.
1824  -- banner -> T banner
1825        N O<options>
1826           Note that this line begins with an "N", a space, and then an "O".  The
1827           argument contains the System V-style "-o" options specified in the lp
1828           command line.  The option names appear without a leading "-o".  The
1829           first option name begins in the fourth character of the line; each
1830           option is separated by a blank.  If no "-o" options were given then the
1831           argument is null.
1832  -- <options> -> appended to Zvalue <options>
1833
1834     The following control file lines are generated differently than in standard
1835     BSD:
1836        J<jobname>
1837           The argument is the System V-style request-ID, for example,
1838           "printer-42".  Note that leading zeros are not present in the sequence
1839           number.  If a System V-style title is requested then it is sent using a
1840           "N B" attribute, and not the "J" attribute.
1841
1842  There is now a new and improved error message for fumble fingers:
1843   h4: {1185} % lpq -Pxx
1844   Printer: xx@h4 - ERROR: spool queue for 'xx' does not exist on server h4.private
1845      non-existent printer or you need to run 'checkpc -f'
1846   h4: {1186} % lprm -Pxx
1847    ERROR: spool queue for 'xx' does not exist on server h4.private
1848      non-existent printer or you need to run 'checkpc -f'
1849   h4: {1187} % lpc -Pxx status
1850    Printer           Printing Spooling Jobs  Server Subserver Redirect Status/(Debug)
1851   xx@h4: spool queue for 'xx' does not exist on server h4.private
1852      non-existent printer or you need to run 'checkpc -f'
1853   I hope that this cuts down on the problems reported by people who do not
1854   RTFM about 'checkpc -f'.
1855
1856  I have added code to track the maximum open file descriptor so that
1857    the 'cleanup' code is a little more intelligent.
1858
1859Release LPRng 3.6.22 - Sun Jul 23 17:37:02 PDT 2000
1860  There is yet one more problem with high load levels -
1861   I did not set the timeout to reasonable value and the lpd server
1862   goes into a tight loop waiting for it.
1863
1864Release LPRng 3.6.21 - Sun Jul 16 16:58:19 PDT 2000
1865  Clean up some Tru64 system warnings about casts.
1866   (Supplied by: "Justus J. Addiss" <jjaddiss@mmm.com>)
1867  Seemed to have found a solution to the parallel port problem
1868   by brutally using fstat() to see if we have a device,  and if
1869   so, then unless it is a tty, assuming that it is a write only
1870   device.  This is stupid,  and I just KNOW that when somebody
1871   adds a USB device I will suffer for this.  When you have a
1872   'write only' file descriptor,  you just do a 'write' with timeout.
1873   No select, nothing.  Just a write.  This seems to solve the
1874   problem.  Oh yes.  You also make sure the file descriptor
1875   is non-blocking.
1876   (By:  Patrick Powell <papowell@lprng.com>)
1877  There is a bizzare problem with doing select for read on some Solaris
1878   systems with certain patch sets on file descriptors that have
1879   been set for non-blocking.  The select call will actually return
1880   and indicate that the device can be read...  But when you do,
1881   you get -1, and EUNAVAIL or some similar code indicating no data
1882   to be read.  This is truly bizzare.  To ensure that this does
1883   not happen,  you must do a select on a nonblocking file descriptor.
1884   To add injury to insult,  this seems to not be reliably reproducible.
1885   You really had to be there for this one.  I now set all the file
1886   descriptors into blocking mode and then do select,  then put them
1887   in nonblocking mode to do the write or read.
1888  The mysterious 'lpc reread' killing lpd was discovered to be caused
1889   by trying to free an already freed pointer, which was garbage.
1890   This was related to cleaning up the memory leak problem in 3.6.20.
1891   Sigh...
1892  I cannot spell krbros... krb5... or kb5... and thus cannot invoke the
1893   dog in the configuration script.
1894   (Happily pointed out by:  John Perkins <john@cs.wisc.edu>)
1895
1896Release LPRng 3.6.20 - Sat Jul  8 12:32:38 PDT 2000
1897  One of the silly memory leaks that has been reported, tested for,
1898   analyzed, etc., finally was found.  The problem was in the
1899   child.c file,  where I keep track of children processes
1900   by dynamically allocating a list.  While I carefully cleaned
1901   up the list in children of the main LPD process,
1902   I never cleaned up the list in the main LPD process.  Thus,
1903   if you created a large number of children the list would grow
1904   a small amount (4 bytes) for each child.
1905   This problem was found by brutally using the 'DMALLOC' debugging
1906   package,  finding every 'malloc' call in the main LPD process
1907   and then looking for a matching free call in the main line loop.
1908   When one was not found for the case where I had 0 processes
1909   I knew that I had found the problem.  Sigh.
1910   (Stumbled over after staring at the code for a week by:
1911      Patrick Powell <papowell@lprng.com>)
1912  Makefile now checks that POSTINSTALL is 'NO' or 'no'
1913    (Noted by: Craig Small <csmall@eye-net.com.au>)
1914  checkpc -C and checkpc -c file removed.  Legacy options and
1915   I don't know why they were still there.
1916   (Noticed by: Jesper Dangaard Brouer <hawk@diku.dk>)
1917  The call to 'Remove_tempfile()' routine was removed from
1918   the 'cleanup()' when trying to find the above mentioned memory
1919   leak and was not put back.  Bad Coder! Bad!
1920   (Found by: A Earle <ae@play.psych.mun.ca>)
1921  The pclbanner and psbanner had some errors that showed up under
1922   bash.  Very odd that the ksh and /bin/sh did not whoop on them.
1923   (Clever debugging by: David Livingstone <davidl@cn.ca>)
1924  checkpc -r -A was a little too agressive and it blew away all
1925   sorts of files.  The -r now only works on job files.
1926   I do NOT remove job files unless the -r -A age options are
1927   given.  This prevents some problems with jobs being moved
1928   into a queue just as checkpc is being run from cron.  Sigh...
1929   Cron.  I forgot all about Cron.
1930   (Noticed by: Craig Small <csmall@eye-net.com.au>)
1931
1932
1933Release LPRng 3.6.19 - Sun Jun 25 11:13:35 PDT 2000
1934  The filter status was not getting used correctly.  This was
1935   a side effect of trying to clean up aborted jobs and
1936   accounting.  One step forward, one step back.  Sigh.
1937  The Tru64 compiler objects to casting pointers to ints, so
1938   we have to cast to a long THEN to an int.
1939   (Reported by: Justus J. Addiss <jjaddiss@mmm.com>)
1940  Did not update the 'Tempfile' variable when I was checking multiple
1941   print queues.  This meant that it was using a stale queue name.
1942   Only shows up if the queue directories are on different
1943   file systems.
1944   (Spotted by the eagle eyes of: Robin Sommer <rsommer@uni-paderborn.de>)
1945  Apparently the CHANGES file had 'z_append' instead of 'append_z'.
1946   So it is changed.  Do we need a Meta-CHANGES file to record changes
1947   to the CHANGES file?
1948   (Caused by the readings of: Michael J. Carter <mcarter@lanl.gov>)
1949
1950Release LPRng 3.6.18 - Mon Jun 19 09:37:04 PDT 2000
1951  The UTILS/accounting.pl script did not handle malformed
1952  lines caused by truncation well.   It now does,  but
1953  insists that you have lines starting with
1954    start, filestart, end, fileend for status.  This ties
1955    into ifhp-3.6.15
1956  Updated the DISTRIBUTIONS/FreeBSD to make the port correctly
1957  Updated the DISTRIBUTIONS/RPM to make the port correctly
1958  Changed the psbanner font to a more readable font
1959   (Artistic criticsm by: Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>)
1960  Lowercased DNS lookup return values.
1961   (Need discovered by: Alf Wachsmann <alfw@slac.stanford.edu>)
1962  Tru64 cc compiler whoops its cookies on void * conversions...
1963   (Reported by:  Justus J. Addiss <jjaddiss@mmm.com>)
1964
1965Release LPRng 3.6.17 - Sat Jun 17 15:58:21 PDT 2000
1966  Analysis of the Setuid Compromise for LINUX done; LPRng
1967   is only susceptible if a non-root user manages to run a client
1968   program that in turn runs a program that she has compromised.
1969   Since the programs run by LPRng and other servers should owned
1970   by root and not writable,  this would require the compromiser
1971   to have already modified these - by alreadying having root perms.
1972   This means that they have already compromised the system.
1973
1974   Replaced the agressive 'check at all times and costs' with
1975    a) a configure time check for the 'bad linux kernel'
1976    b) a run time check done only by clients for a compromise.
1977    c) not installing LPD setuid ROOT so that it cannot be
1978       started and used as a compromised process.
1979
1980Release LPRng 3.6.16 - Thu Jun  8 15:24:37 PDT 2000
1981  Long numbers and the silly 'is this really and IP address code'
1982   conflicted.  Fixed it again.
1983   (Spotted and reported 32 minutes after the release was out by:
1984      Thomas Vogt <t.vogt@drgueldener.de>)
1985  Did not check for null pointer, the following printcap was not
1986    read correctly:
1987      .junk:
1988      stuff:tc=.junk  <- ummm... nothing there, CRASH
1989   (Spotted and reported 30 minutes after the release was out by:
1990      Justus Addiss <jjaddiss@mmm.com>)
1991  Changed :as and :ae checks so that you can use :as=/path as well as
1992    :as=|/path
1993   (Inspired by comments from: Sree Lakshmi <chinnu@jncasr.ac.in>)
1994  pclbanner did not work under RedHat.
1995   (Spotted by:  David Kerr Livingstone <davidl@cn.ca>)
1996  Goofs in the HOWTO spotted.
1997   (Spotted by: Zanferrari Domenico <domenico.zanferrari@kone.com>)
1998  Updated the HOWTO format.  Now using DocBook to generate output.
1999  RPM packages not generated correctly
2000  If the -Dxxx option is the VERY FIRST on the command line,
2001   then you set up the debug options very early in the parsing
2002   and operation.  This can lead to a GREAT deal of rubbish unless
2003   you need it.
2004
2005Release LPRng 3.6.15 Thu Jun  8 15:24:37 PDT 2000
2006  postinstall.generic.sh was sytactically incorrect.
2007   (Patch by:  Justus Addiss <jjaddiss@mmm.com>)
2008  RPM Fixes:
2009    /usr/docs/LPRng now removed
2010  Linux (and possibly other) SETUID BUG compromise detection
2011    added.  The setuid(n) call is supposed to be a one-way trip to
2012    uid n,  but this can be compromised by users setting
2013    flags.  Present in kernels before 2.2.16,  and possibly
2014    other capabilities based systems.  Added a test to make sure
2015    that this is really a one-way trip.
2016       As far as I can tell,  this would only be an issue if the
2017    user had a shell script that was executed by LPRng and the script
2018    could be replaced by something else.  This is possible in systems
2019    which are using NFS - I have exercised the compromise and it
2020    exists.
2021
2022Release LPRng 3.6.14 Sat May  6 08:46:26 PDT 2000
2023
2024  configure now has --with-lockfile=path.
2025   (Courtesy of:  Willi Burmeister <wib@cs.uni-kiel.de>)
2026   Complete configure options are now:
2027
2028  --with-cc=COMPILER      select compiler to use
2029  --with-ccopts=CFLAGS    select compiler command line options
2030  --with-linker=LINKER    select linker to use
2031  --with-ldopts=LDFLAGS    select linker command line options
2032  --with-cppopts=CPPFLAGS  select compiler preprocessor command line options
2033  --disable-setuid                  disable setuid root client and server executables
2034  --enable-priv_ports               require connections to be from privileged ports
2035  --disable-force_localhost         force_localhost default to disabled
2036  --disable-require_configfiles     client programs require lpd.conf, printcap
2037  --enable-kerberos                 enable kerberos support
2038  --enable-mit_kerberos4            enable MIT Kerberos 4 support
2039  --disable-kerberos_checks         disable kerberos library location and checking for support
2040  --with-lpddir=DIR                 lpd executable directory (default ${sbindir})
2041  --with-lpd_conf_path=PATH         path of lpd.conf (default: ${sysconfdir}/lpd.conf)
2042  --with-lpd_perms_path=PATH        path of lpd.perms (default: ${sysconfdir}/lpd.perms)
2043  --with-printcap_path=PATH         path of printcap (default ${sysconfdir}/printcap)
2044  --with-lpd_printcap_path=PATH     path of lpd_printcap (default ${sysconfdir}/lpd_printcap)
2045  --with-lockfile=PATH              lockfile PATH, default /var/run/lpd
2046  --with-ld_libary_path=PATH        LD_LIBRARY_PATH value
2047  --with-filter_path=PATH           filter PATH value
2048  --with-userid=NAME                run LPRng software as this userid, default daemon
2049  --with-groupid=NAME               run LPRng software as this groupid, default daemon
2050  --with-chooser_routine=NAME       load balance queue chooser routine name in user object file
2051  --with-order_routine=NAME         queue order routine name in user object file
2052  --with-user_objs=NAME             user specified object file
2053  --with-user_include=NAME          include file with function prototypes for user object file
2054  --with-filterdir=DIR              filter directory (default ${libexecdir}/filters)
2055  --disable-strip                   disable stripping binaries by default
2056  --enable-nls           use Native Language Support
2057  --with-included-gettext use the GNU gettext library included here
2058  --with-catgets          use catgets functions if available
2059
2060  Terminal clearing now done by using 'clear' program.
2061   Configure will look for a clear program and LPQ will fork and
2062   exec it.  If no clear,  then simply send a '^L' or '\014' (form
2063   feed) to the stdout.  This is due to the horrible support in
2064   most OS's for curses, termlib, termcap, term...  well,  you get
2065   the idea.  For a true trip through hell, read the configure
2066   script for 'vim' and see what they do.  Not for me,  when this
2067   is only a VERY small part of a much larger system.
2068   (Changed after finding curses, ncurses, and sys5 curses on
2069     a system by: Patrick Powell <papowell@lprng.com>)
2070
2071  Makefile.bsd  is now a VERY small makefile:
2072    # List the things you want to generate:
2073    all clean install uninstall:
2074       gmake $(MAKEFLAGS) $@
2075
2076    I know that some of the BSD folks will hate me for this,  but
2077   I have decided that trying to support both types of Makefiles
2078   and making them work was just too much effort.  Also,  the BSD
2079   folks now have much better supporort for Gmake in their build
2080   scripts.  Also, see below... Enhanced Install and Package Creation
2081   Support.
2082
2083  Enhanced Install and Package Creation Support
2084   (Laid at the feet of: Craig Small <csmall@eye-net.com.au>)
2085    One of the problems that is encountered when trying to build a package
2086   or do an install is to compile stuff in one directory and then install
2087   it in another.  The trouble is,  you want to install it in a MIRROR
2088   directory.
2089   For example,  you have
2090    ${SYSTEMSRC}=/private/src,  where the source is,
2091    ${BUILD}=/var/tmp/BUILD/ where you are going to build all the stuff,
2092    ${MIRROR}=/var/tmp/MIRROR where you want to place what you created
2093
2094   The following is generally what is done during distribution creation to
2095   do this:
2096     cd ${BUILD}/.../LPRng;
2097     ${SYSTEMSRC}/.../LPRng/configure --prefix=/usr/local --sysconfdir=/etc
2098     make
2099     make install XX=${MIRROR} -> puts thing in
2100              ${MIRROR}/usr/local
2101              ${MIRROR}/etc
2102
2103   After trying 9 (nine) different variations on a theme,  I now have the
2104   following method to do this:
2105     make install INSTALL_PREFIX=${MIRROR} POSTINSTALL=NO
2106
2107   What is this?  The install script/steps will install files in
2108   ${INSTALL_PREFIX}${prefix}, ${INSTALL_PREFIX}${sbindir}, etc.
2109   etc., where ${prefix}, ${sbindir}, etc, are hardwired by the
2110   configure step to the /usr/local/, etc.  Now you might wonder
2111   why this is done.  The reason is that GMAKE, bless its little
2112   heart,  will use the $PREFIX environment variable value if it
2113   is set.  So you cannot do ${PREFIX}/${sysconfdir}  in install
2114   scripts,  and if you do not set it on the command line,  have
2115   it put in the right place.
2116
2117   The POSTINSTALL=NO is used to suppress 'true' postinstallation
2118   stuff that would copy files into 'unexepect' places, such as
2119   '/etc/printcap' or '/etc/lpd.perms' or '/etc/lpd.conf'.  Now
2120   if you are building a system distribution for raw install,
2121   then you want this to be done,  and you would use:
2122     make install INSTALL_PREFIX=${MIRROR}
2123
2124   If you are building,  say a FreeBSD 'package' distribution
2125   or a RedHat RPM then you would use:
2126     make install INSTALL_PREFIX=${MIRROR} POSTINSTALL=NO
2127
2128   Now for all of you who want to make a package and need to find
2129   the files that LPRng will install,  I suggest you look at the
2130   following:
2131
2132     INSTALL_PREFIX=/var/tmp/LPRng  #note that you do NOT export this
2133     (
2134    cd $INSTALL_PREFIX;
2135      mkdir usr/local/bin usr/local/sbin /usr/local/libexec /etc /usr/local/etc/rc.d
2136        ....
2137     )
2138     make; make install INSTALL_PREFIX=${INSTALL_PREFIX}
2139     (cd $INSTALL_PREFIX;
2140     find . -type f | sed -e '/man[0-9]/d' \
2141        -e '/\/info\//'d -e 's/..//'  >/tmp/files
2142     find . -type f | sed -n -e '/man[0-9]/s,.*man[0-9]/,,p' \
2143        -e 's/..//'  >/tmp/manpages
2144
2145   You can now find the non-doc files, manpages, etc. etc. etc.
2146   and then update the various locations as you need.  Clearly this
2147   should be done only as root,  on a system where you do not have
2148   other users running,  where somebody cannot do 'ln -s /etc/passwd
2149   /tmp/manpages' and so forth.
2150
2151   For a truly abusive use of this method,  look at the
2152   DISTRIBUTIONS/FreeBSD* and DISTRIBUTIONS/Solaris* directories.
2153
2154   Yes,  I have no shame.
2155   (Put into the distribution after telling people 5 times how
2156     to use this by:  Patrick Powell <papowell@lprng.com>)
2157
2158  lpr -U option did not work correctly when UID was root.
2159    (Patch happily submitted after a long search by:
2160        Roberto Togneri <roberto@ee.uwa.edu.au>)
2161  lpd was mangling jobs with more than 26 files - caseless compare
2162     strikes again.
2163    (Found with great consternation by: Peter Scheurer <scheurer@sopra-gmbh.de>)
2164  permissions and filters:
2165    When you use a filter for "perms_path" was not executed when a
2166    connection to the lpd is made. So there are no rules then and the
2167    result of the permission check simply is the default_permission (and
2168    it results in having no rules for the 'R'-check as well)
2169    By convention,  a line containing the name of the printer for which
2170    permission is wanted.  Now a blank line is written for 'X' rules.
2171    Added capability of filter getting permissions to Setup_printer().
2172    (Found by: Robin Sommer <rsommer@uni-paderborn.de>)
2173  lpd_jobs: race condition eliminated at the cost of a high system
2174    overhead when multiple jobs are spooled to the same queue.
2175    (Inspired by: Shawna Chase" <chase@crd.ge.com>)
2176  client connections on Solaris 2.5 systems fail with EADDRNOTAVAIL,
2177    and need a 'retry'.  Alternative is to use non-priveledged port.
2178    (Found by: Peter A. Harris <peter.a.harris@exgate.tek.com>)
2179  innetgr() needs FQDN on some systems, and 'shorthost' on others.
2180    Added check to do both.
2181    (Reminded by: Robin Sommer <rsommer@uni-paderborn.de>)
2182  syslog messages not working.  May need to add 'ordering' test to
2183    configure for level comparison.
2184    (Noticed by: Jurgen Northe <juergen.northe@junghans-fwt.de>)
2185  RFC1179 transfer failures to remote spool queue did not do retries
2186    correctly.  The 'JFAIL' status was treated as a permanent failure,
2187    not a temporary.  The 'Service_printer' code now uses the number
2188    of send attempts to do a retry and backoff on transfer times:
2189    configuration and/or printcap options:
2190      send_try:  maximum number of times to send to remote
2191        (0 = infinite) - default 3
2192      connect_grace: minumum time between attempts - default 0
2193      connect_interval: interval between attempts - default 10 sec
2194      max_connect_interval: maximum time to wait - default 60 sec
2195        if( attempt > 0 && max_connect_interval > 0 ){
2196            n = connect_interval * (1 << (attempt-1)) + connect_grace;
2197            if( n > max_connect_interval ) n = max_connect_interval;
2198            sleep(n);
2199        }
2200    (Discovered by: Christof Drescher <drescher@pro-image.de>)
2201  Default filter options were missing '$b'.
2202    (Pointed out by: Jose Carlos Rodrigues Lopes <jrl@europa.fcee.ucp.pt>)
2203  The md5 authentication support did not return back 'error' status for
2204    lpr operations.
2205    (Noticed by: Patrick O'Brien <pdo@cs.umd.edu>)
2206  The 'IS_OS' macros are now set to the OSVERSION;  this makes tests like
2207       #if defined(IS_BSDI) && IS_BSDI > 401
2208    possible.  Sigh...
2209  The filter_path (PATH environment value for filters) added /usr/contrib/bin
2210    (Suggested by: Jeffrey C Honig <jch@bsdi.com>)
2211  UTILS directory needs to be part of the global 'make' so that
2212    tools are created with the right paths.
2213    (Discovered when fixing a problem found by: Jeffrey C Honig <jch@bsdi.com>)
2214  check_for_nonprintable default is now OFF due to 85 distinct problems reported
2215    by various users.
2216    (Email that broke the camel's back sent by: John Hawley <jhawley@bgea.org>)
2217  lp -s was printing status.
2218    (Discovered and fix by:  Mark.Belton@mgc.com.au)
2219  proctitle() code was mangling the envp[] - this only showed up if you
2220    happened to set debug level 6 or higher.
2221    (Discovered by: Vincent Fox <vincent@cad.gatech.edu>)
2222  Microsoft now sends the IP address as part of the control
2223    and data file names.  OK.  We can handle that.
2224    (Pointed out by: Rainer Schoepf <schoepf@uni-mainz.de>)
2225  When using a routing filter, the DATAFILES environment variable
2226    contains the data files.  The routing filter can modify
2227    the datafiles,  but cannot remove them or truncat them.
2228  The default for bq_format is now 'f' - i.e. - you  can reprocess
2229    outputs of bounce queues.  The old default was l (binary),
2230    which was not processable.
2231  The 'lpq -s ID' command was not reporting information correctly.
2232    It always reported the total printable, not the ones selected
2233    by the options.
2234   (Discovered by: Patrick Powell <papowell@lprng.com>)
2235  Retested Kerberos 5 and Kerberos4 stuff with Kerberos 1.1.1,
2236   found problems with compilation,  fixed them.
2237   (Helped by: Mike Whitson <mwhitson@MIT.EDU>)
2238  Updated Version and Copyright information.
2239  Added configure --enable-kerberos option for folks who need to build
2240   'non-exportable' binaries.
2241  Added a '$(INSTALL_PREFIX) entry to the install scripts to allow folks
2242   who want to install the binaries in a different subtree to do so.
2243   I might make this 'PREFIX' to fit in better with feedback.
2244  More fixing of Kerberos stuff - fixed up the problems with different
2245   uses of krb5_xfree.  Added tests for the krb4des library.
2246   (Helped by: Mike Whitson <mwhitson@MIT.EDU>)
2247  The spool_file_perms option was not being used to set permissions for
2248   files in the spool directory.  Noted in the Debian LINUX bugs list.
2249   It was also noted that the user was trying to set some very odd permissions
2250   that would result in a possible security loophole,  but Hey!  I just
2251   do LPRng...  Users (not the LPD server) use 0600 permissions,  just
2252   to avoid those nasty security problems.
2253
2254  Nit pick on man pages: SEE ALSO should not reference same man page.
2255   (Submitted by: Debian Linux Bug List)
2256
2257  checkpc now checks for server printcap entries with lp=xxx and rm=yyy
2258   values.  This way you at least warn the users when they screw up.
2259   (Good suggestion by: Craig Small <csmall@eye-net.com.au>)
2260
2261  Moved tests for 'setproctitle' in configure around to deal with some
2262   problems of libraries being included when they should not have been.
2263
2264  Fixed up the distclean.  Removed junk files.  Move the LPRng_DOCS
2265   into the HOWTO,  as there were no other files left.
2266
2267  Fixed permissions.  Did some fiddling to add easier FreeBSD/NetBSD
2268   etc. support.  Side effect was that testing install is easier.
2269   Added a 'INSTALL_PREFIX' to the installation paths that allows
2270   me to make sure that things go to the right places.
2271
2272  Move the various distribution specific information into DISTRIBUTIONS
2273   directory.
2274
2275  Made the LPRng and ifhp configure.in mainly identical.  Also use the
2276   same portable.h file.
2277
2278  Fixed (once again) typeos in the man pages, and the installation
2279   of compressed man pages.  Sigh...
2280
2281  Added a 'filter_stderr_to_status_file' flag that causes print filter
2282   errors to be written to the status file (:ps=file) rather than to
2283   the status log file.  Also added truncation of the status file.
2284   (Inspired by : "William D. Colburn (aka Schlake)" <wcolburn@nmt.edu>)
2285
2286  Discovered, as a result of testing the 'filter_stderr_to_status_file'
2287   flag that backslash '\' escapes were not being handled correctly
2288   on the filter line.  Fixed this.
2289
2290  If a filter has <,>,;, or | in it, or starts with (
2291    then it is executed by using:
2292    :if=/.../filter xxx   -> /bin/sh -c '/.../filter xxx'
2293    This allows you to do things like '/.../filter 2>>status'
2294    Updated checkpc to check for matching () for filters.
2295
2296  Modified the src/linksupport/connection() code so that the
2297   lpq and other clients do not try binding to port 515.  This
2298   can cause problems when used with Samba.  The code in
2299   linksupport.c that set SO_REUSEADDR and SO_KEEPALIVE was
2300   also tidied up.
2301
2302  lpc -a now works sort of correctly and the documentation has
2303   been changed to reflect it.
2304
2305  The LPC=xx permissions checking did not require a 'C' operation.
2306   Also, cleaned up some message printing.
2307
2308  Make_passthrough was examined and a couple of changes made to
2309   handling the case when the filter path contained a meta character.
2310   The path now has parenthesis put around it.  By default,  this
2311   form of invocation does NOT have options passed to it.
2312
2313  Added a '$*' parameter to provide all the default command line
2314   options.  This now allows you to do:
2315    :if=(/some/path $* | output filter)
2316
2317  New functionality: remove_z, prefix_z, and append_z
2318   (Inspired by a comment by: Richard Kaszeta <kaszeta@me.umn.edu>)
2319    remove_z=pattern,pattern,...
2320      remove the -Z option specified by the pattern.
2321      Example: -Ztest,this,thing   + remove_z=th*,out -> -Ztest
2322    append_z=option,option,...
2323      appends this to the -Z options
2324      Example: -Ztest   + append_z=landscape -> -Ztest,landscape
2325    prefix_z=option,option,...
2326      prefixes this to the -Z options
2327      Example: -Ztest   + prefix_z=landscape -> -Zlandscape,test
2328
2329    Example of use:
2330      You want to have a set of queues where you can have the
2331    queue set the functionality:
2332
2333    landscape:append_z=landscape:lp=remote@host
2334    portrait:append_z=portrait:lp=remote@host
2335       lpr will add these options before the job
2336     is sent.
2337
2338     OR you have a 'bounce queue' situation where you
2339    want to add -Z options as the job goes through:
2340      portrait:append_z=portrait
2341         :lp=remote@host:server
2342      lpd will put these options into the job file
2343      ON RECEPTION.  Also,  before sending to a remote
2344      queue as well.  Kinda bombproof, but covers most
2345      situations.
2346
2347  If you have force_localhost then you want to connect to
2348    the server with the primary name of the printcap entry.
2349    The clients were using the lp=pr@remote pr value instead.
2350
2351  CONFIGURATION OPTION:  ld_library_path and filter_path
2352    you can set these values through configure.
2353
2354  Portability Support:  DISTRIBUTION directory and init files
2355
2356    Put the init scripts for various OS's in the main directory.
2357    This helps the poor administrator who is trying to figure
2358    out what init script he needs.
2359
2360    Gathered up all of the various system dependency stuff and put
2361    it in one big directory.
2362
2363  Fixed up the DISTRIBUTION/Solaris.pkg stuff
2364
2365  The 'subserver' queue management now works.  The problem was that
2366    the main queue server process had to fork a subserver process
2367    for the subserver queue,  and it could not tell that the subserver
2368    queue had been changed.  The following solved this:
2369     a) in the lpd_control.c code, if the queue is a subserver
2370        queue,
2371        1. I set a 'changed' flag in the spool control file.
2372        2. I send a SIGUSR1 signal to the process that is the server
2373           for the subserver queue.
2374        3. If that signal is unsuccessful, then I send a SIGUSR1 signal
2375           to the main queue process.
2376        4. If that signal is unsuccessful I restart the server
2377    b) in the lpd_jobs.c code, in the Process_jobs() routine:
2378        1. I check to see if this queue has subservers,  and then
2379           check the subserver queues.  If the 'changed' flag was set or some
2380           other reason exists to start the subserver, I start a
2381           subserver process.
2382        2. In the main queues 'wait for work' loop,  when I get a
2383           'SIGUSR1' I scan the subserver queues and check to see
2384           if their 'changed' flag is set.
2385           If it is set AND there is no subserver process THEN I will
2386           start a server process.  Otherwise I wait until the subserver
2387           process exits.
2388        3. In the main queues 'wait for work' loop,  when I look for
2389           a free subserver queue to use AND I find one which is
2390           available AND it has a change flag set THEN I start a
2391           subserver process.
2392     As you suspect,  this was NOT a simple set of changes.
2393    (Painfully debugged by: Patrick Powell <papowell@lprng.com>)
2394
2395  Kerberos Fix From MIT: added auth=none support, and allow default
2396    principal lookup.
2397    (Patch by: Robert A Basch <rbasch@MIT.EDU>)
2398
2399  FreeBSD port/package support, Solaris pkg support, RPM (RedHat) Support
2400    The configuration, build, and install process has been modified
2401    to better support package generation.  (I know, it is a dirty business
2402    and I am trying to make it easier for the vendors.)
2403
2404    I have been driven to this by problems that people have with installing
2405    stuff for the first time,  and the rising level of 'Did not RTFM'.
2406
2407    a)  postinstall script selection
2408        The last step of the make install process is to find
2409      a 'postinstall' file and execute it.  The file is chosen by
2410      looking in the configuration directory for a suitable file.
2411      The file is found by using the 'OSNAME' value found by the
2412      configure script.  Linux is a special case - mainly because
2413      I tested several versions and found that they had different
2414      'linux-this' and 'linux-that' suffixes.
2415        I also locate a 'preremove' script and do the same selection.
2416      There is a default 'postinstall' and 'preremove' script as well.
2417
2418        OSNAME=${OSNAME}; case "$${OSNAME}" in *linux* ) OSNAME=linux;; esac; \
2419        echo "OSNAME orig $(OSNAME) '$${OSNAME}'"; \
2420        s=`ls postinstall.$${OSNAME} 2>/dev/null`; \
2421        echo POSTINSTALL "'$$s'"; \
2422        if test -n "$$s" ; then cp $$s postinstall; fi; \
2423        s=`ls preremove.$${OSNAME} 2>/dev/null`; \
2424        echo PREREMOVE "'$$s'"; \
2425        if test -n "$$s" ; then cp $$s preremove; fi;
2426
2427     b) postinstall script execution
2428        If the POSTINSTALL option is not NO, then I execute the postinstall
2429      script as the last step of the 'install' process:
2430
2431    if [ "${POSTINSTALL}" != "NO" ] ; then
2432        MAKEINSTALL=YES INSTALL_PREFIX=$(INSTALL_PREFIX) $(SHELL) postinstall ;
2433    fi;
2434
2435       Note that the 'MAKEINSTALL' environment variable is set to YES.
2436       This can be used to determine that the postinstall script is being
2437       executed by the 'make install' step.
2438
2439     c) "pseudo root" or "PREFIX" support
2440
2441       I have put a "${INSTALL_PREFIX}" variable at all points where
2442       a normal script would have a target.  Thus if you do:
2443
2444           mkdir /var/tmp/LPRng-root
2445           make install INSTALL_PREFIX=/var/tmp/LPRng-root
2446
2447       you will find that all of the files are now put in sub
2448       directories of /var/tmp/LPRng-root.  You can now do:
2449
2450       (cd /var/tmp/root; find . -type f -ls ) >/tmp/files
2451       (cd /var/tmp/root; find . -type d -ls ) >/tmp/directories
2452       cat /tmp/files | grep 'man[0-9]' >/tmp/manpages
2453       cat /tmp/files | grep '/doc' >/tmp/doc
2454        and so forth.  Your Imagination and Creativityy Ma Vary
2455      (YIACMV).  It is left as an exercise for the student on how to
2456      use this with their favorite (Ummm... ok - least hated) package
2457      method to generate a %files, pkg/PLIST,  packinglist, etc. etc.,
2458      for use in package generation.
2459
2460     d)  sample 'init', 'preremove', and 'postinstall' scripts.
2461      I have ruthlessly taken example scripts for FreeBSD, BSDI,
2462      and RedHat Linux and put them in the root directory so that
2463      people can see these scripts.
2464
2465     e) If you want to see how to use these, look in the DISTRIBUTIONS
2466     directory.
2467
2468     Here is the postinstall.freebsd.sh : - comments are marked with *** ....
2469
2470     # FreeBSD Convenience Script for Source Install
2471     # -- START --
2472     # CHANGES,v 1.1 2001/08/21 20:33:14 root Exp
2473     #
2474     #  If you are building a PORT, see the
2475     #  DISTRIBUTIONS/Freebsd directory for a complete port
2476     #  building package.
2477     #
2478     # This is the shell script that does the postinstall
2479     # dynamic fixup
2480     #  It needs to be massaged with the information for
2481     #  various paths.
2482     # If you are building a package,  then you do NOT want
2483     #  to have this executed - it will put the sample files
2484     #  in place.  You need to do this during the postinstall
2485     #  step in the package installation.
2486     #
2487     echo RUNNING postinstall.freebsd.sh PACKAGE="$PACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" cwd `pwd`
2488        **** you can remove this,  but it sure helps when you are trying to
2489        **** figure out what is happening.
2490     ****  - fix is used to put the /etc/lpd.conf, /etc/lpd.perms, and /etc/printcap
2491     ****    or their variants into place.  This is truly ugly,  as there is
2492     ****    no easy way to do this well.  You first assume that you will have at
2493     ****    build time a file with the name 'lpd.conf' (for example) in the
2494     ****    current directory.  If you have this,  then you copy it brutally to
2495     ****    the destination, $TARGET/lpd.conf.sample and,  if there is not an existing
2496     ****    $TARGET/lpd.conf file.
2497     ****
2498     ****    Now we get into some ugly stuff.
2499     ****
2500     ****    When doing a package install,  you will want to copy the package version's
2501     ****    of this file into the same place.   But we do not want to overwrite the
2502     ****    existing lpd.conf, as it will break existing printing.  Note that this
2503     ****    is exactly what happens with RPM - it clobbers the existing config file,
2504     ****    and widdles by telling you about it.  Right.  Who reads all of the rpm output?
2505     ****
2506     ****    So here is what we do.  We will force a package to have only the
2507     ****    lpd.conf.sample file, and we will COPY it to the right destination.
2508     ****
2509     ****    The FreeBSD port/package system functions by having a pkg/PLIST file
2510     ****    that contains all of the files we will put in the package.  If you have
2511     ****    done 'make install INSTALL_PREFIX=/var/tmp/LPRng'  you will get all the
2512     ****    files installed in the /var/tmp/LPRng, and now can simply use file to
2513     ****    list them.  For an example,  see DISTRIBUTIONS/FreeBSD/Makefile and
2514     ****    the 'make plist' target.   I call this a 'chroot' image, cause it is
2515     ****    (hopefully) the same as though you did a 'chroot' to the $INSTALL_PREFIX
2516     ****    directory.
2517     ****
2518     ****    Unfortunately,  this simple picture breaks down when somebody decides
2519     ****    to use the 'PREFIX' facility of the package/port installation facilty.
2520     ****    So we add yet another wrinkle to this.  Use:
2521     ****    'make install INSTALL_PREFIX=/var/tmp/LPRng PACKAGE=YES'
2522     ****    when you are generating a 'chroot' image.  Then you test for this in the
2523     ****    script and put things in a nice place when you are making a package,
2524     ****    and then forcefully reinstall them.
2525
2526     fix () {
2527        v=`echo $1 | sed -e 's/[:;].*//'`;
2528        p=`echo $2 | sed -e 's/[:;].*//'`; d=`dirname $p`;
2529        if expr "$p" : "|" >/dev/null; then
2530            echo "$v destination is filter - '$p'"
2531            exit 0;
2532        fi
2533         echo "Checking for $p in $d"
2534        if [ ! -d "$d" ] ; then
2535            echo "Directory $d does not exist!"
2536            mkdir -p $d
2537        fi
2538        if [ -f $v.sample ] ; then
2539            if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
2540        elif [ -f $v ] ; then
2541            if [ $v != $p.sample ] ; then cp $v $p.sample; fi
2542        else
2543            echo "Do not have $v.sample or $v"
2544        fi
2545        if [ ! -f $p.sample ] ; then
2546            echo "Do not have $p.sample"
2547        elif [ ! -f $p ] ; then
2548            cp $p.sample $p;
2549            chmod 644 $p;
2550        fi;
2551     }
2552     # we use the /usr/local/etc/rc.d method to start lpd
2553     echo "Installing configuration files, cwd " `pwd`
2554     # we have to take them from one place and put in another
2555     if [ "X$PACKAGE" = "XYES" ] ; then
2556        # we put files into the destination
2557      ****  when we make a package,  we need to put the files in the
2558      ****  ${PREFIX}/.... location to be FreeBSD standards compatible
2559         fix lpd.perms "${INSTALL_PREFIX}${PREFIX}/etc/lpd.perms"
2560         fix lpd.conf "${INSTALL_PREFIX}${PREFIX}/etc/lpd.conf"
2561         fix printcap "${INSTALL_PREFIX}${PREFIX}/etc/printcap"
2562         init=${INSTALL_PREFIX}${PREFIX}/etc/rc.d/lprng.sh
2563         echo "Setting up init script $init using init.freebsd"
2564         if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
2565        cp init.freebsd $init
2566     elif [ "X$MAKEINSTALL" = "XYES" ] ; then
2567      ****  OK, now we are doing a make install - this could be a
2568      ****  real install by the user,  or the deadly 'make install'
2569      ****  done by the port package Makefile generation.  But
2570      ****  we know what to do:  install it in BOTH places.  This will
2571      ****  always end up with a copy in .../lpd.perms,  and perhaps
2572      ****  an extra copy as well in perhaps /usr/local/etc/lpd.perms
2573
2574         fix lpd.perms "${INSTALL_PREFIX}${PREFIX}/etc/lpd.perms"
2575         fix lpd.conf "${INSTALL_PREFIX}${PREFIX}/etc/lpd.conf"
2576         fix printcap "${INSTALL_PREFIX}${PREFIX}/etc/printcap"
2577         fix lpd.perms "${INSTALL_PREFIX}${LPD_PERMS_PATH}"
2578         fix lpd.conf "${INSTALL_PREFIX}${LPD_CONF_PATH}"
2579         fix printcap "${INSTALL_PREFIX}${PRINTCAP_PATH}"
2580         init=${INSTALL_PREFIX}${PREFIX}/etc/rc.d/lprng.sh
2581         echo "Setting up init script $init using init.freebsd"
2582         if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
2583        cp init.freebsd $init
2584         chmod 744 $init
2585        echo "Stopping LPD"
2586        pid=`cat ${LOCKFILE}* 2>/dev/null`;
2587        if [ -n "$pid" ] ; then kill -INT "$pid" 2>/dev/null; fi
2588        if [ -n "${KILLALL}" ] ; then ${KILLALL} 2>/dev/null; fi
2589        # check the printcap information
2590        echo "Checking Printcap Info and fixing permissions"
2591        ${SBINDIR}/checkpc -f
2592        # restart the server
2593        echo "Restarting server"
2594        sh $init start
2595     else
2596       ****  OK, this is done when we do a package install.  You will
2597       ****  be amazed to discover that the ./etc/lpd.perms file is now
2598       ****  present here - so you can install this.  Gahh... The reason
2599       ****  for this seems to lie with the way that the package/port
2600       ****  mechanism works.  If this is changed,  then it is back to the
2601       ****  trenches to find out where and if the file location has
2602       ****  changed.
2603
2604        # when doing an install from a package we get the file from the package
2605         if [ -f etc/lpd.perms.sample ] ; then
2606             fix etc/lpd.perms "${LPD_PERMS_PATH}"
2607             fix etc/lpd.conf "${LPD_CONF_PATH}"
2608             fix etc/printcap "${PRINTCAP_PATH}"
2609             init=etc/rc.d/lprng.sh
2610             echo "Checking init script $init"
2611             if [ ! -f $init ] ; then
2612                 echo "WARNING: $init missing!"
2613                 exit 1
2614             fi;
2615             cp $init /usr/local/$init
2616             chmod 744 $init
2617         else
2618             echo "WARNING: configuration files missing from package!"
2619         fi
2620     fi
2621
2622  Here is the postinstall.linux.sh:
2623
2624    # LINUX/RedHat Source Installation Convenience Script
2625    # -- START --
2626    # CHANGES,v 1.1 2001/08/21 20:33:14 root Exp
2627      *** same as above
2628    fix () {
2629      *** same as above
2630    }
2631    echo "Installing configuration files"
2632    init=${INSTALL_PREFIX}/etc/rc.d/init.d/lprng
2633    if [ "X$MAKEINSTALL" = "XYES" ] ; then
2634        if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
2635        cp init.linux $init;
2636        chmod 744 $init
2637        fix lpd.perms "${LPD_PERMS_PATH}"
2638        fix lpd.conf "${LPD_CONF_PATH}"
2639        fix printcap "${PRINTCAP_PATH}"
2640    else
2641        *** this is tricky ....
2642        fix "${LPD_PERMS_PATH}" "${LPD_PERMS_PATH}"
2643        fix "${LPD_CONF_PATH}" "${LPD_CONF_PATH}"
2644        fix "${PRINTCAP_PATH}" "${PRINTCAP_PATH}"
2645    fi
2646    if [ "X$PACKAGE" != "XYES" ] ; then
2647        echo "Configuring startup scripts"
2648        if [ ! -f $init ] ; then
2649            echo "Missing $init";
2650        fi
2651        if [ -f /etc/redhat-release -a -f /sbin/chkconfig ] ; then
2652            echo "RedHat Linux - running chkconfig"
2653            /sbin/chkconfig --del lpr
2654            /sbin/chkconfig --add lprng
2655            echo "Starting Printer"
2656            sh $init start
2657        else
2658            echo "Hand install the configuration files"
2659        fi;
2660    fi;
2661
2662   Cleaned up the 'Make_passthrough' use by having a single
2663    'Filter_file' routine.  Problems of unclosed file descriptors
2664    disappeared.   Sigh...
2665
2666   Discovered that the 'generate banner' code was not working, and
2667     has probably not worked since 3.5.4.  Shows how many people
2668     use this.  Fixed.
2669
2670   Discovered that the 'af=|/...' option caused 'orphaned' children
2671     which would hang around until the main lpd server process
2672     exited.  Problem unsolvable on the systems where the problem
2673     exits.  The :as and  :ae provide better functionality for
2674     this case.
2675
2676   If you have an OF filter and one of the other filters dies,
2677    then you invoke the final OF filter,  even though the job
2678    will exit with an error.  This allows you to do some cleanup
2679    in the OF filter.  Implemented by modifying the common/printjob.c
2680    code so that it did a 'goto end_of_job' rather than 'goto error'.
2681    I wonder why I did not see this before.
2682
2683   Fixed a really dumb idiot problem with portability.  I simply do
2684    not allow lp=|/filter on systems without the 'socketpair'
2685    function.  Sigh...  There must be a way around this but I can't
2686    see one.
2687
2688   Added a 'JSUSP' to the error codes.  Sigh...  Needed this to
2689    indicate that a filter had suspended itself correctly.
2690
2691   Check the size of the status file before writing - this adds one
2692    fstat() call per write,  but you don't update the status file
2693    very often.
2694    (Pointed out when his status file filled up the /var spool
2695      directory by: Dmitry Bely <dbely@mail.ru>)
2696
2697  We don't steal,  we borrow:  the :sh flag in the printcap causes
2698   lpr to act like the -h (no header) flag was present.
2699   (Showing the tattered edges from cutting it out of the
2700     the FreeBSD lpr code, sent by: Garance A Drosihn <gad@eclipse.acs.rpi.edu>)
2701
2702  pclbanner and psbanner now back in /bin/sh.  Sigh.  Some supported
2703   systems do not have Perl.
2704    (Grudgingly ported to /bin/sh scripts by:
2705      Patrick Powell <papowell@lprng.com>)
2706
2707  The printcap 'x:' is now a real printcap.  You use the default
2708    entry values for it.  Strange how this one did not get caught
2709    earlier.  The 'lpc client x' and 'lpc server x' now looks up the
2710    wildcard as well as the normal information.  And finally, checkpc
2711    will squawk if you try to use a wildcard as a queue name,
2712    rather than an alias.
2713
2714  You can now do run time load balancing using user specified program
2715   OR a built in filter.
2716
2717   Printcap/configuration option:
2718     chooser=/path/to/program
2719         STDIN = list of queues to choose from, one per line
2720         STDOUT = single queue to use
2721              (if none, job is skipped)
2722       exit code: == 0 handle job and put it into specified queue
2723           if any
2724                  != 0 treat job as though error code was returned
2725                       for processing.  Allows job to be held, etc.
2726     chooser_routine
2727       chooser_routine@  - default - do not use chooser routine
2728       chooser_routine   - use chooser routine
2729
2730       configure --with-chooser_routine=name --with-user_objs=objectfile.o
2731          defines the CHOOSER_ROUTINE compilation option to name
2732          includes the objectfile.o in the library.
2733
2734      routine usage is described in common/user_objs.c
2735
2736      Now you can have a very optimized routine that will do all sorts
2737       of horrible things.  Enjoy.
2738
2739  You can now do queue ordering using a user provided routine
2740
2741     order_routine
2742       order_routine@  - default - do not use order routine
2743       order_routine   - use order routine
2744
2745       configure --with-order_routine=name --with-user_objs=objectfile.o
2746          defines the CHOOSER_ROUTINE compilation option to name
2747          includes the objectfile.o in the library.
2748
2749      routine usage is described in common/user_objs.c
2750
2751      Now you can have a very optimized routine that will do all sorts
2752       of horrible things.  Enjoy.  Note that the overhead for a filter
2753       was horribly high and I could not come up with a clean interface.
2754       Besides, if you are mucking around with this stuff, you better
2755       make sure you know what you are doing.  See the user_objs.c
2756       and LPRng/src/common/getqueue/Make_sort_key() for details.
2757
2758  When you did a redirect of a queue, would not move the jobs in
2759   the queue.  This is now fixed.
2760
2761  Updated the printcap.5 man page so it is a bit closer to reality.
2762
2763  Finally got slammed with a 'blank page' of output once too
2764   often.  The ':sf' (supress form feeds between job files) flag
2765   is now history.  If you need a form feed between a job file,
2766   then use 'ff_separator'.
2767
2768  Yet another version of the UTILS/accounting.pl file.
2769
2770  The client -A option (use authentication) now selects the authentication
2771  type from the AUTH environment variable.
2772
2773Release LPRng 3.6.13 Fri Jan 28 08:03:07 PST 2000
2774  MIT Kerberos support:  added code to detect when sending job to server
2775   and the server name is 'localhost'.  This requires a special ticket
2776   lookup to get the right ticket,  as there is no lpd.localhost ticket,
2777   only lpd.servername.
2778   (Supplied by: Mike Whitson <mwhitson@MIT.EDU>)
2779  src/Makefile.in:  ln ${STRIP} -> ln -s
2780   (Noticed by: Mike Whitson <mwhitson@MIT.EDU>)
2781  The filter $- specification did not handle $-/xxx and $-root/xxx
2782   correctly.
2783   (Spotted by: Simon Wilkinson <sxw@dcs.ed.ac.uk>)
2784  When using 'user' or 'custom' authentication,  lpr errors were
2785   not printed out.  This was due to common/sendjob.c:Send_auth()
2786   not setting non-zero return status when there were error conditions.
2787   (Reported by: Patrick O'Brien" <pdo@cs.umd.edu>)
2788  man/install-sh missing, and ifhp src/install-sh as well.
2789   (Reported by: Bill Kemp <bkemp@srp.gov>
2790  LPRng/Makefile.in referenced the wrong location for lpd.conf and lpd.perms
2791   sample files.
2792   (Spotted by:  Marty Leisner <leisner@sdsp.mc.xerox>)
2793  LPD: now do accept in the main lpd process, and this time we brutally
2794   send a message to the remote end if we cannot fork the child
2795   process.
2796  Some linksupport.c routines modified to NOT close sockets on
2797   error condition.  This allows us to try to read additional error
2798   information from the remote system.
2799  Tested the kerberos5 authentication with kerberos-1.0.5.  Fixed
2800   sserver.c and sclient.c.
2801  LPRng-HOW corrected.  Filters only get SIGINT and SIGCONT sent
2802   to them to kill them off.
2803   (Spotted by: Robin Sommer <rsommer@uni-paderborn.de>)
2804  Authentication support code rewritten to support error message and status
2805   returns.  Also,  added error messages and status reports.
2806  lpd started too many servers.  The Get_max_server() code returned
2807   the maximum number of server processes that should be running,
2808   and I would try to start this number.  This would lock up the system
2809   until one had exited.  Now I start up max_servers - 4 at most
2810   at startup time.  This is still high,  but seems to work.
2811  lpq.c: missing argument to plp_snprintf()
2812    (Patch by: Craig Small <csmall@eye-net.com.au>)
2813  The environment variables passed to filters were not getting their
2814    escaped characters expanded.  Thus, PATH=xx\072xx\072xx was
2815    getting passed instead of PATH=xx:xx:xx
2816  The default lpd.conf has been fixed so that it has escaped values for
2817    : instead of : in the file.
2818  Some filters require a killpg() AND a kill(SIGINT) AND a kill(SIGCONT)
2819    to die.  Next it will have to be garlic and a stake... Sigh.
2820    (Noted by:  Peter Scheurer <scheurer@sopra-gmbh.de> )
2821  The translate_format and translate_incoming_format options can now have
2822    '*f' entries - the * matches all formats.  This would translate all
2823    file formats to f.
2824
2825  The LPRM forward in common/lprm.c did not pass the user's name correctly.
2826    (Found by: John Perkins <john@cs.wisc.edu>)
2827  Reformatted LICENSE so that the words GPL are in the first lines
2828    so that people can tell right away.
2829  Updated dates to match Jan, 2000
2830  LPQ and LPRM commands were not being forwarded correctly.
2831
2832  RADICAL CHANGE IN CODE ORGANIZATION:
2833    In the next major release I will be restricting authentication to
2834  code modules only,  and users will have to write (gasp!) C code to do
2835  this.  This is due to the problems with adding various types of
2836  encryption, etc., which are not well supported by shell scripts,
2837  etc.  (I won't discuss the legal issues, these are ugly.)
2838
2839    The following restructuring of the Authentication API has now been done.
2840  a) Printcap, lpd.conf information
2841     The auth=xxx and auth_forward=yyy set the type of authentication
2842    to be used by the sender.  The auth=xxx is used by the clients
2843    to communicate with the server and the auth_forward for server to
2844    server communication.
2845  b) for each authentication type there is an unlimited amount of configuration
2846    stuff available now.  The configuration/printcap entries have the
2847    format xxx_key.  The xxx_id entry is used by clients to identify the
2848    id of the remote server that they are to use for authentication type
2849    xxx.  When the server accepts a connection,  it will use the xxx_id
2850    value as its 'key' or whatever for the connection.  Similarly,  when
2851    doing server to server communication,  the xxx_forward_id is the
2852    id of the remote server;  the remote server will still use xxx_id.
2853    The reason for this has to do with printcap organization.  You want
2854    to have both entries present in a printcap,  one for a client to send
2855    to the server, and the other for the server to forward to another
2856    server.
2857      You should note that this will break down a little bit when you
2858    have bounce queues.  Since there is only one xxx_forward_id available
2859    for all of the destinations,  all of the destinations will need to
2860    use the same xxx_forward_id value.  This problem will have to be solved
2861    at the authentication module level,  probably by not using the xxx_id
2862    and xxx_forward_id for anything but advisory information.
2863      For backwards compatibility, kerberos can also use kerberos_server_principal
2864    and kerberos_forward_principal instead of kerberos_id and kerberos_forward_id
2865    respectively.
2866  c) for server to server authentication,  use the 'auth_forward=type' to
2867    set the authentication type for forwarding.
2868  d) For example, to use kerberos authentication the client printcap
2869    entry would have:
2870        auth=kerberos
2871        kerberos_id=lpr/lpr@server.host  OR
2872        kerberos_server_principal=lpr/lpr@server.host
2873        kerberos_service=lpr
2874        kerberos_life=...   (this are usually not used)
2875        kerberos_renew=...  (this are usually not used)
2876
2877    The server printcap entry would have:  (note no 'auth=' stuff used)
2878        forward_auth=kerberos    (to use kerberos to forward)
2879        kerberos_id=lpr/lpr@server.host  OR
2880        kerberos_server_principal=lpr/lpr@server.host
2881        kerberos_service=lpr
2882        kerberos_life=...   (this are usually not used)
2883        kerberos_renew=...  (this are usually not used)
2884        kerberos_keytab=/etc/krb5.keytab
2885        kerberos_forward_id=lpr/lpr@anotherserver.host
2886
2887    In addition,  you will find that PGP authentication has been more fully
2888    supported.
2889      CLIENTS:  use environment variables
2890        PGPPASSFILE = location of a file with the PGP password
2891        PGPPASSFD   = fd to read the password from (very very rarely used)
2892      Client Configuration:
2893        auth=pgp
2894        pgp_id = pgp id of the server, used to get server key from key ring
2895        pgp_path = /...  - path to PGP executable on user system
2896
2897      Server Configuration
2898        pgp_id = pgp id of the server, used to get server key from key ring
2899        pgp_path = /...  - path to PGP executable on server system
2900        pgp_server_passphrasefile = file containing passphrase to be used by server
2901           to unlock key file
2902         Server keyring files are in the server user home directory,
2903        i.e. - if server runs as 'daemon' it is ~daemon/.pgp/pubring.pgp and
2904        ~daemon/.pgp/secring.pgp.  Don't fight it.
2905
2906    Note that user level authentication using shell scripts is still there,
2907    but I am making it hard to use.  Don't use it.  Evil.  Bad.  See the
2908    notes below on how to add C code to do this.
2909
2910   And I have added some interesting code to use md5 authentication and
2911    shared secrets:
2912      CLIENTS:  use environment variables
2913        MD5KEYFILE  - file containing md5 keys format is:  name=key.
2914      keys are currently 16 chars long - the ASCII values are used
2915      to set the 'key' value.  Yes, yes, I know there are only approx
2916      76**16 = 5 * 10*29 possible keys using this.  Tough.  A key for the
2917      user name (login name) and the md5_id need to be present
2918
2919         Example:
2920         User Keyfile
2921           # from the configuration information: md5_id=key
2922           # we use 'key' to look up the host information
2923           # the entry has the format '[user_auth] salt'
2924           #  if user_auth is present then it will be used as the
2925           #  'from' or 'client' information.  The recipient will use
2926           # this value to look up the corresponding hash key value in
2927           # servers keyfile
2928           #key  = user_auth   salt
2929           lpr@h4=papowell-h4  xx01223750adfj9098789sdfadf
2930           lpr@h5=papowell-h5  asdfu189asdfasdfasdfasdfasd
2931
2932        Server Keyfile (host h4)
2933           #key  = user_auth   salt
2934           # user key
2935           papowell-h4=xx01223750adfj9098789sdfadf
2936           # key for forward transfer to host h5
2937           lpr@h5=lpr-h4 adfa9ipioasdfasdfjklsf
2938           # key for forward transfer from host h5
2939           lpr-h5=adfa9ipioasdfasdfjklsf
2940
2941        Server Keyfile (host h5)
2942           #key  = user_auth   salt
2943           # user key
2944           papowell-h5=asdfu189asdfasdfasdfasdfasd
2945           # key for forward transfer to host h4
2946           lpr@h4=lpr-h5 adfa9ipioasdfasdfjklsf
2947           # key for forward transfer from host h4
2948           lpr-h4=adfa9ipioasdfasdfjklsf
2949
2950        Configuration:
2951          auth=md5
2952
2953
2954    Just to make life interesting,  I have also added a demonstration
2955      of how to do md5 signing and authentication.
2956
2957   e) Code reorganization
2958       The LPRng/src/common/sendauth.c and LPRng/src/common/lpd_secure.c
2959    files have the following stuff added at the end.
2960
2961  #define SENDING
2962  #include "user_auth.stub"
2963
2964   struct security SendSecuritySupported[] = {
2965      /* name,       config_tag, connect,    send,   receive */
2966      { "kerberos4", "kerberos", Send_krb4_auth, 0, 0 },
2967      { "kerberos*", "kerberos", 0,           Krb5_send },
2968      { "pgp",       "pgp",      0,           Pgp_send },
2969      { "user",      "user",     0,           User_send },
2970  #if defined(USER_SEND)
2971  USER_SEND
2972  #endif
2973      {0}
2974  };
2975
2976     This is an example of how you add user level stuff for encryption
2977   and not go to jail for international arms smuggling.  The "user_auth.stub"
2978   file contains the source code for the various modules, or you can put the
2979   source code in another file and link it in.  This is recommended when you
2980   want to use a dynmically loadable library and ship the library. (Note:
2981   yes, I looked at loadable modules a la Apache,  but LPRng runs on systems
2982   that do not support this, so I gave up.  This is the older method from
2983   other real time software that seems to work.)
2984
2985     The data structure has the name of the authentication, used with the
2986   auth=xxx tag.  The name field corresponds to the xxx value.
2987
2988     The config_tag is used to do lookups in the various configuration and
2989   printcap files to get values.  Why not make them the same?  As you see
2990   in the example, we have kerberos4 and Kerberos 5,  but we use different
2991   support routine with the same key values.  Backwards compatibility is
2992   thus assured.  Oh, yes. Note that you can use wildcards for the name value.
2993   The connect, send, and receive fields are the support routines that are
2994   used for handling encryption.
2995
2996   connect:  make a connection,  fumble around and do authentication,
2997    and then return.  Kind of like a 'connect' call,  but does handshaking.
2998    Note that the data link and other stuff is handled by LPRng.  Very
2999    lightweight and fast.
3000
3001   send: this is an alternative to connect.  The routine is handed a file
3002    that it packs up and then sends to the remote end.  In response
3003    it gets data back that it will unpack and deliver to the user as
3004    status or error messages.
3005
3006   receive:  this routine is called when the LPD server gets an authentication
3007    request.
3008      If the 'connect' routine is used,  'connect' sends a magic
3009    string to the server that will cause it to call this routine.  The routine
3010    will do the hand shaking,  and then return.  The normal LPD service
3011    routine will take over.
3012      If the 'send' routine is used,  this routine will get the stuff sent
3013    by the remote end, unpack it, or what ever is appropriate,  and then
3014    call the LPD service routine.  By convention, it passes the routine
3015    a file to put its error messages, etc., into.  When the routine returns,
3016    the file contents are packaged up and sent back to the server.
3017
3018     Note:  Kerberos4 :  uses connect / receive
3019            Kerberos5 :  uses send / receive
3020            PGP       :  uses send / receive
3021            MD5 'send':  uses send / receive
3022            MD5 'con' :  uses connect / receive
3023
3024   The source code for PGP authentication is in LPRng/common/linelist.c
3025   (don't ask).  You can get an idea of how to add more authentication by
3026   looking in LPRng/common/user_auth.stub for excruciatingly detailed
3027   discussions and examples.
3028
3029   The #define SENDING controls what stuff in the user_auth.stub
3030   gets included.  If you look in the sample file,  you will find:
3031
3032   #if defined(SENDING)
3033   extern int md5_send();
3034   #  define USER_SEND \
3035      { "md5", "md5", md5_send, 0, md5_receive },
3036   #endif
3037
3038   This little bit of code causes the prototype md5_send() to be put in place,
3039   and then the USER_SEND to be defined.  Note that in the original file (send_auth.c)
3040   that this is used in a table to insert the correct authentication stuff.
3041
3042   Enjoy.
3043
3044Release LPRng 3.6.12 Tue Oct 26 16:59:35 PDT 1999
3045  AIX does not like control files where Nxxx comes before data file lines.
3046   Added a 'nline_after_file' option to cause LPRng to put Nlines after
3047   data file lines.
3048   (Noticed by: Nik Conwell <nik@bu.edu>)
3049 configure - kerberos libraries are now specified at the start
3050   of the library list (LIBS="-lkrb5 $LIBS")
3051   (Suggested by: John Perkins <john@cs.wisc.edu>)
3052 Typo caused LPD not to read the permissions file.
3053   (Noticed by EVERYBODY,  but first by: Patrick O'Brien" <pdo@cs.umd.edu>)
3054
3055
3056Release LPRng 3.6.11 Sun Oct 24 13:37:44 PDT 1999
3057  Permissions checking: SERVICE=* was not getting handled correctly.
3058   (Found by: Dejan Ilic <svedja@lysator.liu.se>)
3059  Jobs with more than 26 files were quietly being mangled.
3060   (Found by: Derek Masseth <dmasseth@u.arizona.edu>)
3061  lp simulation now returns a 'job identifier' consistent with
3062   Solaris 2.5 format.
3063   (Noticed by:  Martin Mokrejs <mmokrejs@natur.cuni.cz>)
3064  Added support for case sensitive key lookup in sorted lists.
3065   (General cleanup and tidy: Patrick Powell <papowell@lprng.com>)
3066  Set_linger() (setsockopt socket linger timeout) failure is
3067   now ignored,  rather than treated as failure.  This now
3068   handles the case where pipes are actually second class citizens
3069   and the operation fails.  Note that this probably could
3070   be fixed by testing the file descriptor for type and then
3071   determining the exact socket type,  but this is NOT portable.
3072  Set the default paper size for the IFHP-HOWTO to letter.
3073   The psutils package can be used to resize this for a4, which
3074   is slightly larger.
3075  Did horrible things to job reception to handle jobs with
3076   spaces and more bogus entries in the name fields.  This
3077   is really strange.  Note: still one quirk - if the server name
3078   has a space in it AND the job is originated on the server,
3079   THEN the originating host is set to 'localhost'... which is
3080   correct but may be odd when forwarding to another system.
3081  Compaq AKA DEC True 64 support added - configure.in now does
3082   odd things to detect correct libraries to be used to get
3083   gethostbyaddr() support.  Portablility.
3084  configure --disable-strip will disable stripping of binaries.
3085   (Requested by: Marty Leisner <leisner@sdsp.mc.xerox.com>)
3086  Permissions, 'SERVICE=P', and job removal:
3087   if a print job gets through the 'R' (lpr job sumission) checking,
3088   and gets into the queue,  there is another check ('P' or print
3089   time checking.  This was done to subdue complaints from systems
3090   which could not handle a 'no permssions' error and would sit
3091   there endlessly trying to send the same job to the printer
3092   queue, and other users would not get their jobs through.
3093
3094   When a job is ready to be printed and fails the 'SERVICE=P'
3095   permissions check,  it is now removed and not printed,
3096   UNLESS the 'save_on_error' flag is set,  in which case it
3097   is marked with a permissions error and left in the queue.
3098
3099   Note 1:  the lpd.perms file has been updated to reflect this
3100   behavior.
3101   Note 2:  the HOWTO has been updated to reflect this behavior.
3102   Note 3:  if you have a DEFAULT REJECT in your lpd.perms,  this
3103   means that no jobs will get printed. :0).  Enjoy.
3104
3105  Set the 'SO_KEEPALIVE' option on sockets to force keepalives to be
3106   sent so that dead connections would be detected.
3107  Updated some code in the common/lpd_remove.c file to close a small
3108   timing race condition for job removal.  Sometimes a job would get
3109   removed and the server process would not be killed.  Note that
3110   the kill is done by sending SIGINT to the processes.
3111  Changed a int to double for file length in common/lpd_rcvjob.c.
3112  Modified UTILS/cheap_lpr and UTILS/LPRng.pm to handle more than
3113   one file in print jobs.
3114  Checked out a few problems with PGP and user specified authentication.
3115   (Spotted by: Patrick O'Brien" <pdo@cs.umd.edu>)
3116  LPQ - use the file name information if no 'J' (job) line in control
3117   file, and finally "NULL" if no information. This prevents many scripts
3118   from breaking.
3119  getqueue.c:Get_datafile_info() was not getting the N,U, and format
3120   values correctly under all circumstances,  i.e. - duplicates,
3121   out of order N lines,  totally bogus or missing N information.
3122   What a mess.
3123   (Spotted and patch by: Edwin Lim <elim@research.att.com>)
3124   (And lots of others, with comments, flames, and snickers as well.)
3125  Fixed a problem when you used a filter to get printcap information,
3126   and you did a recurive get,  and you had a tc=xxx entry.
3127   (Spotted and debugged by: Simon Wilkinson <sxw@dcs.ed.ac.uk>)
3128  configure --enable-priv_ports action was reversed...
3129   (Spotted by: Robert Montjoy <Rob_Montjoy@ececs.uc.edu>)
3130  Warning message about '@' in a printcap name was malformed.
3131   (Spotted by: Andreas Kahnt <ak@m-ebert.de>)
3132  Added a 'tc_only' flag to allow printcaps to be explictly
3133   marked for 'tc=name' use only.  This allows people using
3134   NIS, NIS++, and other database engines to put printcap
3135   information in database forms.
3136  Now 'checkpc -P printer' will only check specified printer.  Handy
3137   for 'checkpc -f -P printer' type of operations when you add a
3138   new printer to a system.
3139   (Suggested by: Wilfried Gaensheimer <wilfried.gaensheimer@hl.siemens.de>)
3140
3141
3142Release LPRng 3.6.10 Sun Sep 12 19:46:33 PDT 1999
3143  lpc.1 man page moved to lpc.8 man page
3144  (Suggested by: Craig Small <csmall@eye-net.com.au>)
3145
3146  PERMISSIONS CHECKING:
3147    The USER, HOST, IP, SAMEUSER, SAMEHOST, entries will now SUCCEED
3148    when checking permissions for an operation to be applied to a
3149    spool queue;  when the individual jobs in the queue are checked
3150    the comparisons will then be done.  This has the effect of allowing:
3151       ACCEPT SERVICE=C LPC=hold,release SAMEUSER SAMEHOST
3152       ACCEPT SERVICE=M SAMEUSER SAMEHOST
3153    to be specified and allows a user to hold, release, or delete
3154    their jobs.
3155    (Need pointed out by: Jens Noelle <noelle@amica.rwth-aachen.de>)
3156
3157  Updated the lpd.conf file generation to put in the types of options.
3158
3159  NONE renamed to NONEP due to conflicts with some <sys/types.h>
3160    definitions.
3161
3162  Added a $_ capability to filter options.
3163    (Patch by: Mike Whitson <mwhitson@MIT.EDU>)
3164
3165  Added a configure option to set the :sh default to 1 (on).
3166
3167Release LPRng 3.6.9 Mon Aug 30 13:30:58 PDT 1999
3168  reverse_priority_order flag - priority z-aZ-A, i.e. - A is lowest
3169   (Requested by: Dennis Bush <Dennis.Bush@dowjones.com>)
3170  LPD now does a chdir("/") so that it is in a well known location.
3171   (Requested by: Craig Small <csmall@eye-net.com.au>)
3172  Time used to sort job is now the arrival time of the last byte
3173   of the job.
3174
3175Release LPRng 3.6.8 Fri Aug 27 17:06:10 PDT 1999
3176  *** WARNING:  configure strikes again
3177  ***
3178  *** printcap, lpd.conf, lpd.perms now default to:
3179  ***  /usr/local/etc/{ printcap, lpd.conf, lpd.perms}
3180  ***
3181     You may want to do:
3182       ln -s /etc/printcap /usr/local/etc/printcap
3183     OR
3184       configure --with-printcap_path=/etc/printcap
3185
3186     Please move your lpd.conf and lpd.perms files to /usr/local/etc/
3187
3188  Why?  Because when trying to port this to XxxxBSD, BSDI, Solaris,
3189  SunOS, HPUX, DGUX,  etc etc etc I have run into so many inconsistencies
3190  that I have just given up.
3191
3192  You might as well assume that the following is true for a default install.
3193
3194  Updated configuration to be a little more consistent with other packages
3195   default installation directories:
3196     ${prefix}  is usually /usr/local
3197     ${bindir}  is usually ${prefix}/bin, (/usr/local/bin)
3198     ${sbindir} is usually ${prefix}/sbin (/usr/local/sbin)
3199     ${libexecdir} is usually ${prefix}/libexec (/usr/local/libexec)
3200     ${sysconfdir} is usually ${prefix}/etc (/usr/local/etc)
3201     ${mandir} is usually ${prefix}/man     (/usr/local/man)
3202
3203   We install the executables in:
3204         (* indicates default SETUID Root install)
3205     ${bindir}/ lpr *, lprm *, lpq *, lpstat *
3206     ${sbindir}/lpc *, checkpc, lpd *
3207     ${libexecdir}/filters/ lpf, banner, etc
3208     ${sysconfdir}/ lpd.conf, lpd.perms, printcap
3209     ${mandir}/ man pages
3210
3211   Suppose you wanted to put them in /usr/bin, /usr/sbin, and /etc:
3212     configure --prefix=/usr --sysconfdir=/etc
3213
3214
3215   Note the following explicit overrides:
3216  --disable-setuid        disable setuid root client and server executables
3217  --enable-priv_ports     require connections to be from privileged ports
3218  --disable-force_localhost force_localhost default to disabled
3219  --with-lpddir=DIR       lpd executable directory (default ${sbindir})
3220  --with-filterdir=DIR     filter directory (default ${libexecdir}/filters)
3221  --with-lpd_conf_path=PATH     path to lpd.conf (default: ${sysconfdir}/lpd.conf)
3222  --with-lpd_perms_path=PATH    path to lpd.perms (default: ${sysconfdir}/lpd.perms)
3223  --with-printcap_path=PATH     path to printcap (default ${sysconfdir}/printcap)
3224
3225  Fixed up the INSTALL and HOWTO documentation as well.
3226
3227  Note 1:  you can make a symbolic link from /usr/local/etc/printcap to
3228   /etc/printcap and this will solve the issue as well.
3229
3230  ---
3231  Job time is now recorded down to the millisecond a jobs sorted according to that
3232    time.  This will slightly improve the situation due to multiple jobs arriving at
3233    at (approximately) the same time.  Jobs are sorted accordingly.
3234    (Suggested by: Abramo Bagnara <abbagnara@racine.ra.it>)
3235
3236Release LPRng 3.6.7
3237
3238  LPRng now handles files larger than 2 gigabytes on systems where the max
3239    size_t is larger than 2 gigabytes.
3240  configure now checks to see that there is a prototype for lseek().
3241    (Both inspired by somebody trying to print a 2G file:
3242       John Kimberley <jkimberly@harland.net>)
3243  lpq -n linecount
3244     Limits number of status lines to linecount.  Can be used when
3245   you want an exact number rather than using -llll.
3246  lpc now puts debug flags in () -
3247     Printer    Printing Spooling Jobs  Server Subserver Redirect Status/(Debug)
3248    t1@h4       enabled  enabled    0    none    none          (4)
3249  There is a horrible problem with load balance queues, SIGCHLD, and missing
3250    SIGUSR1 signals on Solaris 2.4, 2.5, and 2.5.1.  The code in lpd_jobs.c
3251    has been rewritten,  silly things have been done and it now looks awful,
3252    but it works,  is portable,  and ugly.  So much for elegance.
3253  Added more %U option to lpc, lprm to allow SAMBA to specify users.
3254
3255Release LPRng 3.6.6 Sun Aug 22 10:42:20 PDT 1999
3256  LPD did not exit with non-zero success code when there was another
3257    lpd active.
3258    (Patch from: Stephen Fischer <fischer@cse.unsw.edu.au>)
3259  LPD bounce queues changed the 'N' data in the control file.  Should not
3260    do this.
3261    (Noticed by: John Rothlisberger <rthlsbrj@pprd.abbott.com>)
3262
3263  New timeout - exit_linger_timeout
3264    When an LPD server process exits,  it needs to try to 'flush' data over
3265    the various pipes, sockets, etc, that are part of the IPC.  The problem
3266    is that on some OS's,  when a process exits the data in a pipe buffer
3267    may be discarded if the process exits due to a signal.  Added
3268    'exit_linger_timeout'  to force all pipes/sockets to be 'lingered' on
3269    during cleanup.  This is a totally bogus method.  What is needed is a
3270    setsockopt() function similar to 'fflush' that would not return until
3271    all the data is flushed to the remote end.  It turns out that the
3272    SO_LINGER with a 0 value should have done this,  but the 0 value causes
3273    a 'default' value to be used.  Grr...  Needless to say this is a hack
3274    of the worst type,  does not work on all systems.
3275
3276  LPR was failing due to connnections closing due to lack of processes.
3277    When a connection is made to the LPD server,  it used to do accept()
3278    and would then fork a process.  This would lead to some ... interesting...
3279    denial of service attacks,  and some very odd problems when you ran out
3280    of processes.  The code now does the following:
3281       creates a pipe()
3282       forks a process =
3283         = child will now do an accept
3284         = child will then close the pipe
3285       parent WAITS until the child pipe is closed.
3286    This has the effect of making sure that the child process has
3287    done the accept,  and will BLOCK until the accept is done.
3288    This makes sure that there is a process to handle the connection.
3289    Wierd, I tell you.  Note that there is a way to do a DOS attack on
3290    some systems that signal a connection is available BEFORE the 3 way
3291    handshake completes,  and should cause endless problems.  You can
3292    also launch DOS attacks on inetd, ftp, etc. etc. on these systems
3293    as well.  See CERT for more nasty details.
3294
3295  LPQ now correctly reports all jobs, even ones from different
3296    machines with the same job numbers.  Yeah, it looks confusing
3297    in the output to have two job 12's,  but HEY!  what do you want
3298    on 80 columns?
3299
3300  LPQ now confuses people trying to figure out why there are
3301    duplicate jobs in the status listing.  See above.  Isn't this
3302    marvellous?
3303
3304  lpd_jobs: when processing long queues a huge number of tempfiles
3305    would be created.  Now these are removed each time the queue is scanned.
3306    Sigh...
3307
3308  lpd_jobs: when you have a connection opened using lp=host%port,
3309    then lpd now do a shutdown(port,1) on the socket.  Now we get
3310    into the really odd stuff.  We first set the linger value to
3311    'read_write_timeout' if nonzero otherwise the 'exit_linger_timeout'.
3312    IF the 'wait_for_eof' flag (default TRUE) is set,  we try
3313    READING from the socket until we get an eof.  We then close
3314    (with the linger) the socket.
3315
3316    Here are the problems that this tries to solve.
3317
3318    When you send a job to a printer over a socket connection,
3319    you stuff the files into a socket and then expect the OS to
3320    deliver the data.  WRONG!  The OS puts this in some buffers.
3321    It returns from the WRITE call with success.  You now do a
3322    close().  At this point there are some interesting possibilities:
3323    a) your data is delivered,  even after waiting 6 weeks for the
3324    other end to respond (BAD choice); b) the system attempts to
3325    deliver your data for,  say,  120 seconds (default 'linger'
3326    time on some BSD systems);  c) you can specify how long you
3327    want to have the system try to deliver the data.  While this
3328    is going on of course, you cannot open a connection to the
3329    device,  as it is still busy with the previous connection.
3330
3331    You really want to treat the 'close' like a 'write' and wait
3332    for a reasonable (read_write_timeout) time for this to happen.
3333    When you do a write 'shutdown',  the TCP/IP connection sending
3334    (write) capability is terminated, and the TCP/IP stack does a
3335    handshake with the other end telling it that no more data will
3336    be sent.  The receiver will get an EOF when it tries to read
3337    more data, and will, in turn, close the connection.  Note that
3338    this must be a 'shutdown' and not a 'close'.  All close does
3339    is closes the process's copy of the file descriptor information.
3340    Shutdown is brutal and will terminate with predjudice the tcp/ip
3341    level communication (thank the Diety).  How do you know that
3342    the receiving end has closed the connectio? You do a read from
3343    the socket until you get an EOF.  Of course,  you should be
3344    reading from the &*()*& socket at all times,  as the printer
3345    will be sending status, error messages, etc. etc.  back to you.
3346    But your filter should be doing this,  right?  Oh... you do
3347    not have a filter... well, you MUST have a filter that does
3348    the reading - this is what the IFHP filter was designed to do,
3349    and in fact goes overboard to solve this problem.  Even when
3350    you say 'status@' it STILL tries to read from the file descriptor
3351    because there might just be stuff coming back.  Sigh...
3352
3353Release LPRng 3.6.5 Sun Aug  1 16:46:31 PDT 1999
3354  The date format in the status messages has been changed so that
3355    you can have a short or long format displayed.  By default, the short
3356    format is displayed (short_status_date option is true).  Note that this
3357    sillyness is partly forced on us by Y2K issues.
3358    New flag option: short_status_date - when set, status time/date displays
3359    only time.
3360    (Sigh... by: Patrick Powell <papowell@lprng.com>)
3361  Remote logging information now contains full date and time and process id.
3362    (Sigh... by: Patrick Powell <papowell@lprng.com>)
3363  Update LPRng HOWTO to specify that filter STDERR output is now merged with
3364    the status messages.  This allows errors reported by the filter to appear
3365    on the lpq status.
3366  You can specify filter arguments as the form xxx 'yy yy' "zz zz" and they
3367    will get passed as a block.
3368    (Suggested by:  Martin Forssen <maf@crt.se>)
3369  The lpstat -a code has been fixed so that it correctly searches for
3370    printer names.
3371    (Reported by: Martin Forssen <maf@crt.se>)
3372  Removed duplicate status information lines in status file.
3373    (Discovered by: Patrick Powell <papowell@lprng.com>)
3374  Added 'send_failure_action' information to status output to allow users
3375    of this very odd feature to figure out what is happening.
3376  Fixed up LPRng to handle a stupid RFC1179 idiocy.  If you have a control
3377    file, then the order of N and data file lines is not defined.  So
3378    you have to handle them in any order.  Also,  you can have the same
3379    data file line with DIFFERENT formats - sigh... this means that you
3380    can print it several times with different formats.
3381  The 'generate_banner' option, which was present in 3.5.1, has been restored.
3382    This is only operational when you have a 'normal' forwarding queue.
3383    It uses the 'ab' (always banner), bp (banner printer), bs (banner
3384    printer program for banner at start), and be (banner program for banner
3385    at end), hl (header or banner last) and the user banner information.
3386  The "cm" (comment) option has escapes processed.  Now you can put ":"
3387    in the comment line by using "\072"
3388    (Wanted by: Johan Claesson <Johan.Claesson@uab.ericsson.se>)
3389
3390Release LPRng 3.6.4 Sat Jul 24 14:29:09 PDT 1999
3391
3392  Cut and Paste-o observed in the configure.in file - LPD_CONF_PATH
3393   should be LPD_PERMS_PATH.
3394   (Reported and patched by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu)
3395  Added: AC_PROG_AWK, AC_SUBST(AWK), to configure.in to find the version
3396   of awk to use.
3397   (A good suggestion by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu)
3398  SAMBA Assistance.
3399   The -U option has been extended to the LPRM program as well as the LPR
3400   program.  This allows facilities such as SAMBA to submit jobs on behalf
3401   of users.  In order to allow SAMBA and these facilities not run as root,
3402   the allow_user_specification=name,name,... configuration option will allow
3403   either root or the named users to forgre... I mean impersonate any user.
3404   The SAMBA printing configuration file will now look like:
3405    [global]
3406        printing = lprng
3407        print command = /usr/local/bin/lpr  -P%p -r %s
3408        # alternative to allow userid to be specified as well
3409        # You will have to add the samba UID to the 'allow_user_setting'
3410        #   option in the /etc/lpd.conf file.
3411        # print command = /usr/local/bin/lpr -U%U -P%p -r %s
3412        lpq command   = /usr/local/bin/lpq  -P%p
3413        # alternative
3414        # print command = /usr/local/bin/lpr -U%U -P%p -r %s
3415        lprm command  = /usr/local/bin/lprm -P%p -U%u %j
3416        printcap name = /etc/printcap
3417        load printers = no
3418    [printers]
3419       comment = All Printers
3420       path = /tmp
3421       browseable = no
3422       printable = yes
3423       guest ok = no
3424       writable = no
3425       create mode = 0700
3426    man pages and HOWTO have been update to reflect these changes.
3427
3428  commmon/linelist.c: Escape() had a malloc() size error.
3429  man/lpd.8 man page editted and fixed up for consistency.
3430   (Found by: Patrick Powell <papowell@lprng.com>)
3431
3432  FreeBSD Support: FreeBSD.ports.sysutils has the files for a Ports Install
3433  RedHat RPM: pkg has the files needed to build a RedHat RPM distribution.
3434
3435
3436Release LPRng 3.6.3 Fri Jul 16 16:01:27 PDT 1999
3437
3438  CONFIGURE CHANGES
3439   Please note that the configure and 'make install' have been modified in
3440   order to deal with different installation locations and configuration setups.
3441   Here are the options to configure that you should be aware of:
3442    --with-cppopts=CPPFLAGS  select compiler preprocessor command line options
3443        **** note: these flags will also be passed to CC, so set your options using
3444        **** this configuration option.
3445    --disable-setuid      disable setuid default
3446        **** note:  use this if you want to install without setuid
3447    --disable-priv_ports   set default lpd.perms to reject connections from non-privileged ports
3448        **** note:  if you disable priv-ports, you MUST install setuid.
3449        ****   Thus, you can have --disable-setuid, --disable-priv_ports, but not both
3450    --disable-force_localhost      disable force_localhost default
3451    --with-lpddir=DIR       where to install the lpd binary.
3452        ***   where you want LPD to be installed.
3453    --with-admindir=DIR     where to install the administrative commands, like
3454                            checkpc, lpc, etc.
3455        ***   where you want the other stuff installed
3456    --with-filterdir=DIR     where to install filter (default ${libdir}/filters)
3457                            checkpc, lpc, etc.
3458        ***  where you want the filters installed
3459    --with-lpd_conf_path=PATH     where to install lpd.conf (default /etc/lpd.conf,/usr/etc/lpd.conf)
3460    --with-lpd_perms_path=PATH     where to install lpd.conf (default /etc/lpd.perms,/usr/etc/lpd.perms)
3461    --with-printcap_path=PATH     where to install printcap (default /etc/printcap,/usr/etc/printcap)
3462    --enable-nls           use Native Language Support
3463    --with-included-gettext use the GNU gettext library included here
3464    --with-catgets          use catgets functions if available
3465
3466  MAKE INSTALL changes
3467     These tie into the changes with configure.  You should be aware of them.
3468     You have been warned.
3469
3470     Note 1: FreeBSD
3471       To put LPD in /usr/libexec/lpd,  admin in /usr/sbin, and other stuff in /usr/bin
3472       configure -with-lpd_conf=/usr/libexec/lpd -with-admindir=/usr/sbin --prefix=bin
3473     Note 2: RedHat Linux
3474       To put LPD in /usr/sbin/lpd,  admin in /usr/sbin, and other stuff in /usr/bin
3475       configure -with-lpd_conf=/usr/libexec/lpd -with-admindir=/usr/sbin --prefix=bin
3476
3477  Minor fix to configure, src/Makefile to link only lpq with terminal library
3478    (Supplied by: Roderich Schupp  <rsch@ExperTeam.de>)
3479  Set spool_dir_perms to 0600 instead of 042600.
3480    (Supplied by: Roderich Schupp  <rsch@ExperTeam.de>)
3481  Typos and More Typos in HOWTO
3482    (Spotted by the Eagle Eye of: Wolfgang Schludi <schludi@syscomp.de>)
3483  Printcap 'oh=' was using wrong entry.
3484    (Reported by: Wolfgang Schludi <schludi@syscomp.de>)
3485  lpd -D= did not tell you what you did wrong.
3486    (Reported by: Niklas Edmundsson <nikke@ing.umu.se>)
3487  Kerberos authentication forwarding was incorrect.
3488    (Fixed by: Mike Whitson <mwhitson@MIT.EDU>)
3489  Printcap includes were not being processed correctly.
3490    (Reported by: Don Badrak <dbadrak@census.gov>)
3491
3492  The spool queue control, status, and unspooler files (control.%P,
3493    status.%P, and unspooler.%P) are now specified by the
3494    queue_status_file and queue_control_file options.  This allows
3495    you to relocate the files to another spool queue, or even use
3496    the file.%D option to have a date appended to the file name.
3497    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
3498  When the lpd logger facility makes a connection to the receiver of the
3499    log information,  it sends a dump of the system status.  The dump
3500    consists of a set of lines, one line per print spool entry.
3501    The end of this dump information is indicated by a single END
3502    line, i.e: END\n.  This enables a database management system to
3503    know that all of the queue information has arrived and can then
3504    undertake to do any consistency checks.
3505    (Need determined by:  Patrick Powell <papowell@lprng.com>)
3506
3507  When a 'lpc reread' is done,  the logger process is killed and restarted.
3508    This forces the logger process to use the new printcap or configuration
3509    information.
3510    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
3511  When an unspooler process is active,  a SIGUSR1 signal is sent to it
3512    to force it to rescan the spool queue.  The SIGUSR1 signal
3513    handler sets the Susr1 flag,  and this flag is checked.  There
3514    is a small window between the time that the flag is checked,
3515    the process decides that no new jobs have been put in the queue,
3516    and the process exits.  This window has now been narrowed down even
3517    more by performing a final check just before the process exits.
3518    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
3519  On a heavily loaded system where a large number of files are being
3520    created and/or destroyed,  the spool queue scanning code would
3521    miss some jobs at the start or end of the queue.  This was due
3522    to the fact that the scandir() routine does not lock the spool
3523    directory,  and it can change as the directory is being read.
3524    In order to reduce this window to the smallest possible size,
3525    the directory is now scanned for files and then the files are
3526    processed.
3527    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
3528
3529  Updated HOWTO to reflect these changes.  Updated MAN pages.
3530
3531Release LPRng 3.6.2 Sat Jun 12 16:44:15 PDT 1999
3532  LPRng-HOWTO corrections.
3533   (Corrections by: Vladimir V Egorin <vladimir@math.uic.edu>)
3534
3535  Used the wrong process exit status variable in common/lpd_jobs.c
3536   (Noted by: Olav Kolbu <olav.kolbu@usit.uio.no>)
3537
3538  Added STATE and LPC command execution tracing to the
3539   logger messages.  This allows a remote system which is
3540   monitoring LPRng operation via the logger interface to
3541   monitor when a job is submitted and printed.
3542
3543  Updated format of message sent by logger.
3544    UPDATE message now has a
3545      hf_image= and (optional) lpc= encoded portion
3546    QUEUE message now has a
3547      queue= and (optional) lpc= encoded portion
3548
3549    The lpc identifies that the udpate was done by LPC operation
3550    rather than by LPD as part of normal operation.
3551
3552  File locking had problems under SunOS 4.1.4.
3553
3554  You can now have single letter printer names.
3555    (Sigh... noted by: Patrick Powell <papowell@lprng.com>)
3556
3557  Accounting information now has options (correctly) quoted:
3558   start '-H...' '-c' '-JThis is a job'
3559   This is consistent with ifhp 3.3.2.
3560
3561Release LPRng 3.6.1 Mon Mar 22 09:42:07 PST 1999
3562
3563  This release is a major rewrite of the LPRng software and uses
3564  dynamic memory allocation and as few static and global variables as possible.
3565  This is intended to simplify the porting of the LPRng software
3566  to a multi-threaded environment. In addition,  substantial
3567  cleanup of much of the code was done.
3568
3569  Due to time constraints,  some functionality that is present in other
3570  test versions was not put into this release.  This includes
3571  setting user information by originating IP address.
3572  The 4.x.x release will have support for the new IPP print protocol,
3573  SNMP MIB,  and a HTTP server interface.
3574
3575  As far as possible, existing functionality has been preserved,
3576  with the following notable exceptions.  These are divergent enough
3577  to cause a new major release number to be used, i.e. - 3.6.x
3578
3579  License
3580
3581    Due to various technical legal reasons,  the License for this
3582  release of LPRng has been changed from the GNU Copyleft to the slightly
3583  different but similar in intent Artistic License.
3584
3585  Load Balance Queues and Class types
3586
3587    Assume: a load balance queue with several printers, say
3588       master -> S1, S2;
3589    You can now set the class types accepted by S1 and S2, and
3590    the Master Queue will check the job types against the class
3591    types before sending the job to the appropriate queue.
3592
3593    What is this all about? If S1 has blue paper you can set the
3594  currently printing class to blue (lpc class blue).
3595
3596    Now do lpr -Pmaster -Cblue and your job will be routed to printers
3597  which currently are printing class 'blue'.  Clearly this can be
3598  extended to other things besides paper.
3599
3600    Note that when you use this option you should set the master
3601  queues ignore_requested_user_priority flag so that the first
3602  letter of the class type is not used as the priority.
3603
3604  *********************************
3605  ******* force_localhost *********  distribution default is ON
3606  *********************************
3607
3608    The Most Frequently Reported Problem with 3.4.X and 3.5.X was the following:
3609
3610      lpr is not sending jobs to my lpd server.  Why?
3611
3612  The reason is that other BSD based spoolers ASSUME that the
3613  lpd server will be running on localhost,  and the clients
3614  (lpr, lpq, etc) will connect to the server.  So the printcap
3615  files are written as:
3616   lp:sd=/usr/spool/whatever
3617     :rm=remoteserver:rp=remoteprinter
3618
3619  Of course, lpr reads this as meaning 'connect to the remoteserver',
3620  and never sends the job to the server running on the localhost.
3621
3622  The 'force_localhost' option will FORCE lpr, lpc, etc to connect to
3623  the localhost UNLESS lpr -Ppr@remoteserver is used, i.e.- a command
3624  line override.  In LPRng 3.5.X, the default value of 'force_localhost'
3625  was OFF.  In LPRng 3.6.X, the default value is ON.
3626
3627  Bounce Queues, lpd_bounce,  and LPR Side Filtering
3628
3629    The lpd_bounce option REPLACES bq=xxx
3630  Example:            ->
3631    pr:lp=pr@xxx         pr:lpd_bounce
3632      :bq=far@server       :lp=far@server
3633
3634    This makes bounce queues consistent with remote print queues.
3635
3636    The entire print job job is passed through the various filters,
3637  and the entire output is now sent as a single file to the next
3638  queue.  The format of this file is set by the bq_output=X option.
3639
3640    This now allows the full use of leaders, trailers,
3641  banner page generation, etc., to be used.
3642
3643  Printcap tc=xxx:tc=yyy handling
3644    printcap includes (tc) are done BEFORE setting the values
3645  in the printcap entry,  and in order.  Thus:
3646
3647     lp:s=X:tc=.t1,.t2:tc=.t3
3648     .t1:s=Y
3649     .t2:z=W
3650     .t3:z=P
3651
3652   would result (for lp) in:
3653     lp:
3654      :s=Y # from .t1
3655      :z=W # from .t2
3656      :z=P # from .t3
3657      :s=X
3658    and a final result of
3659     lp:s=X:z=P
3660
3661   (Requested by and faultless arguments by: the lprng mailing list...)
3662
3663  Permissions List File:
3664    You can now say XXX=<filename and the whitespace separated
3665  contents of the file are used as the options value.
3666
3667  Example:
3668    ACCEPT REMOTEHOST=</usr/local/etc/lpd_hosts
3669   and have /usr/local/etc/lpd_hosts contain:
3670
3671    *.site.com
3672    10.0.0.1/24  pc.*.mystuff.org
3673
3674  LPC Permissions Checking
3675
3676  You can now use:
3677    ACCEPT LPC=hold,remove,topq
3678  If you are doing an LPC operation, then this matches the operation.
3679  This replaces the lpc_user=.... printcap abomination.
3680
3681  For example, to allow user X on the server to do hold operations,
3682  use:
3683
3684    ACCEPT LPC=hold USER=x SERVER
3685
3686  The 'ms', 'sy' and 'ty' serial port configuration options are now
3687  the single option 'stty' which makes more sense and is compatible
3688  with other LPRng software.
3689
3690  The 'rt' and 'send_try' options were accidentally aliased - removed
3691  the 'rt'.
3692
3693  There is now finer control for remote LPQ queries.
3694   force_lpq_status=KEY=hostlist;KEY=hostlist
3695     Specifies a set of hosts and the format for lpq status queries,
3696     overridding the requested format.
3697      KEY = l (long) or s (short)
3698      hostlist = list of IPaddress/Mask or GLOB patterns for hostnames
3699     Example:  force_lpq_status=s=*pc.site.com,10.0.25.0/24;l=sunsystem.site.com
3700   reverse_lpq_format=hostlist
3701     Reverse l and s query formats when a request arrives from these
3702     hosts.
3703   return_short_status=hostlist
3704     Return short_status_length status lines when a request arrives from
3705     these hosts
3706  short_status_length=N
3707     Number of status lines to return when return_short_status matched
3708
3709  LPC added commands
3710    active   - checks for an active server
3711    local (all | printer) - show printcap and configuration information
3712      for a local printer.  Debugging aid.
3713
3714  LPQ added option
3715     -L   - equivalent to -llllll....
3716
3717  CHECKPC
3718      checkpc -V now prints out all sorts of additional information for
3719    debugging and problem solving.
3720      checkpc now checks both for server AND client mode.  No fixing done
3721    for client information, just displays it.
3722      checkpc now checks for missing tc=xxx entries.
3723
3724   LPD_CONF_PATH and PRINTCAP_PATH compilation option
3725     make LPD_CONF_PATH=/usr/local/etc/lpd.conf
3726     make PRINTCAP_PATH=/usr/local/etc/printcap
3727       - changes the /etc/lpd.conf and  /etc/printcap file
3728     default locations
3729
3730  AUTHENTICATION
3731
3732     The entire authentication interface has been redone,  and PGP,
3733  Kerberos 5, and MIT Kerberos 4 Print System compatibility has
3734  been added.  The permissions checking method has been changed as
3735  follows,  with respect to the following keys:
3736    AUTH       match or TRUE  if authenticated transfer done
3737    AUTHTYPE   matches the authentication type
3738    AUTHUSER   client or user's authentication id
3739    AUTHFROM   originating server's authentication id when forwarding job
3740    AUTHSAMEUSER   match if the client id in the request and the
3741               (saved) client ID used to spool a job are identical.
3742    AUTHJOB    match or TRUE if a job was submitted with authentication
3743
3744  Options have been redone to put a bit of consistency into things
3745
3746    auth=xxx                   authentication type for client to server
3747    auth_client_filter=/path   client to server authentication filter
3748    auth_forward=xxx           authentication type for forwarding
3749    auth_forward_id=xxx        authentication id for remote end when forwarding
3750    auth_forward_filter=/path  server to server authentication remote server id
3751    auth_recieve_filter=/path  server filter to recieve authentication
3752    auth_server_id=xxx         client to server - id of server
3753                               receiving server - id for reception
3754                               server to server - id for origination
3755    pgp_path=/path     path to pgp program for auth=pgp
3756    pgp_passphrase=clientkey   file in $(PGPPATH) or $(HOME)/.pgp
3757                               holding client passphrase
3758    pgp_server_key=~daemon/.pgp/serverkey   file holding LPD server passphrase
3759
3760  SOLARIS Package Support
3761    Start of generating binary distributions.
3762    (Contributed by: Martin Forssen <maf@crt.se>)
3763
3764  LPD lock file:  now defaults to /var/run/lpd
3765    (Pointed out by: Martin Forssen <maf@crt.se>)
3766
3767  %D expansion,  create_files flag
3768    If you have %D in a printcap value,  it gets expanded to the
3769  current date in YYYY-MM-DD format.  If you have the create_files flag
3770  set,  then the files that normally get trimmed (max size specified)
3771  are created.  This allow you to do:
3772     lf=log-%D
3773  Your log files now will have the pathname sd.../log-YYYY-MM-DD
3774  and you can now get rolling log files on a daily basis.
3775  The files that have this done are the log file, status file,
3776  and accounting file.
3777
3778  PCLBANNER and PSBANNER - new banner printing programs using PERL produces
3779   pcl or PostScript banner page.
3780
3781   lp:bp=/usr/local/.../pclbanner
3782     :of=....
3783     :if=....
3784   OR
3785
3786   lp:bp=/usr/local/.../psbanner
3787     :of=....
3788     :if=....
3789
3790
3791  Bug fixes:
3792    Gadzillions.  Many.  Some were not bugs but simply inconsistencies with
3793  documentation.  Sometimes documentation changed, sometimes the code.
3794
3795  Default Server Print Queue:
3796
3797   The default_printer_when_unknown configuration option
3798   allows you to specify a print queue that the server will use when
3799   it cannot find one in the printcap.  This print queue should have
3800   the format:
3801
3802   /etc/lpd.conf:
3803    default_printer_when_unknown=fallback
3804
3805   /etc/printcap:
3806   fallback:server
3807    :sd=/usr/spool/lpd/%P
3808    :router=/..../router_for_misdirected_jobs
3809
3810    The router should output the correct destination (see router documentation
3811    in LPRng-HOWTO),  and exit with 0, or exit with JREMOVE to cause the job
3812    to be dropped in the bit bucket.
3813
3814Release LPRng 3.5.4 Mon Nov  9 10:07:42 PST 1998
3815  Bug fixes:
3816  Bad link to site in LPRng.smgl documentation.
3817   (Reported by: Anthony Thyssen <anthony@cit.gu.edu.au>)
3818  LPQ status was missing a space separator when reporting
3819    subserver name list.
3820   (Spotted by the Eagle Eyes of: John Callaghan <callagh4@pilot.msu.edu>)
3821  The xt flag has been expurgated,  totally.  As was documented.
3822   (Spotted by: James P. Dugal <jpd@usl.edu>)
3823  LPR_bsd option added so that -m does BSD mail option.
3824   (Requested by various folks)
3825
3826  Testers and bug fixers:
3827   (Compilation: Bernie Kirby <bernie@ecr.mu.oz.au>)
3828
3829
3830
3831
3832Release LPRng 3.5.3 Mon Nov  9 10:07:42 PST 1998
3833  Documentation Error:
3834    LPRng-HOWTO, Section 8, indicated that the lpd.conf file
3835  could be obtained using a filter.  This is not correct.
3836  (Noticed by: David Stenglein <david.stenglein@citicorp.com>)
3837
3838  Major Modification:
3839    removed the 'xu' (per spool queue permission file) after trying
3840  to make the semantics work.  Now we have a single permission file
3841  for all printers
3842
3843  Major Modification - Load Balance Queues:
3844    Some users reported very slow operation of the load balance
3845    queues.  This was verified,  and extensive modifications were
3846    made to the functionality.
3847
3848    CHANGE:
3849        The subserver queues are only scanned at startup
3850      and when there is an explicit indication that a new
3851      job has been put into or removed from the queue
3852      (SIGUSR2 received)
3853
3854  Major Modification - LPD Does Not Ignore LPR, LPC Requests
3855
3856      Some users with either large numbers of spool queues or
3857    spool queues with large numbers of jobs noticed VERY slow
3858    LPD response.
3859      This has been improved considerably.
3860
3861    CHANGE:
3862      LPD server would run through the Spool queues, looking for
3863    trash to be removed or jobs to be started.  This polling is
3864    necessary due to the possibility of a race condition between
3865    the time that a job is put into the queue and the time that
3866    the unspooler checks the queue for entries.
3867      The operation has been modified so that only a SINGLE PROCESS
3868    runs down through the spool queues.  When it finds work to do,
3869    it informs the LPD server,  which now will start ANOTHER process
3870    to check other queues for work.  Note that while these processes
3871    are working their little hearts out,  chewing up swap space
3872    and reading directory entries like mad,  the LPD server can
3873    accept requests for LPQ, etc.
3874
3875  Major Modification - LPR speedup:
3876    The LPD server now accepts jobs for spooling WITHOUT extensively
3877    checking the spool queue.  This eliminates problems with printing
3878    to queues with a large number of entries.
3879
3880  Speed Improvement:
3881    A bit of time analysis showed that LPRng was spending a large
3882    amount of time during queue scanning in the fcmp() routine.
3883    This has been rewritten and is now a strcmp().
3884
3885    During queue scan, Get_controlfile() generates a 'cmp_str' value
3886    that represents the information needed to do sorting.  This is
3887    is then used during queue sorting as the comparison value.
3888
3889    The 'struct cmp_struct' in the include/sortorder.h is used to
3890    make sure that sufficiently long string buffers are allocated.
3891    The make_cmp_str() in common/sortorder.c can be replaced with
3892    a users version if they desire.
3893
3894  Bug Fix:
3895  safestrncpy, mystrncpy, safestrncat, mystrncat now used for string
3896   copies where there is doubt on the buffer/string length.  Note that
3897   these versions will always make sure the buffer is terminated with
3898   a 0 value.
3899
3900  lpr -U xx is supposed only to work for ROOT. Check for root perms
3901    was not done correctly.
3902    (Patch by: Paul Szabo <psz@maths.usyd.edu.au>)
3903  permissions checking:  the C=value1,value2 permissions checking
3904    option wants a C (control file) line starting with character C
3905    and glob matching the indicated value1, value2, etc.  For example,
3906    N=patrick*,powell* should match against line Npatrickwashere or
3907    Npowellwasthere.  The check was done incorrectly.
3908    (Patch by: Paul Szabo <psz@maths.usyd.edu.au>)
3909  LPD/lpd_rcvjob.c - removed limits on lengths of class and host names
3910  When using bounce queues and the generate_banner to cause a banner to
3911    be added to a job,  the 'ab' (always banner) and the lpr -h (no header)
3912    flags now are used in the decision for banner generation.
3913    (Noticed by: Charles Karney <karney@pppl.gov>)
3914  Filters were not being passed -Knnn option.
3915    (Noticed by: Charles Karney <karney@pppl.gov>)
3916  Permissions:  SERVER keyword was not used for X permissions.
3917    (Fix by: Patrick Powell <papowell@lprng.com>)
3918  File Permissions:  spool_file_perms was being ignored due to the
3919    umask() not being (un)set before creating a file.
3920    (Discovered by: Albert Fluegel <albert.fluegel@hl.siemens.de)
3921  ConnectTimeout now times out on connect() calls.
3922    (Reminded by: Heinz-Ado Arnolds <arnolds@ifns.de>)
3923  Accounting filter:  when the filter returns 'JHOLD' the job
3924    will be held (as documented).
3925    (Patch by: Rainer Schoepf <schoepf@uni-mainz.de>)
3926   LPRM incorrectly gives the "clean" usage instead of "lprm" usage.
3927    (Fix by:  Edan Idzerda <edan@mtu.edu>)
3928   The 'xt' and 'check_for_nonprintable' flags were in conflict.  Removed
3929    the 'xt' flag.
3930    (Reported by: "Dugal James P." <jpd@usl.edu>)
3931   The LPD/lpd_remove.c code did not remove jobs correctly when a
3932    :destination=... entry was present
3933    (Patch by: john@cs.wisc.edu)
3934   Log files not being truncated.  Well, they are now.
3935    (Fix by: Patrick Powell <papowell@lprng.com>)
3936   LPR not printing multiple copies (-K option)
3937    (Patch by: Keith Richardson <keithr@ms.com>)
3938   LPD did not check spool queue just before exiting from printing loop.
3939    This opened a BIG race window on systems with lots of jobs in the
3940    spool queue.
3941    (Fix by: Patrick Powell <papowell@lprng.com>)
3942   Expand_command did not check for Do_dollar() returning 0, indicating
3943    a string overflow condition, which it then dereferenced and core dumped.
3944    (Reported by:  (Walter Misar) <misar@rbg.informatik.tu-darmstadt.de>)
3945   Control file filters were not being invoked correctly.
3946    (Reported by: Tony Graham <Tony.Graham@uni-c.dk>)
3947   Memory trashing being done by different behaviour of strncat() on some
3948    systems.  Replaced by mystrncat() and took the performance hit in return
3949    for reproducible behaviour and non-trashing copies.  Sigh.
3950    (Fix by: Patrick Powell <papowell@lprng.com>)
3951   strncpy() and strcpy() does not handle overlapping strings correctly, or
3952    at least that is what the man page says.  Replaced several of these
3953    calls by memcopy() and friends.
3954    (Fix by: Patrick Powell <papowell@lprng.com>)
3955
3956Release LPRng 3.5.2 Fri May  1 14:39:55 PDT 1998
3957  Bug Fix:
3958   lpr -k did not pass the correct length (0) to the
3959   remote system.
3960    (Reported and patch by:  Wolfgang Scherer <ws@ecosys.de>)
3961   common/pr_support/ checks Do_lock() for <= instead of < for
3962    failure condition.
3963    (Reported by:  Wolfgang Scherer <ws@ecosys.de>)
3964   common/proctitle.c had a strdup() call - not supported
3965    under ULTRIX.
3966    (Reported by:  "Todd C. Miller" <Todd.Miller@cs.colorado.edu>)
3967   force_localhost was being tested BEFORE it was set in the printcap
3968    entry.  Now is checked AFTER the printcap entry is processed.
3969    (Reported by: Petri Kaukasoina <kaukasoi@elektroni.ee.tut.fi>)
3970   LPD returns 'o connect permissions' instead of 'no connect ...'
3971    (Noted by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
3972   LPD records filter name in error message correctly.
3973   LPQ now reports full class name in status message if
3974     'class_in_status' flag set in printcap.
3975     (Requested by: Philip J. Nesser II <pjnesser@nesser.com>)
3976   common/sendlpc.c - missing Lp_device = 0
3977     (Reported by: "Dugal James P." <jpd@usl.edu>)
3978   LPD reported the wrong host name in 'no permission' messages.
3979     (Noticed by: Patrick Powell)
3980
3981Release LPRng 3.5.1 Fri May  1 14:39:55 PDT 1998
3982  Baseline Stable Release
3983
3984Release LPRng 3.4.12 Fri May  1 14:39:55 PDT 1998
3985  Legacy support modification:
3986    control file now has printer information in:
3987       controlfile
3988       Ninfo
3989       Uinfo
3990    order.  Some legacy printer spoolers require this order.
3991   (Reported by: Don Badrak <dbadrak@geo.census.gov>)
3992
3993  Minor cleanups of:
3994    Get_printer() calls - some silly comments and orders
3995    common/fileopen.c/Init_tempfile() - clarified the
3996      use of the various directories and defaults.
3997    Force_localhost:  now done in Get_printer(), where it should
3998      have been done in the first place;  LPQ  and LPRM
3999      now send requests to localhost unless explicitly overriden
4000    Force_fqdn will now brutally assume that the domain of the
4001      sender is the one reported by the FQDN of the originator
4002      of the connection.
4003
4004Release LPRng 3.4.11 Thu Apr 30 11:46:25 PDT 1998
4005
4006  Functionality Change:
4007   JABORT and stop_on_abort default value changed
4008   JNOPRINT filter exit status stops printing
4009   JFAILNORETRY filter exit status stops retries
4010
4011  In previous versions,  when a filter exited with unknown or
4012  JABORT status,  the default action was halt processing of
4013  PENDING jobs.  When a new job was sent to the queue,
4014  or a lpc start was performed,  processing was restarted started.
4015  Under heavy load conditions,  the effect of the JABORT was
4016  nullified by the arrival of new jobs.
4017
4018  The LPRng behaviour has now been modified to handle JABORT
4019  conditions in a predictable manner, using the 'stop_on_abort'
4020  flag.
4021
4022  1. The default for 'stop_on_abort' is now FALSE.
4023     This means by default that the JABORT status will simply be
4024     treated as a 'do not retry this job' error status.
4025     If the 'save_on_error' flag is FALSE (default), the job
4026     will be removed from the queue.
4027
4028  2. If 'stop_on_abort' is set to TRUE,  then when a filter
4029     exits with a JABORT on unknown status,  further processing
4030     will stop, and NO pending jobs will be printed.  If the
4031     'save_on_error' flag is FALSE, the job will be removed from
4032     the queue.
4033
4034  3. If 'stop_on_abort' is set to TRUE, the abort condition is
4035     sticky, i.e. - it will persist until
4036     action is taken to clear it.  Any of the LPC commands which
4037     cause printing to be restarted will clear it:
4038       LPC start, up, kill, topq, release, or redo
4039
4040  4. LPQ and LPC will report if there is an aborted job condition.
4041
4042  Note that for most users, the default action is now the desired
4043  action, i.e. - to continue processing jobs.
4044
4045  However,  certain administrators will most likely need to assume
4046  that when a filter exits with JABORT that further printing on this
4047  queue will fail.  The sites should set 'stop_on_abort' to TRUE.
4048
4049  JNOPRINT:
4050
4051  If a filter exits with JNOPRINT,  then printing will be stopped;
4052  this will have the same effect as an LPC stop command.  The job
4053  will NOT be treated as an error job and will remain pending in the
4054  print queue.
4055
4056  This allows filters to detect conditions that would normally cause
4057  printing to fail before a job is started,  and halt printing under
4058  these conditions.
4059
4060  JFAILNORETRY:
4061
4062  Under various arcane conditions,  it is possible for a filter to
4063  determine that a job has failed,  and should not be retried.  Most
4064  filters would return a 'JREMOVE' error code,  but for various arcane
4065  reasons (lots of Arcania here, folks), the 'save_on_error' flag
4066  might be set,  and the adminstrator would like to have the job
4067  marked as erroneous,  but NOT removed.
4068
4069  If the filter exits with JFAILNORETRY,  then the job is treated
4070  as though it had an error, but no retries are performed.
4071
4072  Extended Functionality:  'mail_from' option
4073    Allows specification of the 'From:' user.  If not specified
4074    default is to use the printer name.
4075   (Patch By: Rainer Schoepf <schoepf@uni-mainz.de>)
4076  Portability Extension:
4077   LPD_CONF_PATH compilation option
4078   The location of the LPRng configuration file is specified
4079   by the config_path value in the src/common/vars.c file.
4080   The compilation option -DLPD_CONF_PATH=path can be
4081   used to override the default locations.
4082   Example:  make LPD_CONF_PATH=/usr/local/etc/lpd.conf all
4083  Nit Fix:  spelling errors corrected.
4084   (Reported by: Don Badrak <dbadrak@geo.census.gov>)
4085  Incredible 9 Gigabyte Partition Fix:
4086   (Reported by: Don Badrak <dbadrak@gesg34.geo.census.gov>)
4087   Apparently the common/freespace/plp_fs_free_bytes cannot handle
4088   a >4 gigabyte partition.  The fix was to cast values to a
4089   double - this should be sufficient until we get 10**38 byte file
4090   systems. :-)
4091  Bug Fixes:
4092   LPD usage() had (erroneous) -i option.
4093     (Reported by: wcolburn@nmt.edu (William Colburn (aka Schlake)))
4094   get_max_servers did not get max servers.
4095     (Patch by: Don Badrak <dbadrak@gesg34.geo.census.gov>)
4096
4097
4098Release LPRng 3.4.10 Thu Apr 23 18:01:37 PDT 1998
4099  Added Functionality:
4100   sync_lpr flag- this suppresses the closing of the lpr to lpd
4101   network connection until the LPR job is completely processed
4102   by the LPD server.  This can,  under various arcane and odd
4103   situations,  result in the lpr processes 'hanging' until the
4104   LPD server queries DNS servers, looks up permissions, etc etc.
4105   However,  if users are trying to figure out why LPR has returned
4106   and their job is not in the queue,  or you have some desire to
4107   write shell scripts that create jobs and then remove them
4108   in order to see 'just how fast LPRng is',  this flag will SLOW DOWN
4109   the operation by making it synchronous.  Any little thing
4110   to make folks happy... :-)
4111 Modified Functionality:
4112   The 'force_localhost' flag has now been modified to (literally)
4113   force a connection to one of the 'localhost' addresses returned
4114   by a DNS lookup.  This should have no effect on 'normal' users,
4115   but might have the result that the status returned by LPQ
4116   will now differ a little.  For example, if you have a printcap
4117    pr:lp=pr@host2:force_localhost
4118   you will discover that lpq -Ppr will now print:
4119    Printer: pr@localhost
4120     ... status for localhost queue
4121    Printer: pr@host2
4122     ... status for host2 queue
4123   This is correct and accurate reporting, compared to the previous
4124   lpq format.
4125    (Brought to my attention by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
4126
4127 Bug Fixes:
4128 Job_printable_status() did not report active jobs, so lpq and lpc job count
4129   was off by one.
4130   (Reported by:  Al Marquardt <almar@uiuc.edu>)
4131
4132Release LPRng 3.4.9 Mon Apr 20 12:42:55 PDT 1998
4133  Enhanced Functionality:
4134   For those folks who want to 'masquerade' their servers,
4135   the 'report_server_as=hostname' will now report your printer@server
4136   as 'pr@hostname'.
4137   (Requested by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
4138  EXTA/EXTB:
4139    ifdef'd for folks with REALLY vintage systems...
4140    (Requested by: David Coelho <drc@ppt.com>)
4141  Added debugging code to determine when servers started.
4142  LPD now clears job 'move' indications so that a job can
4143    be saved (save_when_done) and then reprinted with
4144    out being moved to the destination again.
4145  lp -s (Silent) now does not print job id information.
4146    (Noticed by: David Coelho <drc@ppt.com>)
4147  Jobs which do not have print permissions now get removed.
4148    (Reported by: Al Marquardt <almar@uiuc.edu>)
4149  lpq -tN -c now will not core dump.
4150
4151Release LPRng 3.4.8 Sat Apr 18 15:23:22 PDT 1998
4152  Portability Fix:  AIX 4.1.5 has definition conflicts when
4153  doing #include a.out.h.
4154   (Reported and Fix by: Niklas Edmundsson <nikke@ing.umu.se>)
4155  Also, Solaris4.1.4 has conflicts with tgetent() definition.
4156   (Reported by: wcolburn@nmt.edu (William Colburn (aka Schlake)))
4157  Y2K checked - ISO conformant date format is used in log and other
4158   messages.
4159  :force_fqdn_hostname flag causes FQDN host name rather than
4160   short hostname to be put into control file.
4161
4162  Bug Fixes:
4163  Accounting at end was failing do to closing output device
4164   too early in the algorithm.  Device now closed AFTER last
4165   accounting script is called.
4166   (Reported by: Niklas Edmundsson <nikke@ing.umu.se>)
4167  Time_t strikes again.  I just discovered that there were some
4168   places where I was using long instead of time_t for time values.
4169   This has been fixed.  However, there is also now the problem
4170   of snprintf( "%d", time((void*)0)) being used for output and
4171   t = atoi("xxx") for input of time values.  Sigh... will fix
4172   this later.
4173  "lpc lprm pr all" operation now works correctly
4174   (Reported by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
4175
4176Release LPRng 3.4.7 Wed Apr 15 08:40:25 PDT 1998
4177  Bug Fix:
4178    Stupid system implementor used snprintf() instead of
4179    plp_snprintf,  causing headaches for unsuspecting
4180    folks on systems that did not have snprintf().
4181    Better fix is to insist that systems have snprintf() :-)
4182    (Reported by: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>)
4183  Enhancements:
4184    The code for doing 'polling' of spool queues had a very high
4185    overhead in terms of process creation.  This code has been
4186    modified to have a single process run down the queues and
4187    check for work.  There is a bit of overhead,  but much less than
4188    the overhead in creating a large number of processes.
4189  Bug Fix:
4190    when generating banners using :generate_banner,  it did not
4191    work.  System developer forgot to include banner... :-)
4192    (Reported by: Cecil R. Whitaker <cwhitak@nswc.navy.mil>)
4193
4194    Jobs that did not get permission to print and were flagged
4195    with JREMOVE did not get removed.
4196     (Reported by: Al Marquardt <almar@uiuc.edu>)
4197
4198    When putting in a new 'From this host' line in a control file,
4199    did not remove the old one.  Also 'Q' entry as well.
4200     (Reported by: Al Marquardt <almar@uiuc.edu>)
4201
4202    Multi-homed hosts that do not recognize interfaces need
4203    special coddling when trying to connect to them.  Link_support.c
4204    gets yet another special case for connections.
4205     (Patches by: Giray Pultar <pultar@pprd.abbott.com>)
4206
4207    listen(backlog=64) - used to be 10, which caused connections
4208    to be dropped under heavy loads.
4209
4210    checkpc was adding a / to end of file names.
4211    (Noticed and fixed by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
4212
4213Release LPRng 3.4.6 Tue Mar 31 18:10:59 PST 1998
4214  Bug Fix or Nit Pick:
4215    When sending a job AND the :qq or :use_queuename flag
4216    is set AND the job arrives without a Q entry THEN
4217    the name of the queue it was spooled to is used.
4218    (Noticed by:Cortney Sampson <sampson@physics.utoronto.ca>)
4219
4220    Missing initialization in src/common/permissions.c
4221    Discoverer got the 'Gold Star with Flashy Sequins' bug hunting
4222    award.
4223    (Found by and Award to: Duncan McEwan <duncan@MCS.VUW.AC.NZ>)
4224
4225  Lpr -Z options now accumulate, rather than overwrite, if the
4226    Allow_duplicate_options flag is not set.  This makes life
4227    easier for the user when specifying multiple -Z options.
4228
4229  Allowed a LPR to LPD job transfer ending in a 'blank line' to be accepted.
4230    This is generated by some oddball LPR programs.
4231    (Reported by:  Patrick Hildenbrand <patrick@emea.ers.ibm.com>)
4232
4233Release LPRng 3.4.5 Sun Mar 29 18:37:09 PST 1998
4234  LPF:
4235    Cleaned up some minor nits with options.
4236    (Noticed by: Patrick Powell <papowell@lprng.com>)
4237
4238  LPRng-HOWTO:
4239    A huge number of corrections from:
4240    (Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu)
4241
4242  Enhancements: max_log_file_size, min_log_file_size
4243
4244    Sometimes it is desireable to run a log file in order to try
4245    to find problems.  But if you do not truncate the log file, it
4246    can grow to enormous lengths.  The max_log_file_size#nnn
4247    (size in Kbytes, default = 0 or unlimited size)
4248    printcap/configuration variable will
4249    cause the LPD server to check for the size of the log file
4250    on opening it and if larger than max_log_file_size K bytes
4251    truncate it to min_log_file_size
4252    (default 0 specifies max_log_file_size/4) Kbytes.  It preserves
4253    the last part of the file.
4254
4255    Note that when the truncation operation occurs and there is
4256    heavy logging activity from multiple processes that the log
4257    file may get jumbled.  Recommended value of max_log_file_size
4258    should be pretty large in order to make the truncation activity
4259    minimal - 10240 (10 Megabytes) is what I have been using with
4260    pretty reasonable success.
4261
4262  Enhancements:
4263    The time of a job error is now logged in the hold file.
4264    This allows the time of the error to be determined.
4265
4266  Bug Fixes:
4267    Modified reporting of subserver processes that have been
4268    killed off or have core dumped.  This solved a problem with
4269    a system that would generate a SIGTERM signal.
4270
4271    UTILS/accounting.pl fixed up. Also, psfilter and hpif now
4272    working correctly with the filter.
4273    (Patches, suggestions, and advice by:
4274      Gordon Haverland <haverlan@agric.gov.ab.ca>)
4275
4276    The LPD/lpd_jobs code for retrying has been redone to make it
4277    more robust when printing fails.  The LPRng system will now
4278    agressively retry sending jobs.  Needless to say,  there are
4279    magic debugging flags to turn this off for testing purposes.
4280      (Noticed by:  Jesse Off <joff@cnde.iastate.edu>)
4281
4282    The bogus 'server starting' and 'server done' messages have
4283    been removed from the status file.
4284
4285    Now send a trace/logging message before the job is finally put
4286    in the spool queue.  Removes disturbing occurrence of 'success'
4287    messages being sent for a job that has not yet arrived according
4288    to log messages.
4289
4290    More informative error messages and logging messages added at
4291    appropriate points.
4292
4293Release LPRng 3.4.4
4294
4295  Bug Fixes:
4296
4297  termclear.c - tgetent() misdefined.
4298     Also,  configure now checks for Solaris systems and tries to
4299     handle their brain damaged colliding definitions in term.h, curses.h,
4300     terminfo.h and termcap.h files.
4301
4302  ignore_name_format_errors is now documented.  Actually, it is really
4303    fix_bad_jobs.
4304    (Pointed out by:  Bruce S. Marshall  bmarsh@wwnet.com)
4305
4306  Fixed a minor but annoying problem with hold files and very fast
4307    system.  Better solution would be to have an indexed database,
4308    but it is almost more trouble than it is worth to implement.
4309
4310  Fixed a problem with 'Destination' being a pointer to dynamically
4311    allocated memory,  which would get deallocated by Set_job_status()
4312    calling Get_job_status().
4313
4314  Fixed a problem with control file names not being formatted correctly.
4315    (Reported by:  John Perkins <john@cs.wisc.edu>)
4316
4317  Fixed up LPRng-HOWTO,  created new version.
4318
4319  snprintf() used instead of plp_snprintf()
4320    (Reported by: lots and lots of folks, including
4321        "Reinhard Zierke" <zierke@informatik.uni-hamburg.de>)
4322
4323Release LPRng 3.4.3
4324  Bug Fixes:
4325    Serial Port Configuration.  Do_stty not called to set up serial
4326      ports.  Reported by LOTs and LOTs of folks.
4327    Fixed the GetMaxServers() code to really find the maximum number
4328      of processes.
4329      (Fixes by: Don Badrak <dbadrak@gesg34.geo.census.gov>)
4330    Memory Leaks From Hell
4331      Found them.  Found the problem.  Decided that fixing the problem
4332      was not worth it.  Found an alternative method to the current one
4333      for starting processes that AVOIDS the memory leaks.
4334
4335      In the new version of code,  the LPD main() process will start
4336      subprocesses only when it needs to.  Periodically,  it will run
4337      down the list of print spools,  starting (forking) a process.
4338
4339      In the previous version,  it would call the Setup_printer() code
4340      which would then in turn all the routines which would allocate
4341      (malloc) memory that would never get deleted.  If there were jobs
4342      to be printed,  the main() process would then fork and create a
4343      server process.
4344
4345      In the current version,  the main() process will create a pipe(),
4346      and then fork the child process,  which will call the *&I*(&()
4347      Setup_printer() code,  and then checks for work.  If there is NO
4348      work,  it exits (exit code 0), and as a side effect, the pipe is closed.
4349      The parent process will read 0 bytes, and say, 'Ah, No work'.  As
4350      a side effect,  it also gets the status.  If there is work,  the
4351      daughter will write a string to the pipe and THEN close the pipe.
4352      The parent will read the data,  and say 'Ah, work to be done'.
4353
4354      There are several elegant little side effects of this method.  Firstly,
4355      the main() process will block until the child decides if there is work
4356      to be done.  In effect,  this will allows the child to proceed ASAP
4357      to the decision point.  Secondly, the parent process has a VERY small
4358      amount of memory allocated,  and does not grow at all large.  This
4359      helps,  as the children,  when created, have very small memory needs
4360      and process creation is sped up tremendously.
4361
4362      I am surprised to find just how much better this is...  I probably
4363      should have done this before,  but I was trying to avoid process creation
4364      problems, and ended up with large memory footprints.
4365
4366      (Proddings, pokings,  help, suggestions, and lots of tracking down by:
4367          Al Marquardt <almar@uiuc.edu> - who found the cause of the memory
4368            leak
4369          Branson Matheson <Branson.Matheson@FergInc.com> - who came up with
4370            another memory leak
4371
4372         If you ever want to debug memory leaks,  please look at the
4373         malloc debugging package by Gary Watson.
4374              http://www.letters.com/dmalloc/
4375       )
4376
4377     lpc move
4378       In the previous versions,  lpc move only worked if the spool
4379       queue was active.  This meant that you could not stop a spool queue and then
4380       move the jobs to a different queue.  Now you can.  However, if you
4381       redirect a queue, then it must be active for jobs to be redirected.
4382       C'est la Vie.
4383       (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
4384
4385     Some logging numbers were not being reported correctly.  They now should be.
4386       (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
4387
4388     The QQ option was not working correctly due to a coding typo.
4389       (Reported by:  Gary Cender <gcender@eng.dowjones.com>, and others)
4390
4391     LPR was doing translate_format, which was wrong.
4392       (Reported by:  Chad Mynhier <mynhier@cs.utk.edu>)
4393
4394     LPR does not use '-' as a flag to read from STDIN.  Documentation changed
4395       to reflect this;  easier than fixing LPRng... :-)
4396       (Reported by: "James P. Dugal" <jpd@usl.edu>)
4397
4398     LPR now allows LOOOONG options to -Z.
4399       (Requested by:  George Lindholm <lindholm@cheshire.ucs.ubc.ca>)
4400
4401     Race condition with job completion and testing for completion once
4402       again explored.  Now err on the side of 'slow but correct' rather than
4403       'fast but sloppy'.  Only happens on FAST servers,  and the alternative
4404       to run LPRng on slow servers was not taken well :-).
4405       (Reported by: Gary Cender <gcender@eng.dowjones.com>)
4406
4407     OS/2 sends very odd control file format - now should parse this format correctly.
4408       (Reported by:   "Patrick Hildenbrand"<patrick@emea.ers.ibm.com>)
4409
4410Release LPRng 3.4.2
4411  Bug Fixes:
4412    Connect_timeout was not used uniformly or documented accurately.
4413    (Fixes by: Heinz-Ado Arnolds <arnolds@ifns.de>)
4414    configure was too agressive in checking for -lresolv.  Now includes
4415     -lresolv only if gethostbyname2 is not found.
4416     (Problem reported by: Uri Blumenthal <uri@ibm.net>)
4417    It was observed that under heavy load conditions that some files
4418      were getting printed twice.  This was due to a race condition.
4419      The race condition has been eliminated by introducing another
4420      field into the job control information specifying the subserver
4421      process id.
4422
4423Release LPRng 3.4.1
4424  New Baseline Release - Stable version
4425
4426  Enhancements:
4427   The configure script now supports setting the installation directories
4428    configure --with-lpddir=DIR --with-admindir=DIR
4429      - sets the install directory for lpd and lpc/checkpc respectively.
4430   (Patches by:  Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
4431   Added a 'retry_etimedout' flag as well to handle connections to devices
4432    that have a very long connection time due to slow network connections
4433    over dialup devices.
4434   The lpq status now will show 'stalled' when 'stalled_time' is non-zero
4435    and the job is active for more than stalled_time seconds.
4436    (Suggested by: lots of folks)
4437   The check_idle=program facility can now be used to check that a printer
4438    is idle before processing jobs.  This is useful when you have multiple
4439    server queues. For example:
4440     lp:sv=lp1,lp2:...
4441     lp1:check_idle=/prog:...
4442     lp2:check_idle=/prog:...
4443    When the lp server starts up,  it will check the lp1 and lp2 queues,
4444     and will only send jobs to the one whose check_idle program reports
4445     an idle condition.
4446
4447  Bug Fixes:
4448    Updated LPRng-HOWTO.
4449    Fixed missing permission check checkpc.
4450    Also (correctly) implemented ${option} expansion in filter commands.
4451     This now gets expanded to the printcap option value,  as documented.
4452    (Made by: Patrick Powell <papowell@lprng.com>
4453
4454Release LPRng 3-3-7
4455
4456 Ports:
4457   Solaris 2.6.  Also update README.install for new startup/shutdown script
4458
4459 New functionality:
4460
4461   reverse_lpq_format : reverse returned lpq status format when from
4462      specified host.
4463
4464    There is a defect in some System V support for RFC1179 printers.
4465    The lpq facility will send a 'SHORT' status request when a 'LONG'
4466    is desired,  and vice versa.  This results in the wrong status format
4467    being returned.
4468
4469    The reverse_lpq_format=(globhost|ip/mask)+ option allows you to specify
4470    that when a request is received from a host whose name or address matches
4471    an entry in the list,  then SHORT/LONG format requests will be reversed.
4472    When the LPD is acting as an intermediate host,  the reversed request
4473    will be sent to the next destination on the list.  For example:
4474      reverse_lpq_format=*.eng.com,130.29.0.0/16
4475    will select hosts whose FQDN ends in eng.com or in subnet 130.29
4476    to have reversed lpq formats.
4477
4478   return_short_status : return limited length status information
4479   short_status_length : number of lines to return
4480
4481    Some users have expressed a desire to have the LPD server return
4482    short (i.e. - limited length) status to the requestor.
4483    The return_short_status=(globhost|ip/mask)+ option allows you to specify
4484    that when a request is received from a host whose name or address matches
4485    an entry in the list,  then only short_status_length (default 3)
4486    Status: and Printer_status: lines returned.
4487
4488   lpc redo command:
4489    this forces a job to be totally reprinted, if it has been held
4490    in the spool queue.  This command has been added in order to allow
4491    the reprinting of jobs that have been printed and held in the spool
4492    queue, i.e. - the save_when_done printcap flag is set.
4493
4494   routing filter 'priority N' output:
4495    the routing filter can set the destination, copies, and now the
4496    priority of jobs.  If the routing filter output is:
4497      dest t1
4498      CB
4499      priority B
4500      copies 2
4501      end
4502    then two copies of the job will be routed to the destination
4503    with priority B, and the C line in the control file will be
4504    set to CB.
4505
4506   safe_chars=nnn  configuration file option.
4507    By default, LPRng detects and optionally eliminates suspicious characters
4508    from the control file;  the fix_bad_job option will enable removal.
4509    The safe_chars=nnn specifies that in addition to the normal safe
4510    characters, the indicated ones can be used as well. For example,
4511    save_chars=#" will allow # and " to be used in the control file.
4512
4513Release LPRng 3-3-6
4514
4515 New functionality:
4516
4517  Timeouts: send_job_rw_timeout, send_query_rw_timeout replace send_timeout
4518
4519    The printcap send_job_rw_timeout and send_query_rw_status options
4520    now set timeouts on read/write operations when printing or sending
4521    jobs to a remote host or doing a status or query operation respectively.
4522    If the value is zero, there is no timeout on the operation.
4523    These timeout values and the associated read/write operations
4524    solve a problem when LPQ or LPR tries to attach to a printer or system
4525    which accepts a connection but then does not reply to the request
4526    in a reasonable amount of time.  Note that the send_job_rw_timeout
4527    should be quite large (6000 or 100 minutes) in order to accommodate
4528    transient problems like paper outages on a printer.
4529    (Suggested by: Brad Rogers <brad@ast.lmco.com> and
4530        Alek Komarnitsky <alek@ast.lmco.com>)
4531
4532  lpc active, lpd, and reread commands
4533    The lpc active command will try to open a connection to the remote
4534    server.  This allows non-LPRng remote servers to be polled to see
4535    if they are active.
4536
4537    All of the active, lpd, and rereads now take a printer[@host] argument,
4538    allowing the specified server for the printer to be queried.
4539    (Deficiency noted by:  James P. Dugal <jpd@usl.edu>)
4540
4541  stop_on_abort printcap flag (default TRUE)
4542    If a filter aborts and this flag is TRUE then all further processing
4543    of the queue stops until restarted by some other action and the job
4544    will not be removed from the queue.
4545
4546  max_connect_interval (default 60)
4547    maximum interval between attempts to send a job to a remote site.
4548
4549  user_lpc configuration option, SERVICE=U, and lpc command
4550    There was a request to allow a selected set of lpc commands
4551    to be performed by users on their individual jobs in a queue.
4552    This has been accommodated using the following method.
4553
4554    1. A new user_lpc=cmd,cmd,... printcap operation enables the
4555       SERVICE=U permissions facility.  The cmd can be:
4556       hold, release, move, topq, kill, and abort.
4557    2. When the lpc command is checked for permissions by the LPD
4558       server,  and the cmd is one of the specified in the user_lpc
4559       printcap,  rejection is delayed until the point where individual
4560       jobs are checked for action.  At this point a check for
4561       SERVICE=U is performed on the permission database.  If,
4562       at this point the action is rejected OR the default action is
4563       to reject,  the action will not be performed.
4564    3. While users can perform a kill or abort operation,  they can
4565       only do this while their job is active or at the top of the queue.
4566
4567Release LPRng 3-3-5
4568  HOWTO and README:
4569   The HOWTO/LPRng-HOWTO has been extensively editted and extended.
4570  This will replace the README.* files in the distribution.
4571
4572  Enhancements:
4573   configuration/printcap flag: force_localhost
4574    force_localhost forces client programs (lpq, lpr, lpc, lprm, etc)
4575    to connect to the server on the local host, as is done on the
4576    BSD LPR system.
4577
4578    This option has an effect ONLY if you use the destination
4579    in the printcap information for the printer.
4580
4581    If you explicitly specify a printer@host as the destination
4582    (-Pprinter@host) then the force_localhost flag is ignored.
4583
4584    The default is force_localhost = TRUE.
4585
4586    Question: why this flag?
4587
4588    Answer: the Most Frequently Asked Question in the LPRng mailing
4589    list is from users asking why lpq/lpr/lprm does not send the
4590    job to the local server, and why they are sending them directly
4591    to the remote printer instead of spooling them.  After having
4592    referenced folks to the documentation multiple times,  I have
4593    thrown in the towel on this one and have put in this flag.
4594
4595    Question: what does this change?
4596    Answer:  If you are running a server on your system,  jobs will be sent
4597    to the server and then spooled.  You may need more spool queue space.
4598
4599    If you want to use the "lpr_bounce" option,  you will need to turn
4600    try_localhost and force_localhost OFF (:try_localhost@:force_localhost@:)
4601    to get the old behaviour and not have the job run through the filters
4602    by both LPR and LPD.
4603
4604    Question: Wouldn't it be easier to ask people to read the documentation?
4605    Answer: No.
4606    I gave up asking.  The LPRng behaviour was too different from the BSD LPD
4607    behaviour and folks who wanted a "rip out and replace" solution were
4608    too frustrated by the different behaviour.
4609
4610   User Requested Status Information:
4611    lpr -mhost%port  now causes LPD to open a UDP (by default)
4612    connection to port on host and send status updates for the job
4613    being processed.  The form host%port,TCP  will open a TCP port
4614    rather than a TCP port.  Users can now use the monitor program
4615    (or a variant) to have job status reporting done.  This has the
4616    side effect that mail addresses of the form host%port will
4617    not get mail sent to them.
4618
4619   Routing Filters:
4620     During job reception,  the :routing_filter: option specifies that the
4621   received job information is to be processed by a routing filter,  which
4622   supplies additional destination information or modifications.
4623     STDIN of the filter is attached to the control file (read/write)
4624   and STDOUT of the filter should be the additional control/routing
4625   information.  Note that routing filters that need to modify the
4626   control file can now do so by using FD 0 and making the modifications
4627   directly to the file.  After processing by the routing filter, the
4628   control file will be re-read by the lpd server, and checked for correctness.
4629   See the HOWTO (/HOWTO/LPRng-HOWTO.html) for more information.
4630     Exit codes for routing filter:
4631      JSUCC (0) - processing continues;
4632      JHOLD     - job will be held
4633      anything else - job will be removed (not accepted for printing)
4634
4635  socket_linger#secs
4636     This option/flag has been added to solve a nasty problem
4637   involving closing network connections and process exit.
4638     When a process exits, the system will attempt to finish IO
4639   operations, flushing pending data to the destination.  However,
4640   It has been observed that when the LPD process which is doing
4641   the actual printing exits, it will sometimes terminate and the
4642   last output is lost.
4643     Experiments have shown that when the SO_LINGER flag is set on these
4644   connections,  the LPD process will not terminate until the last data
4645   has been transferred, which is the desired behavior.
4646     The 'socket_linger#nn' flag can be used to force setting the SO_LINGER
4647   timeout value.  By default,  this is now set to 10 seconds,  which
4648   appears to be compatible with most TCP/IP connections.  Note that the
4649   documentation is very blank on what happens when the connection is still
4650   "active" but no data is being transferred.
4651     If you are having problems with network connections and lost data
4652   at the end of jobs, try using:
4653       :socket_linger#120
4654   in the printcap for the printer.
4655
4656   LPRng executables default to SUID root at installation:
4657       By default, LPRng executables are now installed SUID root.
4658     This will reduce the number of problems encountered by folks who
4659     do not read the README.install instrucutions.
4660     (Noted by: Patrick Powell <papowell@lprng.com>)
4661
4662  :remote_support=RMQVC (default)
4663    R = lpr, M = lprm, Q = lpq, V = verbose lpq, C = lpc : allowed operation
4664    This option specifies the allowed operations to a remote printer.
4665    This solves the problem of printer servers 'hanging on lpq', due
4666    to their inability to handle multiple requests.  Note that the hang
4667    appears to be permanent - i.e. - the printer locks up.  Thus, you
4668    should never do a lprm, lpq, or lpc operation to the printer. The
4669     :remote_support=R: setting will do this.
4670
4671  :rg=group[,group] - allow clients to use printer only if user
4672    is a member of one of the specified groups.
4673    (Requested by: Oved Ben-Aroya <oved@ns.technion.ac.il>)
4674
4675  Bug Fixes:
4676   After a LOOOONG study,  the problem with non-LPRng servers terminating
4677   with 'out of space' error status has been resolved,  and hopefully fixed.
4678   (Noted by: Patrick Powell <papowell@lprng.com>)
4679
4680   Order of variables in sorted list was incorrect.
4681   (Noted by: Patrick Powell <papowell@lprng.com>)
4682
4683   README.pgp_authentication referenced 'client_auth*' names; should be
4684    'user_auth*' names.
4685   (Noted by: Patrick Powell <papowell@lprng.com>)
4686
4687   The print job transfer (LPD/lpd_rcvjob.c) code has been reviewed,  and
4688     the underlying method has been modified to accomodate reception of
4689     multiple jobs in a more consistent manner.
4690     1. On start of job transmission,  a 'lock file' is created.
4691     2. Data and control files are placed in 'temporary files' during transfer.
4692     3. At the end of job transfer,  rename() is used to change temporary
4693        files to permanent ones.
4694     4. The routing filter (if any) is invoked.  Note that the data files
4695        are available for reference during this stage.
4696     5. The control file is renamed to the final version.
4697   (Noted by: Patrick Powell <papowell@lprng.com>)
4698
4699   The plp_waitpid() code has been extensively modified,  together with the
4700     fdfork() code,  the killchildren() support,  and the Print_abort()
4701     code.  Hopefully,  this will now solve the problems of processes
4702     not being terminated and/or zombies accumulating.  This has the
4703     (desirable!) side effect that child exits will not cause system calls
4704     to terminate with EINTR status.
4705   (Noted by: Patrick Powell <papowell@lprng.com>)
4706
4707   By default, LPRng executables are now installed SUID root.
4708     This will reduce the number of problems encountered by folks who
4709   do not read the README.install instrucutions.
4710   (Noted by: Patrick Powell <papowell@lprng.com>)
4711
4712   Race condition with Set_control_info fixed.  Now file locking works
4713     correctly.
4714   (Noted by: Patrick Powell <papowell@lprng.com>)
4715
4716   For HP configurations and no GCC,  added a -Aa flag to CFLAGS
4717     (Suggested by:  Brad Rogers <brad@ast.lmco.com>)
4718
4719   The logger support was flawed somewhat.  Previously, each process
4720     would open a socket (connection) to the logger - this would soon
4721     use up a lot of connections.  Now the LPD server opens a connection
4722     at initialization,  which is then inherited by the various processes.
4723     (Found by: Desmond Macauley <desmondm@eng.dowjones.com>)
4724
4725   By default, LPRng executables are now installed SUID root.
4726     This will reduce the number of problems encountered by folks who
4727   do not read the README.install instrucutions.
4728   (Noted by: Patrick Powell <papowell@lprng.com>)
4729
4730   The SERVER permissions checking did not handle localhost correctly.
4731   (Noted by: Patrick Powell <papowell@lprng.com>)
4732
4733   Passed the PRINTCAP_ENTRY to routing filters and control file filters.
4734    (Patch by: George Lindholm <lindholm@ucs.ubc.ca>)
4735
4736   Only LPD now does killpg() otherwise this effects output from the
4737     lpq, lpc, etc., programs.
4738     (Noted by: Patrick Powell <papowell@lprng.com>)
4739
4740   Jobs were being thrown away with Send_try#0
4741     (Patch by: George Lindholm <lindholm@ucs.ubc.ca>)
4742
4743Release LPRng 3-3-4
4744  Enhancements:
4745    When using routing_filters to cause jobs to be sent to multiple
4746     destinations,  you might want LPQ to report the status of the
4747     destinations as well.  The 'destinations=pr1,pr2,pr3' will now
4748     case LPQ to report the status of destination queues.
4749      (Work, patches, and slugging by: George Lindholm <lindholm@ucs.ubc.ca>)
4750    LPR and LPRM duplicate arguments:
4751      Some users would like LPR's and LPRM's arguments to be 'cumlative', i.e. -
4752        lpr -a x -a y   would be identical to lpr -a
4753      The allow_duplicate_args configuration flag will now enable this behaviour.
4754      Also, by default the class name and the job priority are identical.  The
4755        break_classname_priority_link flag breaks this link, and the class can be
4756        specified separately from the priority.  Also, the maximum classname
4757        size specified by RFC1179 is 32 characters;  the 'classname_length#nnn'
4758        (default 31) allows a longer classname to be used.
4759      (Patches supplied by: George Lindholm <lindholm@ucs.ubc.ca>)
4760
4761  Bug Fixes:
4762    checkpc -p and -c options were not functioning as documented.
4763      (Noted by: Christophe Kalt <kalt@research.bell-labs.com>)
4764    README.bouncequeues indicated that exit status returned by
4765      the control_filter program was used to control job processing.
4766      README and common/fixcontrol.c updated to agree.  When control_
4767      filter exits with: JSUCC (0) - normal processing, JHOLD (37)
4768      job is held, JREMOVE, job removed, etc.
4769      (Noted by:  George Lindholm <lindholm@ucs.ubc.ca>)
4770    Generate_banner did not put banner in correct position.
4771      (Reported by: Jost Krieger <Jost.Krieger@ruhr-uni-bochum.de>)
4772    LPD/lpd_rcvjob.c - control file is now written to a temp file and then
4773      renamed as the control file.  This elminates problems with locks.
4774      (Suggested by:  George Lindholm <lindholm@ucs.ubc.ca>)
4775
4776Release LPRng 3-3-3
4777  Updated the sample lpd.perm, README's to use the 'REMOTEUSER'
4778   rather than USER in the permissions value.
4779   (Spotted by:  Chen Shiyuan <csy@hjc.edu.sg>)
4780  Cleaned up filter and server killing code - added more robust
4781   exit and abort facilities.  This was done in several places
4782   in order to try to make sure that processes created for filters would
4783   be killed off when the server process exited.
4784  Cleaned up logging and some minor error messages.
4785  Removed 'intl/po2tbl.sed' and 'po/POTFILES' from distribution.
4786   (Noted by: George Lindholm <lindholm@ucs.ubc.ca>)
4787
4788Release LPRng 3-3-2
4789  Thu Oct  9 20:03:30 PDT 1997
4790  lpr, lpq,... usage message formats fixed.
4791    (Patches by: Jan Barte <yann@plato.uni-paderborn.de>)
4792  Autohold support was accidentally removed from LPD/lpd_rcvjob.c
4793
4794
4795Release LPRng 3-3-1
4796  New Baseline Tue Oct  7 18:29:55 PDT 1997
4797  Comments:
4798    README.account updated to show how to use psfilter and CTI-hpif
4799    filters and accounting scripts.
4800  Bug Fixes:
4801    Permissions checking patch did not work correctly. Patcher patched
4802     patch to make patchwork code work correctly.
4803    (Originator of patch: Simon Wilkinson <sxw@dcs.ed.ac.uk>)
4804
4805Release LPRng 3-2-12
4806  Bug Fixes:
4807  The sample lpd.conf file had ff=\\f which confused folks.  Now it
4808    has correct syntax.
4809  The end of job and Print_abort code has been clean up and modified
4810    so that exit is now fast and brutal.  When you do LPRM you now GET
4811    LPRM action fast and quick,  and no processes hanging around.
4812  The code for reporting fatal 'filter errors' has been modified to put
4813    the termination conditions into the LPQ status report.  This will
4814    simplify the job of finding out why your job died much easier.
4815  Jobs that now exceed their maximum number of print attempts are deleted
4816    by default instead of being retried indefinately.  This can be be
4817    suppressed by setting retry to 0, as documented.
4818  The above bugs/changes were the result of a long standing report of
4819    the LPD server being slow to respond when printing bad jobs.
4820  (Added by: Patrick Powell <papowell@lprng.com>)
4821
4822Release LPRng 3-2-11
4823  Enhancements:
4824   printcap/configuration 'network_connect_grace#nnn' variable
4825   is similar to the 'connect_grace' variable,  but pauses for
4826   the specified time between connections to LPD or other servers.
4827   Useful when using LPD prototcol to network based printers that
4828   need some recovery time between jobs.
4829   (Suggested by: Christian Illinger <illinger@lepsi.in2p3.fr>)
4830  Bug Fixes:
4831   all:all=p1,p2,p3 did not check correctly for separators.
4832    (Reported by: Bertrand Decouty <Bertrand.Decouty@irisa.fr>)
4833   configure.in - checks for random() defined in stdlib.h
4834    (Suggested by: Bernhard Rosenkraenzer <root@BOL-SubNet.ml.org>)
4835   Logging:  the JOBNUMBER is now reported correctly.
4836    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
4837   LPC move:  the job is deleted from the queue after being moved,
4838    even if save_when_done is set.
4839    (Requested by:  Gary Cender <gcender@eng.dowjones.com>)
4840
4841Release LPRng 3-2-10
4842  Bug Fixes:
4843    In cleaning up the routing support in LPD/lpd_jobs.c and
4844    LPD/lpd_rcv.c,  I cleaned it up so much that only the first
4845    routed job was printed.
4846    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
4847
4848Release LPRng 3-2-9
4849  Bug Fixes:
4850    Typo in src/common/linksupport.c caused very wierd error messages to be
4851    printed.
4852    (Reported by:  lots and lots of people)
4853
4854
4855Release LPRng 3-2-8
4856  Bug Fixes:
4857   snprintf used instead of plp_snprintf()
4858   (Reported by:  Dirk Wrocklage <dirkw@uni-paderborn.de>
4859     and Helmut Jarausch <jarausch@igpm.rwth-aachen.de>)
4860   Max_servers code did not function correctly - there was a logic error
4861     in the design.  As a result,  it would lock up and refuse incoming
4862     jobs.
4863    (Reported by: Jim Stosick <Jim.Stosick@Forsythe.Stanford.EDU>)
4864   Poll_time:  Under certain very odd conditions,  a spool queue could
4865    have a job in it and the LPD server would not fork a process to
4866    serve the queue.  The poll_time (default 6000 seconds) is a timer
4867    that will scan the print queues for a pending job and no server.
4868    The previous version had a race condition in it that would
4869    periodically spawn too many servers.  The new code not only fixes
4870    this problem,  but also enforces a true idle condition on the
4871    lpd server.  If there is no activity and no jobs,  then the server
4872    will not periodically wake up and check the spool queues.
4873  Force_poll:  Some users have software that places jobs in the
4874    spool queues,  and want LPRng to periodically poll the queues
4875    for these jobs.  The 'force_poll' flag has been added to provide
4876    this functionality.
4877
4878Release LPRng 3-2-7
4879  Major Revisions:
4880
4881  Hold file names and creation:
4882    When the server creates a job in a job queue,  it also creates
4883  a hold file along with the data and control file in the spool
4884  queue directory.  During job processing the hold file is updated
4885  by various processes.  As a result,  this file must be locked
4886  and carefully updated.  The implemented method of locking and
4887  holding locks for jobs was flawed,  resulting in race conditions,
4888  etc.
4889
4890    The routines responsible for reading and writing hold files are
4891  Lock_job_control, Get_job_control and Set_job_control.  These have
4892  been modified as follows.
4893  0. A Lock_job_control() routine now generates and locks a control
4894     file.
4895  1.  The Get_job_control() routine may now open the job file in a LOCKED
4896     or UNLOCKED mode. It will open the file UNLOCKED if not passed
4897     a file descriptor (FD) created by Lock_job_control(),
4898     reads the file and then closes the file if not locked.
4899  2.  The Set_job_control() file now updates the hold file as follows.
4900     a) It creates a temporary file (open, locked).
4901        This file has the name _fAnnn, while the lock file is
4902        cfAnnn.
4903     b) It writes the job file to the temporary file.
4904     c) It RENAMES the temporary file to the hold file.
4905     d) If it has been passed a FD created by Lock_job_control()
4906        it will close the passed FD and return the locked FD;
4907        the effect is to maintain the lock on the control file.
4908     e) if not passed an FD, it simply closes the FD, effectively
4909        releasing the lock.
4910
4911  This functionality guarantees the following:
4912   1. While there might be a race condition in time over a particular
4913      control file,  the Get_job_control() routine will always open
4914      either a 0 length hold file (i.e. - file is in an initial state)
4915      or a VALID COMPLETE non-zero length hold file.
4916   2. Get_job_control() (no lock) will always read correct status information
4917      or NO status information.
4918   3. If a Write operation is needed, Set_job_control() does this correctly
4919     and indivisibly.
4920   4. If a Read/Modify/Write is needed, Get_job_control() is requested to
4921     read and lock the file,  and then Set_job_control is used to modify
4922     the information.
4923
4924   Hold File Name Format:
4925     In order to guarantee that jobs placed into the hold file have unique
4926   job numbers, i.e. - so you can reference them by job number,  the hold
4927   file name format is now hfAnnn.  Note that this means the host name is
4928   now not used.  The Find_unique_job_number() routine will attempt to find
4929   and create a hold file with a unique job number in the queue.
4930
4931   Jobs Placed In Queues Always Get Unique Job Numbers:
4932     In the previous version of LPRng,  when a job was placed in a queue
4933   with an existing job with the same control file name,  the job overwrote
4934   the existing job.  This had some interesting side effects, mostly concerned
4935   with duplicate jobs.  If you have the 'Save Job After Printing' flag
4936   set,  you may run out of job numbers.
4937
4938   Full_time printcap/lpd.conf flag
4939     Specifies that you want to have a full year-mo-dy-hr:... time
4940   format in log and status message.
4941
4942   Binding to random ports
4943     The RFC1179 specifies connections must originate from port 721-731;
4944   most BSD implementations relax this to 512-1023.  There is a problem
4945   when trying to reuse a port and connecting to the same system;
4946   TCP/IP requires about a 10 minute timeout on a IP:port/IP:port pair.
4947   The code that tried to do connections originally tried the ports in
4948   sequential order, leading to long delays.  Now it will try them in
4949   RANDOM order, and will try at most 'connect_try' ports at a time
4950   before admitting failure.
4951
4952  Bug Fixes:
4953    Minor nit with lpc commands fussing about RemotePrinter values.
4954      (Reported and patch by: Martin Pahl <pahl@tnt.uni-hannover.de>)
4955    File descriptors are lost if the remote system that we are trying to send
4956    a job to doesn't like the printer name we are trying to use.
4957      (Reported by: George Lindholm <lindholm@ucs.ubc.ca>)
4958    Permissions checking for PRINTER=host,@netgroup was done incorrectly.
4959      checking now done by match_pr().
4960      (Reported by: Sergio Tessaris <tessaris@ictp.trieste.it>
4961        and Warren Marts <warren@nmt.edu>)
4962    Problems with Get_perms() when rereading the permissions database.
4963      The actual problem was trying to be too tricky and preallocate data
4964      structures.  When this was done incorrectly,  you had some very odd
4965      results when rereading the same database.
4966    LPR: when printing multiple files,  data files were duplicated.
4967      i.e. - dfA..., dfB..., ..., dfZ..., dfA...
4968      Fixed LPR/lpr_cpyjobs.c so that now we have dfA... dfZ, dfa..., dfz
4969      (Reported by: Simon Wilkinson <sxw@dcs.ed.ac.uk>)
4970    User detected a bug where the "-r" option to LPR (LPRng 3.2.6)
4971      actually removes files even if the job was not spooled successfully.
4972      my patch to fix this problem.  Updated LPR man page to reflect the dreaded
4973      -r (remove after printing) option.
4974      (Reported and Fixed by: Garrett D'Amore" <garrett@qualcomm.com>)
4975    Permissions checks for group did not check the group id, just the
4976      user name.
4977      (Reported and Fixed by:  Simon Wilkinson <sxw@dcs.ed.ac.uk>)
4978    Race conditions src/LPD/lpd_jobs.c between printer server
4979      and worker process caused a null pointer reference.
4980      (Reported and Fixed by: George Lindholm <lindholm@ucs.ubc.ca>)
4981    Checkpc did not use correct lockfile format.
4982      (Reported by: Jan Barte <yann@plato.uni-paderborn.de>)
4983    When routing a file,  the route Xnnnn information was not used.
4984      Updated Fix_control to use this information as per documentation.
4985      (Reported by: Patrick Powell <papowell@lprng.com>)
4986    Control file not reparsed after 'control_filter' processing.
4987      It is now reparsed,  and only the new contents are sent
4988      to the destination.  This includes the data files.  The
4989      control file filter MUST remove excess data files.
4990    End of job accounting to a remote server was erroneously expecting
4991      an 'ACCEPT' reply. Fixed.
4992      (Reported by: Markus Fleck <fleck@informatik.uni-bonn.de>)
4993
4994Release LPRng 3-2-6
4995    README.accounting, lpd.8, printcap.5 man pages - accounting file is
4996      documented as not being created.
4997      (Reported by: Christophe Kalt <kalt@research.bell-labs.com>)
4998    LPRM/LPD did not forward remove commands correctly.
4999      (Reported by: Paul Zablosky <zablosky@ucs.ubc.ca>)
5000    Permissions:  PRINTER attribute can now be a netgroup.  This allows
5001      things like:
5002       ACCEPT SERVICE=R,P PRINTER=@PRIP_printers REMOTEGROUP=@PRIP_users
5003       REJECT SERVICE=X,R,P PRINTER=@PRIP_printers
5004      makes management of printers... easier... I suppose.
5005      Updated lpd.perms.5 as well.
5006      (Suggested by: John R Lane <lanejohn@cps.msu.edu>)
5007    Removed mention of "co" flag (obsolete) from lpd.conf man page.
5008      (Reported by Klaus Steinberger <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
5009    HP/UX version 10.x needs to use termiox IOCTL call to set
5010      hardware handshaking on.
5011      (Reported and patches supplied by:
5012        Klaus Steinberger <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
5013    lpc printcap command now only needs STATUS (S) privileges.
5014       New DEFAULTQ protocol message added.  This allows lpc to request
5015       the default queue used by LPD.
5016    fix_bad_job flag now ignores duplicate control lines,  and replaces
5017       bad characters with blanks in control file.
5018
5019Release LPRng 3-2-5
5020    configure:  now checks to see if inet_ntop() is in resolver
5021      library (-lresolv),  and includes it when doing checks for
5022      other functions.
5023    termclear now uses IS_LINUX instead of __linux__
5024      (Reported and fixed by: Horst <horst.fickenscher@it.erlm.siemens.de>)
5025    memory leak fix of 3-2-4 interacted with other code in unexpected
5026      manner - revised memory fix.
5027      (Reported and fixed by:  Patrick Powell <papowell@lprng.com>)
5028    LPD/lpd_status.c - status display line length now controlled by
5029      max_status_line configuration/printcap variable,  which allows
5030      the maximum line length to be exceeded if desired.  Default is
5031      still 79.
5032    src/Makefile.in COMPILATION FLAG: STRICT_RFC1179
5033      default originate_port value is now 512 - 1022,
5034      rather than RFC1179's 721 - 731.  compiling with -DSTRICT_RFC1179
5035      sets the default to 721 - 731.
5036
5037Release LPRng 3-2-4
5038    LPD - pursued and found an extremely minor memory leak that
5039      was exercised only under a very unusual set of conditions.
5040      (Reported and fixed by:  Patrick Powell <papowell@lprng.com>)
5041    Batch of patches and errors: Tom Bertelson <tbert@pamd.cig.mot.com>
5042      include/portable.h - minor changes in SUNOS prototypes
5043      CHECKPC/checkpc_port.c - better check to see if setproctitle worked
5044      PAIR() macro has added guards for _PROTO_ problems
5045      rw_pipe() has a minor portability problem clean up.
5046    LPQ, LPR, LPRM option checks were done incorrectly.
5047      (Reported by: Scott Nelson <nelson@canopus.llnl.gov>)
5048    umask(0177) should really be umask(0077) to allow correct directory
5049      permissions checking.
5050      (Reported and fixed by: Guy Geens <Guy.Geens@elis.rug.ac.be>)
5051    lpd - the lpc reread function sends a signal to the LPD server,
5052      which then calls 'Read_pc' from a signal handler.  This can cause
5053      problems.  In addition, there was a memory leak in the Read_pc()
5054      routine.
5055      (Reported by: Rainer Schoepf <schoepf@uni-mainz.de>)
5056
5057Release LPRng 3-2-3
5058 BUG FIXES:
5059    src/Makefile(Makefile.in), man/Makefile.in did not do 'make install
5060      prefix=/xxxx' operations correctly.
5061      (Reported by: Chris O'Regan <chris@ECE.concordia.CA>)
5062    Get_remote_hostbyaddr() used host_ent when it was undefine/null.
5063      (Reported by: Carson Gaspar <carson@lehman.com>)
5064    Patch for HAVE_SIGLONGJMP did not include common/timeout.c and
5065      include/portable.h.
5066      (Reported and fixed by: Guy Geens <Guy.Geens@elis.rug.ac.be>)
5067
5068Release LPRng 3-2-2
5069 BUG FIXES:
5070    Not freeing memory allocated by Expand_value().
5071    (Reported by: "Todd C. Miller" <Todd.Miller@cs.colorado.edu>)
5072    Added logging for non-job related operations.
5073    Added finer time resolution on job changes
5074      (Requested by: Chao-Wen Young <kiki@eng.dowjones.com>)
5075    Added LPDEST environment variable for  printer as well as PRINTER
5076      and NGPRINTER
5077      (Suggested by: Garrett D'Amore <garrett@qualcomm.com>)
5078    Moved Print_flush() to Print_abort().
5079      (Motivated by: Gerhard Schneider <gs@ilfb.tuwien.ac.at>)
5080    MONITOR/monitor.c had duplicate include references.  This caused some
5081      portability problems with systems that did not have 'guards' in their
5082      include files for multiple inclusion.
5083      (Reported by: John Perkins <john@cs.wisc.edu>)
5084    lpstat format fixes.
5085      (Reported and Fixes: Carson Gaspar <carson@lehman.com>)
5086    common/getqueue() rejects control files with duplicate remove lines -
5087      this is not a big problem,  so added code to ignore them.
5088      (Reported and Fixes: Frank Terhaar-Yonkers <fty@cisco.com>)
5089
5090Release LPRng 3-2-1
5091    Baseline Release
5092
5093Release LPRng 3-1-13
5094    Changed sleep() calls to plp_sleep(), which uses select mechanism,
5095      to avoid interactions with SIGALRM signal handler in Linux.
5096    In the waitchild() code,  the signal(SIGCHLD,SIG_IGN) caused
5097      some systems to automatically perform a 'wait()' on child
5098      processes.  The SIG_DFL only ignored the signal, and the
5099      waitpid() would then succeed.  Note that this action is implied
5100      by the POSIX standard wording for _exit().
5101    The code for job queue scanning will not report 0 length
5102      control files as errors until they are older than an hour.
5103    The LPD/lpq_status() now ignores jobs being transferred,
5104      and does not report their status.
5105    LPD/lpd_rcvjob() now allows multiple jobs to be transferred on a single
5106      connection.  This is a violation of RFC1179 but it is now done.
5107    Expanded \xx entries in Banner line, so that very strange
5108      filters that insisted on these characters would get them.
5109      If a banner line had these characters,  a \n is not appended.
5110    Bounce queue destinations no longer have to be printer@host,
5111      they can just be printer.  The default destination is the
5112      server host.
5113    CHECKPC/checkpc.c - To_root() interferred with Test_code();
5114      reordered code.
5115      (Reported by: Todd Rannow <rannow@msc.edu>)
5116    common/check_remotehost() - added checks for Is_server, moved some
5117      tests into LPD/lpd_status.c, LPD/lpd_remove.c
5118      (Reported by: Damon W Atkins <zdxa21@gascor.vic.gov.au>)
5119    Solaris 2.4 LPD server insists on sending REQ_START messages -
5120      and gets peeved when it gets an error.  Now messages are NOOPs.
5121      (Reported and fix suggested by: Jussi Eloranta <eloranta@voimax.voima.jkl.fi>)
5122    Read_fd_len_timeout() closed fd on timeout - this was not correct behaviour.
5123      (Reported by: Todd Rannow <rannow@msc.edu>)
5124    Clients (LPR, LPQ, LPC) were not expanding printcap %P, %H, etc., entries.
5125      (Reported by: Damon W Atkins <zdxa21@gascor.vic.gov.au>)
5126
5127Release LPRng 3-1-12
5128    Check_remote modifications exposed logic error in various places-
5129      need checks for both RemotePrinter and RemoteHost, not just
5130      RemoteHost.
5131
5132Release LPRng 3-1-11
5133    Missing check for Is_server in Check_remote() caused clients to
5134      not connect to LPD server.
5135
5136Release LPRng 3-1-10
5137    LPR/lpr_cpyfiles() did not handle multiple copies of stdin
5138      correctly.
5139      (Reported and fixed by: Jens Thiel <thielj@uran.informatik.uni-bonn.)
5140    LPR and clients updated hold files.  Added checks for Is_server in the
5141      appropriate places.
5142      (Reported by: Lee Muh Hwa <cceleemh@dolphin.cc.nus.sg>)
5143    Problem with bad printer name detection.
5144      (Reported and fixed by: Martin Pahl <pahl@tnt.uni-hannover.de>)
5145    setstatus() was not sending STATUS information to the logger.
5146      (Reported by: Chao-Wen Young <kiki@eng.dowjones.com>)
5147    Bad non-existent printer,  printcap file misconfiguration code.
5148      (Reported and fixed by: Dirk Nitschke <ms3a512@math.uni-hamburg.de>)
5149    Documentation and man page editting - minor corrections, missing entries.
5150      (Comments and patches by: Florian La Roche <florian@knorke.saar.de>)
5151
5152Release LPRng 3-1-9
5153    lpq -v format modified so Destination was printed correctly.
5154    Remove_job() did not remove all the data files or hold files.
5155    dofork() did not zero Tempfile->pathlen.
5156    LPR/lpr_cpyfiles() did not preallocate the job file array,
5157      leading to problems when realloc() was called.
5158    printcap(5) and lpd.conf(5) man page cleanup.
5159      (Done by: Florian La Roche <florian@knorke.saar.de>)
5160
5161Release LPRng 3-1-8
5162    Print_job() did not use correct queue name.
5163    Man Pages did not get right version number.
5164    force_queuename not in printcap(5) man page.
5165      (Reported by: Guy Geens <guy.geens@elis.rug.ac.be>)
5166    In LPC, Queue_name is not NULL when getprinter() is called.
5167      (Reported by: Jussi Eloranta <eloranta@voimax.voima.jkl.fi>)
5168    The filter environment variable PRINTCAP_ENTRY now holds the
5169      printcap entry for the printer.  In conflict with some filters
5170      using PRINTCAP to hold the pathname of the /etc/printcap file.
5171      (Reported by: Guy Geens <guy.geens@elis.rug.ac.be>)
5172    waitchild() had an alternate wait3 implementation that turns
5173      out to be broken on some systems.  Force use of the waitpid()
5174      version.
5175
5176Release LPRng 3-1-7
5177  New Functionality: poll_time configuration variable
5178    There is a small, but almost impossible to eliminate, race condition
5179    when a job is put into a busy queue.  If the server process checks to
5180    see if there is work to be done, and the job is put into the queue
5181    after that point,  then there is a possiblity that the server may
5182    exit with a job in the queue.  This can be solved by using semaphores,
5183    locks, etc., but is almost impossible to do in a portable and efficient
5184    manner. The 'poll_time#nnn' configuration entry has been added to
5185    allow the administrator to specify an interval at which the queues
5186    can be periodically checked for unprinted jobs.
5187    The default poll_time value is 6000, i.e. - 10 minutes.
5188
5189  Bug Fixes:
5190    printcap.5 documents :mi: (spool directory space needed) as number
5191      but it is a string.  Fixed documentation.
5192      (Reported by: Jeff Bacon <bacon@twinight.org>)
5193    Install.txt, Install.ps - lp=host%port misdocumented.
5194      (Reported by: Jeff Bacon <bacon@twinight.org>)
5195    printjob.c - check to see if there is a filter; if not, shove
5196      file directly out.
5197      (Reported by: Guy Geens <guy@abacus.elis.rug.ac.be>)
5198    src/Makefile - SUID_ROOT_PERMS= 04755 -oroot should be -o root
5199      (Reported by: Dave Goldhammer <Dave.Goldhammer@Colorado.EDU>)
5200    POSIX uses LOGNAME environment variable - check this first, then
5201      USER for user information.
5202      (Suggested by: Todd C. Miller <Todd.Miller@cs.colorado.edu>)
5203    lpc now allows printer@host specification.
5204      (Reported by: Doug White <dwhite@gdi.uoregon.edu>)
5205    printer queue loop detection algorithm modified
5206      The code to detect print queue loops was too agressive, and gave
5207      false warnings about print queue loops. Now only checks for explicit
5208      loops.
5209      (Reported by: Yuji Shinozaki <yuji@cs.duke.edu>)
5210    Start_all() code did not check for a limit on the number of processes
5211      that would be started by the server.
5212
5213Release LPRng 3-1-6
5214  Bug Fixes:
5215    The :direct_read: flag now works for bounce queues.  Tested with aps
5216      filter.  The aps filter distribution of globals/GLOBALS.sh has been
5217      modified to have defaults for various options that allows even a
5218      (possibly) misconfigured filter to produce some sort of output
5219      instead of dying with a strange error message.
5220    setstatus() was not putting \n on end of lines, but only when used
5221      on Solaris 4.1.4 with Sun's ACC compiler.  Compiler bug.  Rather
5222      than fix the compiler,  we (hopefully) modify the code.
5223      (Reported by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
5224    LPSTAT simulation:
5225      Progress reporting too coarse.
5226      lpstat -s too verbose.
5227      lp now reports 'request id is ....'
5228      (Reported by: David Livingstone <davidl@scdes.cn.ca>)
5229
5230Release LPRng 3-1-5
5231
5232  New Functionality: PCNFSD compatibility
5233    PCNFSD - Public Domain version,  from Geoff Arnold (Geoff.Arnold@Sun.COM,
5234      geoff@East.Sun.COM).  Assumes that LPC will return list of
5235      printers,  indented one space.  (Fixed).
5236      Added README.pcnfsd as a guideline for users.
5237    LPRM now says 'dequeueing' (yech!) instead of 'removing' to make it
5238      consistent with lprm and PCNFSD implementations.
5239    PCNFSD distribution put into LPRng collection.
5240
5241  Bug Fixes:
5242    cleanup() was causing early exits due to use of killpg();
5243      commands such as lpq |more would not work correctly.
5244      Fix was to suppress top level process from killing itself.
5245    autoconf bizzarness - src/Makefile.in now has ${prefix} entries
5246      to match the INSTALL documentation.  You can now do
5247      make prefix=xxx and software will be installed in xxx/bin
5248      Default directories made to conform with existing LPRng ones,
5249      not Linux/GNU ones.
5250    LPD/lpd_jobs: when a job is aborted, the return status is
5251      clobbered.  Now it is not clobbered.
5252
5253
5254Release LPRng 3-1-4
5255
5256  New Functionality - :oh: entry does globmatch on FQDN host name.
5257    The :oh=*val*: entry can now be used to do matching on the
5258    FQDN host name.  This allows such things as defining classes
5259    of printers, i.e.:
5260      lp:oh=*lab1*:lp=pr1@server
5261      lp:oh=*lab2*:lp=pr2@server
5262    (Inspired by: Nathan Neulinger <nneul@umr.edu>)
5263
5264  Bug Fixes:
5265    Debugging stuff added to Is_printable();  LPR/lpr.c and company had
5266      the control file generation fixed up so that lpr -K worked correctly
5267      when taking input from stdin; also when using it with lpr_bounce.
5268      (Reported by: Andrew Leahy <A.Leahy@st.nepean.uws.edu.au>)
5269    autoconf Version 2-12 has a bug and was not generating configuration
5270      files correctly;  fixed this and now the --exec_prefix option
5271      appears to work correctly.  To regenerate configure from configure.in,
5272      the following acgeneral.m4 file lines must be changed:
5273          .... original .....
5274          test "x$prefix" = xNONE && prefix=$ac_default_prefix
5275          # Let make expand exec_prefix.
5276          test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5277
5278          .... correct ......
5279          test "x$prefix" = xNONE && prefix=$ac_default_prefix
5280          # Let make expand exec_prefix.
5281          test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
5282    Permissions checking in Is_printable() was erroneous.
5283      (Reported by: Dirk Nitschke <ms3a512@math.uni-hamburg.de>)
5284    Find_non_colliding_job_number() did not check to see if job priority
5285      was available, and was generating bogus hold file names.  This only
5286      occurs when data files are sent first.
5287
5288Release LPRng 3-1-3
5289
5290  New Functionality - Kerberos authentication uses encryption
5291     Send encrypted and authenticated information by default.
5292       (Greateful thanks to: Ken Hornstein <kenh@cmf.nrl.navy.mil>)
5293
5294  Bug Fixes:
5295    Fix_str(): missing null pointer check
5296      (Reported by: Christian Kuehnke" <Christian.Kuehnke@arbi.Informatik.Uni-Oldenburg.DE>)
5297
5298
5299
5300Release LPRng 3-1-2
5301
5302  New Functionality - glob matches for printer names:
5303
5304    At USENIX97,  somebody mentioned that they wanted to have a 'wildcard'
5305    entry that would allow them to 'trap' all sorts of printers, and then
5306    do formatting based on the printer name.  I puzzled over this, until
5307    I realized that the combination of the :qq: (put queue name in job)
5308    and a wildcard match would do exactly what this person wanted.
5309    The more I thought about it,  more functionality seemed to be
5310    provided by this - you could match various arcane printer names
5311    against patterns, etc.
5312
5313    Now when a job arrives and the LPD server is searching for the queue
5314    name, the search is done using a glob match.  Note that you
5315    cannot have a primary printer name with a GLOB character,  but it
5316    is allowed to have an alias with one. For example:
5317
5318        pr1|pr*|all printers which start with pr
5319            :lp=pr1@host
5320            :qq
5321        pr2|*|wildcard match
5322            :lp=pr2@host
5323            :qq
5324
5325  New Functionality - munging control files:
5326
5327    There is now a 'control_filter' option that will cause the control
5328    file to be passed through a filter.  This takes place only when a job
5329    is transferred to a remote printer.  It was intended to be used by
5330    bounce queues whose destination required extremely whacko formats
5331    for their control files.  See README.bouncequeues for details.
5332
5333  New Functionality - generating banner pages for remote printers:
5334    The :generate_banner: printcap option will now generate a banner
5335    page for remote print jobs and/or when using LPR and :lpr_bounce:
5336    is set.  The banner is generated by the banner printer specified
5337    by :bp: or the default banner printer.  If the :hl: (header or
5338    banner last) flag is set, it will be the last part of the job printed.
5339
5340  New Functionality - spreading job numbers to avoid collisions:
5341
5342    Some users have been encountering job number collisions when using the
5343    routing facility and making multiple copies.  The "spread_jobs" printcap
5344    and configuration variable now allows you to spread out job numbers
5345    by the indicated factor.  The job number is based on the process id;
5346        jobnumber = processid * spread_jobs;
5347    Under heavy use,  this value should be set to the expected maximum
5348    number of jobs copies that will be made.
5349
5350  Fixes and Extensions:
5351    fixcontrol.c - badly formatted DEBUG message.
5352        (Reported by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
5353    configure - cray-unicos is now just unicos in the system targets.
5354       In addition, HAVE_SYS_SIGLIST botches have been fixed.
5355    fix_create_dir() segment faulted
5356        (Reported by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
5357    LINUX has undocumented (and in my opinion broken) gethostbyname()
5358        and gethostbyaddr() interactions.  The code that does lookup
5359        now performs extremely picky checks, copies, etc., to avoid
5360        problems with this.
5361        (Reported by: just about every LINUX user...)
5362    Makefile: install was missing a value.
5363        (Reported by: Doug White <dwhite@gdi.uoregon.edu>)
5364    :bk: (Backwards compatible) now forces short job names and
5365        short job numbers as well.
5366    LPC - lpq command now takes the last printer specified as its default.
5367        (Suggested by: Jeff Bacon <bacon@twinight.org>)
5368    IRIX and UNICOS compilation mods.
5369        (Suggested by: Paul Burry <rpburry@magi.com>)
5370    Aborted LPR caused 0 length files to be left in spool directory
5371    Multiple copies and routing interact
5372        (Andrew Leahy <A.Leahy@st.nepean.uws.edu.au>)
5373    config.sub now recognizes i686 as a proper machine type.
5374        (Reported by: Michel Robitaille <robitail@IRO.UMontreal.CA>)
5375
5376Release LPRng 3-1-1
5377
5378  New Functionality:
5379
5380    Support for client to server and server to server authentication.
5381    See README.authentication and lpd(8) man page, as well as
5382    README.pgp_authentication.  Currently, pgp is supported for
5383    client to server and server to server authentication; Kerberos
5384    is supported for client to server authentication.
5385
5386    Printcap entries can contain the following:
5387       %a  - architecture
5388       %H  - fully qualified domain name of host
5389       %h  - shost host name
5390       %P  - printer (when in printcap entry)
5391       %R  - remote printer (when in printcap entry)
5392       %M  - remote host (when in printcap entry)
5393    This is the same as for the configuration information.  Note
5394    that these keys are marked by %; keys marked with $ such as $P
5395    are expanded only when used by filters.  Currently only the
5396    :sd: (spool directory),  :server_user:,  and :remote_user: (for
5397    authentication) are expanded.
5398
5399    Support for lp(1) simulation (Solaris SystemV R4) print facilities
5400    now built in.  This is done by checking the name that the program
5401    is invoked with:
5402      lpr invoked as lp - simulates lp operation
5403      lpq invoked as lpstat - simulates lpstat operation
5404      lprm invoked as cancel - simulates cancel operation
5405    Note that this is not full functionality,  but it will provide
5406    a usable interface for programs that need lp, lpstat, and clean.
5407
5408    man pages updated and rewritten to reflect latest changes.
5409
5410    IPV6 awareness is being planned for.  The permissions checking is
5411    now done assuming that information returned by gethostbyname()
5412    and/or gethostbyaddr() may be for IPV6.  Host names checking
5413    is done not only on the cannonical (main) host name, but also
5414    for aliases;  the IFIP permissions check has been added to allow
5415    access to the IP address reported by the accept() system call
5416    that reported a connection.  See README.lpd.perms for details.
5417
5418    A new printcap flag, :direct_write: now passes a file descriptor
5419    to print filters.  This is backwards compatible with the old BSD
5420    filters,  but you lose the ability to monitor the printing
5421    process.  In addition,  you are stuck with 'send_timeout'
5422    seconds for printing a job,  which may not be suitable if a job
5423    hangs up on a printer.
5424
5425    Makefiles compatible with the BSD make are now provided;  these
5426    are generated from the basic Makefiles using a simple conversion
5427    script.  Of course, the Makefiles were redone in order to make this
5428    feasible...
5429
5430    LPR now can do filtering if the :lpr_bounce: flag is set.
5431
5432  LPR Protocol Extensions:
5433
5434    REQ_SECURE: an authenticated transfer of job and control information.
5435     See the details in the README.authenticate and lpd.8 man page.
5436
5437    REQ_VERBOSE: provides a hideously detailed set of information about
5438     the print queues and their status.  This is of interest to persons
5439     who are trying to provide tracking for jobs and other information
5440     and need more than the status provided by the high level LPQ
5441     dumps.  The LPQ -v format now will generate this.
5442
5443  LPQ and Status Generation
5444     LPQ now prints each queue status once.  In addition,  when getting
5445     status, LPD makes a valiant effort to avoid forking and creating
5446     processes.  This makes things much more easy on the system load.
5447
5448  Source Code Reorganization:
5449    A major source code reorganization was done in order to support
5450    configuration management tools in a more effective way.
5451
5452  System configuration and printcap initialization is now done by
5453    the values in the lpd.conf file,  which can contain printcap
5454    flags as well as configuration information.  This allows
5455    defaults to be set in a much simpler manner.
5456
5457  Beta Testers:
5458    Pseudo Anonymous, <pseudo@erehwon.org>
5459    Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>
5460    Dirk Nitschke <nitschke@math.uni-hamburg.de>
5461    Paul Burry <rpburry@magi.com>
5462    Thierry.Besancon@lps.ens.fr (Thierry BESANCON)
5463
5464  Fixes and Extensions:
5465    configure and Makefile support for CRAY (by Paul Burry <rpburry@magi.com>)
5466    using the lpc class facilities now prevents held class jobs from being
5467      printed.
5468      (Reported by: Chao-Wen Young <kiki@eng.dowjones.com>)
5469    gethostbyname() has a possible problem.  Added checks for
5470      parameters.
5471      (Reported by: Jens Thiel <thielj@uran.informatik.uni-bonn.de>)
5472    printcap '@' operator did not set clear entries.
5473      (Reported by: Park Jae-hyon <jhpark@entropy.kaist.ac.kr>)
5474    filter error code 'JFAIL' now causes job removal.
5475      (Reported by: Norman R. McBride <N.R.McBride@city.ac.uk)
5476    SAMEUSER permission check was not working correctly.
5477      (Reported by: Carsten Benecke <benecke@informatik.uni-hamburg.de>)
5478    LPD now checks for the number of servers it has active;  Max_servers_active
5479      configuration variable sets this.  In addition,  uses the getrlimit()
5480      to determine real value if available.  This should throttle back
5481      problems when a lot of LPR connections are being made and the server
5482      proceeds to die or lose jobs.
5483    getconnection() now tries to open a connection with different
5484      originating ports.  This solves a problem with some systems that
5485      did not like LPRng originating connections from the same reserved
5486      ports.  Users encountering this difficulty might have to use
5487      a wider port range;  this can be done now by modifying the printcap
5488      entry for the printer.
5489    checkpc now has Is_server set to 1, so it should do the full
5490      server compatibility checks.
5491    Queuename not being set correctly.
5492      (Reported by: Thierry.Besancon <Thierry.Besancon@lps.ens.fr>)
5493    LPC now calls 'lpq' via a bombproofed system() call
5494      (Suggested by Paul Burry <rpburry@magi.com>).
5495    LPR now generates correct job names for more than 26 files.
5496      (Reported by: Guy Geens <ggeens@elis.rug.ac.be>)
5497
5498Release LPRng 2-4-3
5499  New Functionality:
5500    Printcap Files
5501      The printcap reading and configuration file reading code
5502      now supports the following:
5503      1. you can have multiple :tc=name: references.
5504      2. printcap entries whose main name starts with a punctuation character
5505          is not used as a printer.  However,  it can be referenced by
5506          :tc=: entries.  For example,  the following shows how to
5507          use this facility.
5508
5509      @filter:if=/bin/whatever:of=/bin/whatever
5510      @banner:sh:sb
5511      @spool:sd=/var/spool/%P
5512      p1:tc=@filter:tc=@banner:@spool
5513
5514      In addition,  the following printcap entries have %P (printer),
5515      %h (short host name), and %H (Fully qualfied domain name of
5516      host) replaced by the current values before jobs are processed;
5517      other values are ignored and replaced by which space.  A %% is
5518      replaced by a single '%'.  The variables which are expanded are
5519      controlled by the flags value of the src/printcap.c/Pc_var_list[]
5520      array;  currently the following are expanded:
5521        :sd=: (spool directory)
5522    Device Locking:
5523      This code was originally put in place for systems where you might
5524      have multiple people trying to use a printing device.  The 'lk'
5525      flag now controls if you want to lock the IO device.  Default
5526      is no locking.
5527
5528  Portability Fixes:
5529    Quicksort is not a stable sorting algorithm - if two entries are
5530    identical, then their position can be reversed.  The order of entries
5531    is important and needs to be preserved when reading information,
5532    so mergesort() is now used.
5533
5534    The organization of the include files was causing problems with
5535    testing packages.  There is now one include file for each major
5536    functional component.  Global variables are now in a single file,
5537    and are the same for all packages.  The difference in size of
5538    the executables was minor.
5539
5540  Bug Fixes:
5541    Printcap reading code: now handles forward references correctly.
5542     (Reported by:
5543       Klaus Steinberger <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
5544    Ruthless purging of metacharacters passed to filters.  This includes
5545      quotes, backslashes,  and all other even vaugely funny characters.
5546      (Reported by:Bertrand Decouty-INRIA Rennes-France
5547        <Bertrand.Decouty@irisa.fr>)
5548
5549Release LPRng 2-4-2
5550    Missing REMOTEGROUP check in permissions.c
5551      (Reported: Michel Robitaille <robitail@IRO.UMontreal.CA>)
5552    configure.in: Added more robust check for undefined functions
5553      on various systems,  added checks in source code for various
5554      variants: termclear.c, gethostinfo.c
5555      (Reported by: Doug White <dwhite@gdi.uoregon.edu>,
5556        Sven Rudolph <sr1@inf.tu-dresden.de>)
5557    LPQ: status line now too long, truncated it to 79 chars.
5558    LPD: time of day format changed to YY/MM/DD/HH:MM:SS
5559    LPC: autohold and noautohold command changed to 'holdall'
5560      and 'noholdall';  LPQ: autohold and holdall status reporting
5561      added.
5562    lockfile.c: Added #if !defined(LOCKDEV) code to not do locking
5563      on serial devices.
5564      (Reported by: bennett@nomolog.nagoya-u.ac.jp (Bennett))
5565    Printcap printer names: primary printer names starting with
5566      punctuation are now treated as simply entries and not valid names.
5567      This means that they can be referenced as tc=@name, i.e.
5568        @name:if=/whatever
5569        prname:tc=@name
5570    Multiple Server Queues: ss/sv code reworked again - got rid of several
5571      race conditions,  lost files.
5572    Routing filters: added code to handle dropped jobs better.
5573
5574Release LPRng 2-4-1
5575  minor problems with Makefiles, portability fixes.
5576   (Reported by: Michel Robitaille <robitail@IRO.UMontreal.CA>)
5577  malloclist.c error message format wrong.
5578   (Reported by: Jens Thiel <thielj@uran.informatik.uni-bonn.de>)
5579
5580Release LPRng 2-3-14
5581  New Functionality:
5582    Jobs are now sorted by priority.
5583      (Reported by: syl@ecmwf.int (Lennart Sorth))
5584    LPC CLASS option added.  Classes of jobs can now be held and/or
5585      released.  lpc class printer A,B,C would release jobs with
5586      classes A,B,C; lpc class printer J=*form1*  would release jobs
5587      whose job name contained the form1 string.
5588      (Requested by: garyc@eng.dowjones.com (Gary Cender))
5589    Printcap and Configuration :send_failure_action:
5590      when a job fails to be printed or transferred, it is automatically
5591      retried :rt: (:send_try: or configuration send_try) times. A 0
5592      :rt: means infinite retries.  It may be desirable under various
5593      circumstances to have a method of dynmaically deciding if an error
5594      threshold is exceeded or some other action is needed.  The
5595      :send_failure_action: printcap and/or configuration variable specifies
5596      the default action when :rt: is exceeded.  It can have the following
5597      form:
5598        1. The string "success", "abort", "retry", "ignore", "hold"
5599           which will cause the job/spooler to treat as successful,
5600           abort, retry, ignore, or hold the job respectively.
5601        2. A filter of the form: |/filtername.  The filter is executed
5602           with the default set of filter options,  and the number of attempts
5603           is printed to its standard input.  It can print error messages
5604           to standard error, which are placed in the spool error log.
5605           The exit codes JSUCC (0), JFAIL (1 or 32), JABORT (2 or 33),
5606           and JREMOVE (3 or 34), JIGNORE (5 or 36), etc. will force
5607           removal as if successful, retry, etc. as for the text form.
5608    README.nis: new script for creating NIS (YP) databases.
5609      (Contributed by: Sven Rudolph <sr1@inf.tu-dresden.de>)
5610    LPF: modified the -T option, added -D (debug level option)
5611      (Contributed by: Sven Rudolph <sr1@inf.tu-dresden.de>)
5612    LPD cannot be started from inetd.  This functionality
5613      puts a very heavy load on the system and trying to make
5614      it function correctly was very difficult.
5615    Makefile: PREFIX variable defined, to allow overriding default
5616      prefix value.
5617      (Suggested by: Sven Rudolph <sr1@inf.tu-dresden.de>)
5618  Major Fixes:
5619    File Locking:
5620      The code for dealing with file locking and job name collision was not
5621      sufficient to handle the case where multiple jobs were being submitted
5622      simultaneously.  The new code uses the hold file for locking jobs,
5623      in addition to locking the control file.  When a job is submitted via
5624      LPR or forwarding,  the hold file is created, written with the
5625      receiving process PID,  and is then released.  When other processes
5626      try to submit a job,  they will lock the hold file, check for the running
5627      process, and then try anther job if the process is still delivering
5628      the job files.  When all of the job files are delivered,  the process
5629      will then write the hold file with -1, i.e. - a signal that all files
5630      have been delivered.  If a job is submitted by other means, i.e.-
5631      copied directly to the spool directory,  there is no guarantee that
5632      collisions can be avoided.  Note that sometimes hold files will
5633      be left in the spool queue, but these can be clean up periodically
5634      by using checkpc for example.
5635  Bug Fixes and/or Deficiencies:
5636    Added Hold_all variable that is controlled by LPC command -
5637      :ah: printcap entry cannot be overridden now.
5638      (Reported by: garyc@eng.dowjones.com (Gary Cender))
5639    LPD/lpd_control.c: STOP was killing off server;  now it prevents
5640      next job from being started.
5641    common/printjob.c/Fix_string() - missing check for 0 length string.
5642      (Zygo Blaxell <zblaxell@myrus.com>)
5643    Printing filter exit codes 1->5 are translated to JFAIL->JABORT
5644      This makes vintage filters compatible with LPRng.
5645    Find_key() can return a 0 value under extreme circumstances - 0 check
5646      added. (Reported by: Ron Roskens <roskens@cs.umn.edu>)
5647    lpr -l or lpr -b did not get IF filter invoked with -c option.
5648      (Reported by:Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
5649    trailers are not sent to printers; caused by premature close of output.
5650      (Reported and Fix by: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>)
5651    permissions checking once again has a problem - if no match is found
5652      incorrect use of defaults.
5653      (Reported by: QingLong <qinglong@Bolizm.ihep.su>)
5654    LPQ: queue status not reported correctly.  Caused by a memory leak,
5655      and also incorrect buffer length specified to allocation routine.
5656      (Reported by: Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
5657
5658Release LPRng 2-3-13
5659    Linux has inconsistent ncurses (curses.h) and termlib (termlib.h)
5660     definitions for tgetent().  Use only one.
5661      (Reported by Elliot Lee <sopwith@cuc.edu>)
5662    The 'printed 10% of 1000 bytes" message gets scambled when
5663      processed by other systems where the % is interpreted as a
5664      format character by printf.  Changed to 'percent' instead.
5665      (From: Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
5666
5667Release LPRng 2-3-12
5668    waitchild.c does not enable the SIGCHLD signal.  This was causing
5669      problems when a child would die during a read/write operation and
5670      interrupt the read/write operation.
5671    checkpc - now checks to see if the LPD lockfile directory exists,
5672      and creates it if necessary.
5673    getopt.c - strdup() changed.
5674      (Reported by  Brad Greer <brad@cac.washington.edu>)
5675    src/Makefile.in - LOCK_DEV_CFLAGS -> LOCK_DEVS_CFLAGS
5676      (Reported by Klaus Guntermann
5677        <guntermann@iti.informatik.th-darmstadt.de>)
5678    LPD, lpr -p and :pr: filtering.  Documentation claims that LPD will
5679      filter 'p' format jobs through :pr: filter and :if: filter.  It was
5680      not doing it,  and now does.  However, when using a bounce queue,
5681      it will not filter :pr: formats unless a :pf: filter is present.
5682      (Reported by Scott Sutherland <scott@math.sunysb.edu>)
5683    :translate_format: printcap variable, and functionality added for
5684      bounce queues.  A bounce queue can now also modify the job file format
5685      using the :translate_format: printcap entry. For example,
5686      :translate_format=mfpl: would change m to f and p to l format
5687      job files.
5688
5689Release LPRng 2-3-11
5690    MAJOR ADDITIONAL FUNCTIONALITY:
5691    Logger: filter error output is now written to the logger as well as
5692      status information.
5693
5694    lpr -p and LPD: the pr filter support was not updated.  It now invokes the
5695      traditional 'pr' program correctly.
5696      (Reported by: K.D. Meyer" <meyer@uni-trier.de)
5697    LPD/lpd_control.c - reporting duplicate status line information.
5698      (Carl Hilton <chilton@dns2.sac.usace.army.mil>)
5699    LPR: exits with a nonzero error when 0 length job or invalid queue.
5700      (Paul Haldane)
5701    lpbanner.1 and lpraccnt.1 man pages created.
5702      (Carl Hilton <chilton@dns2.sac.usace.army.mil>)
5703    lpq -Pall - sendstatus() returned wrong status.
5704
5705Release LPRng 2-3-10
5706    MAJOR ADDITIONAL FUNCTIONALITY:
5707    routing to multiple destinations, multiple copies, via a bounce queue
5708        A bounce queue can now route jobs to multiple destinations
5709        and/or make multiple copies of a job.  This action is controlled
5710        by the printcap/configuration variable router=filter.
5711        See README.routing and the LPD.8 manual page for details.
5712
5713    Identifiers:
5714        The 'A' control file line is now used to store a 'unique' job
5715            identifier.  This follows a job through the system, and is
5716            used to identify a job.  It can also be used in LPRM and
5717            LPC messages.
5718        The :use_identifier: printcap and configuration variable controls
5719        the addition of this information to the control file.
5720    Job ID Wildcards:
5721        LPRM, LPC now take wildcard entries as well use job numbers and
5722        user IDs for jobs. (Updated LPRM, LPC man pages).
5723    Logger:
5724        Added code to record the actions of jobs passing through the
5725        system.  SetStatus messages now sent to a logger process as
5726        well as recorded in a status file. Added:
5727        printcap/configuration:
5728            logger_destination = host[%port][,(TCP|UDP)]
5729                host%port is destination host%port combination.
5730        configuration:
5731            default_logger_port = 560  - default port for logging
5732            default_logger_protocol = UPD  - default protocol for logging
5733
5734    lpd_rcvjob.c - error message has a missing '%s' entry.
5735        (Brad Greer <brad@cac.washington.edu>)
5736    Link_read() in link_support.c - minor error - zero length read
5737      reported as error, not EOF condition.
5738    lpd: multiple copies (lpr -K option) were causing malformed job control
5739      files to be generated by LPD when it checked them.  Off by one problem
5740      with pointers fixed.
5741      (Reported by: Andrew Leahy <A.Leahy@st.nepean.uws.edu.au>,
5742        details of problem by Dirk Wrocklage <dirkw@uni-paderborn.de>)
5743    cleanup() - exited with erroneous error code when NOT sent a signal.
5744      (Reported by Ed Santiago <esm@lanl.gov>
5745        and Sven Rudolph <sr1@os.inf.tu-dresden.de>)
5746    HOST and REMOTEHOST permissions now can be netgroups, i.e. -
5747      HOST=@netgroup or REMOTEHOST=@netgroup will check to see
5748      if a host in in the netgroup.
5749    permissions.c - Mods by Geoff Ballinger <geoff@chemeng.ed.ac.uk>
5750      These modifications fixed a problem with checking for user
5751      permissions,  and now the permissions 'user' or 'remoteuser'
5752      is checked according to documentation.
5753    REMOTEUSER, REMOTEGROUP added to permissions checking.  Permissions
5754      checking now done in much more rigorous way.
5755    LPD/lpd_rcvjob.c - fixed up hold file removal on bad job submission.
5756    Setup_waitchild() - moved to Initialize(), done for all programs
5757
5758
5759Release LPRng 2-3-9
5760    killchild.c - minor bug on cleanup.  If cleanup called with 0
5761      argument, never killed off children.  Under very rare circumstances,
5762      this resulted in a OF filter process hanging up,  and never exiting.
5763    LPR: the -s option is now silently ignored.
5764      (Jon E. Ferguson" <jon@media.mit.edu>)
5765    ULTRIX has a sys/syslog.h and a syslog.h file, need to use sys/syslog.h
5766      (Per Foreby <perf@efd.lth.se>)
5767    Accounting Filters: the :as: (accounting start) filter returning JREMOVE
5768      did not cause the job to be removed. Fixed.
5769      (Reported by Panos Dimakopoulos <dimakop@cti.gr>)
5770
5771Release LPRng 2-3-8
5772    lpr_makejob.c - not handling -w and -0 (font options) correctly.
5773      (Reported by Jens Thiel <thielj@athene.informatik.uni-bonn.de>)
5774    Comments in sendjob.c updated to reflect reality.
5775      (George Lindholm <lindholm@ucs.ubc.ca>)
5776
5777Release LPRng 2-3-7
5778    lpd.conf default file - updated example configuration values
5779    Documentation miswordings, downright errors, and missing information
5780      corrections and comments added.
5781      (Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
5782    struct fd_set declarations changed to fd_set to make it compatible
5783      with POSIX.
5784      (Reported by Alan Shutko <ats@shep1.wustl.edu>)
5785    use_shorthost flag not working - fixed.
5786      (Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
5787    setup_filter.c - %h in an option string is now expanded to the short
5788      form of the host name.
5789    ROOT perms for filters - added the ROOT_PERMS_TO_FILTER_SECURITY_LOOPHOLE
5790      definition to the src/Makefile, modified common/setup_filter.c.
5791      Added comments to man/lpd.8. Comments by Patrick Powell, mods by
5792      (Jens Thiel <thielj@uran.informatik.uni-bonn.de>)
5793
5794Release LPRng 2-3-6
5795    LPR/lpd_rcvjob.c - snprint() replaced by plp_snprintf()
5796    src/common/defaults.c - erroneous LD_LIBRARY_PATH= and PATH= values in
5797      configuration variables.
5798      (Reported by Jens Thiel <thielj@athene.informatik.uni-bonn.de>)
5799
5800 LPRng 2-3-5
5801    printcap.c - when lpd-perms array gets longer than 40kB or so,
5802      lpd crashes with an segmentation fault when it's getting started.
5803      fixed by: Dirk Wrocklage <dirkw@uni-paderborn.de>
5804    permissions.c, globmatch.c - updated error reporting, and added
5805      check for user's default group when checking GROUP permissions.
5806      (Stefan Monnier" <stefan.monnier@lia.di.epfl.ch> and
5807      Ron Roskens <roskens@cs.umn.edu>) Also, changed strcmp to strcasecmp
5808      to make comparisons case insensitive.
5809    LPD/lpd_control.c - modified error message to better indicate failure.
5810
5811    long job numbers - lpd_rcvjobs.c, cleantext.c, lpr_makejob.c, printcap.c
5812      added the capability to have long (6 digit) job numbers.  This is done
5813      by reformatting the job control file and the job file names.
5814      printcap :longnumber: and configuration longnumber=yes enables this.
5815      Note that :bk: (Backwards compatibility) overrides long numbers.
5816      If a queue is marked :bk: then it will attempt to shorten long numbers
5817      to produce a short number file.  This can be used with a bounce queue
5818      to produce files compatible with the older vintage systems.
5819      As a side effect, tightened up format checking of unlink entries,
5820      and other issues reported by the following folks.
5821      (Lennart.Sorth@ecmwf.int, Desmond Macauley <desmondm@eng.dowjones.com>)
5822
5823    lprm - fixed the removal algorithm so that multiple tags select multiple
5824      jobs.  i.e. - lprm 1 2 3 removes jobs with numbers 1, 2, and 3.
5825      If you do lprm user, all jobs with the tag 'user' are deleted.
5826      This allows much easier job purging,  which is usually why you
5827      are using lprm...
5828
5829    use_info_cache flag - printcap.c(Free_pc()) routine brutally wipes
5830      out all data now.  This will either force the reread or crash the
5831      process.
5832      (reported by Dirk Wrocklage <dirkw@uni-paderborn.de>)
5833
5834    configuration variables: added default_format, default_priority
5835      to configuration as well as printcap variables. lpd.conf.5 and
5836      printcap.5 man pages have been updated.  Apparently they were never
5837      documented in man pages.
5838      (reported by Stefan Monnier <stefan.monnier@lia.di.epfl.ch>)
5839
5840    common/sendjob.c:  error reporting for DATAFILE was incorrect.
5841      (reported Brad Greer <brad@cac.washington.edu>)
5842
5843    :send_data_first: printcap and configuration variable added.
5844      causes data files to be sent to the destination first, before
5845      control files.  (Supports horrible spoolers that violates RFC1179)
5846      (suggested Brad Greer <brad@cac.washington.edu>)
5847
5848    :connect_grace#nn: printcap and configuration variable added.
5849      Klaus Steingerger reports that some printers require a grace
5850      period between connection attempts.  This variable provides
5851      a suitable delay.  Also, the Clear_timeout() routine now
5852      restores the ORIGINAL signal handler.  This means you can
5853      only have one timeout pending at a time - which makes sense
5854      in this implementation.
5855      (reported and mods by Klaus Steinberger
5856       <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
5857
5858    globmatch.c - a bug with checking for upper and lower case chars.
5859      (reported by Per Foreby <perf@efd.lth.se>)
5860
5861Release LPRng 2-3-4
5862    typos in the documentation - fixed
5863
5864Release LPRng 2-3-3
5865    getcfng.c - "use_info_cache" entry out of order.
5866     (Alan F Lundin <aflundi@sandia.gov>)
5867
5868Release LPRng 2-3-3
5869    LPR and :qq: printcap entry,  use_queuename configuration information
5870    Added 'use_queuename = no' to the common/default.c file - the
5871    use_queuename will force control files to have the 'Qqueuename' entry
5872    placed into them.  The :bk: (backwards compatible) entry can be used
5873    to override this when sending to non-LPRng systems.  When receiving
5874    a job and use_queuename is TRUE,  then LPD will add the name of the
5875    spool queue to the control file.
5876
5877Release LPRng 2-3-2
5878    common/defaults.c - removed :xt: from the printcap defaults.
5879    common/getcnfinfo.c - added "true", "all", "false" keywords for flags.
5880    common/termclear.c - for LINUX, added include <termios.h>
5881      (Avery Earle <ae@play.psych.mun.ca>)
5882
5883Release LPRng 2-3-1
5884    printcap.5 :xt: entry updated
5885    bk, qq, and bounce queue filter interaction: printjob.c modified to
5886        add Queuename information for filters if :qq: option or Q entry
5887        in job file.
5888
5889Release LPRng 2-3-0
5890    Minor rewording on printcap.5 man page.
5891    common/termclear.c - defined(solaris) changed to defined(SOLARIS)
5892        (Andrew Richards <physajr@phys.canterbury.ac.nz>)
5893    common/printcap.c, CHECKPC/checkpc.c - subtle bug when reading
5894        printcap information from a filter AND the 'oh=host' specified
5895        AND the host is not the current host.  Fixed.  In addition,
5896        checkpc will not create queue entries for queues not used/defined
5897        on the current host.
5898        (Dirk Wrocklage <dirkw@uni-paderborn.de>)
5899
5900Release LPRng 2-2-9
5901    printcap.c - malformatted printcap entries ending with a \
5902    at the end of the file are now accepted.
5903
5904Release LPRng 2-2-8
5905    LPR now uses a reasonable size buffer when copying files.
5906
5907Release LPRng 2-2-7
5908    lpq:  back to the previous format!
5909      lpq -s - does the very short format
5910      lpq    - prints short form of detailed information
5911      lpq -llll... - each l doubles status information
5912    lpq.1 - man page updated.
5913    printcap, lpd.conf: send_failure_action - added a 'hold'
5914      keyword that will hold the job on error rather than deleting it.
5915      updated printcap.5, lpd.conf.5 man pages
5916    lpd_jobs.c - added checks for filter non-zero status exit.
5917    configure.in - printf("%s",sys_siglist[0]) added
5918      (<harlan.stenn@pfcs.com>)
5919
5920Release LPRng 2-2-7
5921    lpq:  by default, a very very short format-  pr@host:(status stuff) NN jobs
5922        lpq -l  -  short, verbose format
5923        lpq -l -l or lpq -ll - longer format
5924    lprm: was not removing all jobs when 'lprm all' specified.
5925    lpr.1 man page: priority of jobs is A (highest) to Z (lowest)
5926
5927Release LPRng 2-2-6
5928    lpr: -K option did not have ':' in getopt options string.
5929      (Klaus Steinberger <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
5930    lpr: -# has been readded, in spite of my better judgement, to be
5931        compatible with antique LPR systems.
5932    lpd: 'sending job to...' message error
5933      (Dwaine C. Gonyier <virtual@panthra.catt.ncsu.edu>)
5934    printcap.c, getcnfginfo.c - ordering of parameters not alphabetical.
5935      (Ron Roskens <roskens@cs.umn.edu>)
5936    lpr, configuration - check_for_nonprintable code got mushed,  fixed
5937      now; the :xt: (check text) printcap flag added as well. man page fixed.
5938      (Ole Benner <olb@kom.auc.dk>)
5939    configure.in- library check fixed, added additional library check
5940      (Harlan.Stenn@pfcs.com)
5941    lpc - the 'lpc lpd xx' operation set the current printer to xx. Fixed.
5942      (Jos Backus <jos@oce.nl>)
5943
5944Release LPRng 2-2-5
5945    ** changed the bqfilter flag to bq=destination_queue
5946        This now forces all input to be passed through the filter.
5947        Changes in the bq filter information as well.
5948    Bounce_filter: removes temporary bounce queue file on exit unless
5949        debugging is high level.  bounce queue file name is bfAnnnHost,
5950        i.e.- has same format as a job file.  This makes job related
5951        processing easier to debug.
5952    lpc - Updated queue status display
5953      lpc status now shows autohold status
5954      lpc noautohold now restarts printer on 'NOAUTOHOLD' command
5955    lprm with no options removes first removable job in queue
5956      This is compatible with BSD lprm functionality
5957    configure - GCC version checks moved to start of configuration
5958        added checks for sys/utsname.h, utsname.h
5959    common/gethostinfo.c - uses sys/utsname.h
5960        configure.in has check added for utsname.h
5961    lpd - printjob now checks for exit status of filters - should
5962        terminate now if filter has bad exit status.
5963        (Note: this may not be bombproof in all situations.)
5964    printcap and configuration - connect_retry was defined as connect_try
5965        documentation fixed as well.
5966    CHECKPC- checkpc -r -A nD now removes all job related files older than
5967          n Days.  This can be put into crontab and run periodically.
5968    printcap :ah: (autohold) now operational.  Note that LPC will
5969        override printcap default.  lpc status now indicates if autohold
5970        is on.
5971
5972Release LPRng 2-2-4
5973    :bk: (backwards compatible) flag now causes removal of non-BSD compatible
5974        control file entries as well as modifying the order.
5975    :qq: (Queuename in control file) flag is now  overridden by :bk: flag.
5976        This will now generate Berkeley compatible job files.
5977    lpr - improved 'connnection failed' message format.
5978    accounting_server and accounting_check added for accounting.
5979        printcap.5, README.accounting,  and other documentation updated.
5980
5981Release LPRng 2-2-3
5982    Once more the portability/bugfix Gods need yet another sacrifice.
5983        BSDI V2.1 setreuid() returns erroneous error codes - setuid.c
5984        fixed yet again...  I suspect other BSD derivatives to have same
5985        problem.  Sigh...
5986    cleanup() now unblocks signals before exiting.
5987    Print_open() - better status messages on open failure.
5988
5989Release LPRng 2-2-2
5990    TESTSUPPORT: removed lpf generation
5991    Perms_check(): missing ntohl(HostIP), needed for host order of addresses.
5992    Lock_fd(): - saves errno error codes and returns them correctly
5993    Prefix_line in malloclist(): - copy now done in correct order
5994        fixes print queue bug.
5995    Accounting Filters:
5996        1. the filter command is not passed as an argument to the accounting
5997           filter.  This solves some problems with shell script filters,
5998           as the last filter command would have the form:
5999             filter -H... -a|filter |filter
6000        2. Accounting information now logged at start and end of job.
6001    GROUP Permissions: permissions.c now checks to see if a specified
6002        group exists first, using getgrnam(), then tries wildcard
6003        search next.
6004    Permissions: IP=host/netmask format updated- allow /n to be n bit mask
6005        i.e. - 130.191.163.12/16 -> 130.191.163.12/255.255.0.0
6006
6007Release LPRng 2-2-1
6008    LPF filter: added source code to the LPRng main distribution.
6009        This provides a passthrough filter for most applications.
6010    README.printcap: updated to reflect use of lpf filter and
6011        banner printing
6012    LPRM/LPD: lpd restarts printing if the active job is removed.
6013    LPQ: more robust handling of bad printcap entries
6014    LPD: attempt to solve problems of filters which print to
6015        serial devices hanging because the device has pending
6016        output, has been sent a ^Q to stop output,  and has not
6017        received a ^S to restart.  Uses tcflush() to flush serial devices.
6018    LPR: added a 'use_shorthost' configuration and printcap variable
6019        to force the use of short host names for print job control and data
6020        files.  The code was present in LPR,  but not enabled.
6021        Update lpd.conf.5 and printcap.5 man pages.
6022    Debugging Flags: added keyword and flag capability.  For example:
6023        -Dthis,that@  can be used to set the 'this' flag and clear the
6024        that flag.  see common/parsedebug.c for details.
6025    NGPRINTER environment variable added. Used to override PRINTER environment
6026        variable.  Allows one format for PLP/LPR/Solaris, one for LPRng.
6027        (marty leisner@sdsp.mc.xerox.com)
6028    LPC: command of form 'status printer@host' was not formatted correctly.
6029        (Jarrod Douglas <jarrod@cs.curtin.edu.au>)
6030    man/printcat.5 - added a functional listing as well as alphabetical.
6031        (Sherwood Botsford <sherwood@space.ualberta.ca>)
6032    LPD, LPQ: added termination error messages to status output.
6033        Details for job failure now available.
6034    printcap :qq: and lpr -Q option now fully operational.
6035         lpr -Q or :qq: printcap field sets Qqueuename in job file;
6036         lpd bounce queue will add Qqueuename line to the control file.
6037
6038Release LPRng 2-2-0
6039    Updated README files.
6040        README.1st     - overview
6041        README.install - much more complete
6042        README.lpd.conf - explains lpd.conf
6043        README.lpd.perms - lpd permissions structure listed
6044    man/lpr.1 - missing -k information added.
6045    man/lprm.1 - fixed typos
6046    man/lpd.perms.5 - lpd.conf documented
6047    DOC/Tutorial - added additional information
6048    DOC/Install - extended to include more testing and installation
6049        details.
6050    strdup() changed to plp_strdup() to avoid problems with C library.
6051    configure.in - check for sys_siglist[] improved.
6052    src/commmon/decodestatus.c - fixed problem with Solaris 2.5
6053        and sys_siglist[]
6054    Makefile - added default target to install default lpd.conf and
6055        lpd.perms files;  prototype files added as well.
6056    man/lpd.conf.5 man page added
6057    src/common/permission.c: added a SERVER key, to allow restriction
6058        to users on the server.
6059    checkpc - truncation now done on log, accounting, and status files.
6060    LP_SIMULATION - SVR4 simulation with lp.sh and lpstat.pl scripts
6061
6062Release LPRng 2-1-3
6063    waitchild.c - race condition with malloc() in the SIGCHLD handler
6064      would result in rare, very very rare problems.  Data structures
6065      are now pre-allocated.
6066    LPD/lpd_jobs.c - WIFSTOPPED and WIFSIGNAL checks done improperly.
6067      Shows up in OSF1 based systems.  The test is now done correctly.
6068    AIX portability - added sys/select.h to include list
6069    LPQ status display modified to be consistent-
6070      Filter status:  -> Filter_status:
6071      Now all the comment and information lines have a : at the end
6072      of the first field.  This makes parsing by perl/awk, etc. simple
6073      Note that the Rank Owner ... line still does not have a colon
6074    joost@cadlab.de - minor fixes for Apollo DN4500 and portability
6075      TESTSUPPORT/Makefile.in, as well as minor fixes in portable.h
6076
6077
6078Release LPRng 2-1-2
6079    STATVFS typeo corrected in in configure.in, portable.h, freespace.c
6080      (curt@ltpmail.gsfc.nasa.gov (Curt Tilmes))
6081    Missing VARARGS declaration for setstatus() in lp.h
6082      (Marc Baudoin <Marc.Baudoin@hsc.fr.net>)
6083    Makefile.in (in general) - fixed realclean mostlyclean targets
6084      (Paul Eggert <eggert@twinsun.com>)
6085    setproctitle() - check made in configure, and if not present
6086      the proctitle.c code is used. (Marc Baudoin <Marc.Baudoin@hsc.fr.net>)
6087    Makefiles - realclean and distclean targets did not remove Makefile
6088        (Paul Eggert <eggert@twinsun.com>)
6089    Missing read permissions on various files
6090        (Paul Eggert <eggert@twinsun.com>)
6091    configure.in (CFLAGS): Use a more accurate test to decide
6092      whether we are using GCC version 2.4.5 or earlier.  The old
6093      test didn't handle GCC snapshots correctly.
6094      (Paul Eggert <eggert@twinsun.com>)
6095
6096
6097Release LPRng 2-1-1
6098    CHECKPC- added test for the printcap 'ps' - printer status file
6099      - fixed up test for printer device, now ignores remote and filters
6100      - added 'checkpc -s' option to not create/check printer status file
6101    common/sendjob.c - Bounce Queue Filters are only invoked by the server;
6102        added a check for Interactive and printcap :bqfilter: flag BOTH
6103        set before invoking filter.  This prevents clients from invoking
6104        filters.
6105
6106Release LPRng 2-1-0
6107    Added 'rs' (time between spool queue rescans) printcap entry
6108    Added 'oh' (option for host) printcap entry
6109    Added check for NULL printcap pointers.  Printcap files entirely
6110        consisting of comments and empty lines are now handled
6111        correctly.
6112    Added ntohl() and htonl() calls to fix IP addresses for permissions
6113        checking.  This showed up on X86 systems.
6114
6115Release LPRng 2-0-9
6116    Patch to make sigsetjmp() work correctly on Solaris.  Sigh...
6117
6118Release LPRng 2-0-8
6119    Solaris 2.5 requires sigsetjmp() and siglongjmp() for alarms and
6120        timeouts to work reliably.  Note that GCC now does not put out
6121        warnings about 'variables may not be restored after longjmp'
6122        C'est la vie, c`est le guerre...
6123    Documented getting permission database with a filters, allowing
6124        dynamic checking of a database.
6125
6126
6127Release LPRng 2-0-7
6128    Fixed up the setuid() code yet again - portablility issues on
6129        BSDI and FreeBSD - need to do a setuid() operation first.
6130
6131Release LPRng 2-0-6
6132    Removed default non-blocking open() operations;
6133        added printcap 'nb' (Nonblocking_open) variable to allow
6134        nonblocking open for specific devices
6135    Updated man pages and DOC files to reflect new open() capabilities
6136
6137Release LPRng 2-0-5
6138    getuserinfo() was not using the original RUID value.
6139    Fixed device locking again,  this time to do a fallback to
6140        fcntl() based locking if TIOCEXCL is not functioning
6141    Removed MFLAGS from Makefiles, also put in cleaner test for GNU Make
6142    The sleep() implementation on linux is defective; replaced
6143        by a plp_sleep() using select().
6144
6145Release LPRng 2-0-4
6146    src/cleantext.c - Check_format() was too strict in checking
6147        hostnames - now allow '-' as well as . and _ in name.
6148    configure.in - SGI IRIX configuration needs SVR4 definition forced.
6149    added more specifics for solaris
6150
6151Release LPRng 2-0-3
6152    - mostly portability fixes
6153    man/Makefile.in - removed $(FILES) targets
6154        did updates in a 'sane' manner
6155    Fixed missing declarations of functions for fussy compilers.
6156    Fixed CHECKPC/checkpc_port.c - SunOS4.1.4 has two versions of
6157        stty - /bin/stty and /usr/5bin/stty
6158        forced use of /bin/stty
6159    configure.in - added gcc version check,  fixed up CFLAGS
6160    HPUX portability kludges -
6161        1. O_NDELAY and O_NONBLOCK interact - removed one of them
6162        2. Need to use fcntl() after open to fix the non-blocking
6163            read operation.
6164    device locking now works on Solaris 5.4
6165    checkpc- added a couple of sanity check functions for internal
6166        tables - Check_pc_list() and Check_config_list()
6167        discovered a couple of entries in wrong order (bp was one)
6168        that prevented use of banner printing.
6169
6170Release LPRng 2-0-2
6171    Modified configure to use config.guess; fixed config.guess as well.
6172        - config.guess did not recognized BSDI systems,  and exited
6173            with an error.
6174    Fixed configure.in to force library order if necessary.
6175    Ripped out several SVR4 dependencies; src/killchild.c
6176    Filters + Bounce Queues - added filtering capability
6177     printcap variables - bqfilter (flag)
6178     If a bounce queue (one that sends files to a remote printer/host)
6179     has filters speicified, and the :pqfilter: printcap flag is set,
6180     the data files will be passed through a filter,  if there is a
6181     filter for that format.  Updated printcap.5, lpd.8 documentation,
6182     as well as DOC/Intro.
6183
6184Release LPRng 2-0-1
6185    configure.in -
6186        WARNING ** gcc version 2.4.5 and below
6187        The -O option produces erroneous code several places.
6188        configure.in has been modified to remove the -O option.
6189    configure.in - added explicit check for elf.h - now defines
6190        SVR4 if the file is present (see autoconf documentation
6191        for test).  Compatibilty check.  Updated CFLAGS with define
6192        for HPUX and uses the @CFLAGS@ edit in Makefiles.  This
6193        solves a problem when configure sets CFLAGS and the
6194        default GNU Make .o.c rule set needs to be used.
6195    LPRM: If a user has LPC CONTROL permissions, he can now remove
6196        jobs from a queue.
6197    Makefile.in, Makefile - Added various GNU compatible targets
6198        such as clean, dist, reallyclean, etc.
6199    Fixed the man/Makefile to better update the man pages when
6200        installing them.
6201    checkpc -T line : fixed up the STTY reporting to be more robust
6202        should work with SVR4 better.
6203    LPR: added locale initialization; printable checks now use
6204        8 bit characters if the locale has been enabled.
6205    O_NONBLOCK|O_NBLOCK - these both must be set on a SVR4 system to
6206        do a non-blocking open.  This might be considered a documentation
6207        feature in some circles.
6208    FreeBSD defines: various files have had #ifdefs for FreeBSD added.
6209    Accounting: modified the default accounting string to add the
6210        control file name;  allowed the accounting filter to exit
6211        with error status and write an error message.
6212
6213Release LPRng 2-0-0
6214    Baseline Release Version
6215
6216Release LPRng 1-2-6
6217    PERMISSIONS: permissions checking was defective- correct values now
6218     used.
6219    LPC: usage message updated
6220    Error reporting: connection permission errors reported to connecting
6221     system now.
6222    LPR: now reports server error msgs to user on STDERR.
6223
6224Release LPRng 1-2-5
6225    PERMISSIONS: lpc operations split, 'C' are control, 'S' are status
6226     this allows 'lpc status' command to be used by non-privileged users
6227     Updated documentation to reflect this change as well.
6228    Updated lpq, lpc, lprm -V option to be less verbose
6229     by default;  -V -V will show copyright information.
6230     ("Marty Leisner" <leisner@sdsp.mc.xerox.com>)
6231    Control file format: allowed first 'N' line to appear before
6232     data file information, and stuck in middle of control file.
6233     This makes it compatible with other LPR implementations.  Sigh.
6234    If a filter is not available,  this is logged in status and the
6235     job is discarded.  This prevents a job with bad format information
6236     locking up the printer queue.
6237    Filter program lookup in printcap entry has been fixed to be a little
6238     more effective.
6239    Fixed checkpc and setproctitle() to work with FreeBSD
6240     (Richard Letts  R.J.Letts@salford.ac.uk University of Salford)
6241
6242Release LPRng 1-2-4
6243    Harlan Stenn <Harlan.Stenn@pfcs.com>
6244    termclear.c - there is an interesting problem with termcap.h, curses.h,
6245      terminfo.h.  On some systems you do not want to include curses.h,
6246      but not terminfo.h and termcap.h.  I recommend putting guards in the
6247      terminfo.h include file so you can include it multiple times without
6248      redefinition problems.
6249    curt@ltpmail.gsfc.nasa.gov (Curt Tilmes)
6250      - removed O_NDELAY from various open statements
6251    Makefile.in - removed ${SRC}/src, etc. to allow compilation
6252      in separate directories.
6253
6254Release LPRng 1-2-3
6255    Fixed lprm -a flag;  documentation error as well
6256    common/jobcontrol.c - erroneous error field update
6257    miscellaneous errors reported by users.
6258    SVR4 - added sys/systeminfo.h, sysinfo() call replace gethostinfo()
6259    printcap - added 'qq' (save queue name in job file)
6260
6261Release LPRng 1-2-2
6262    This sounds ridiculous,  but there is yet ANOTHER problem with
6263    implementing portable file locking.  It turns out that some systems
6264    allow file locking only if the files are opened R/W, no APPEND.
6265    This is only a problem in pr_support.c;  the permutations and
6266    combinations of files, devices, etc., are too much to deal with
6267    algorithmically.  An new printcap flag 'lk' (lock LP device) is
6268    introduced to handle this.  By default, no file or device locking
6269    is done.
6270
6271Release LPRng 1-2-1
6272    Martin Forssen: maf@dtek.chalmers.se or maf@math.chalmers.se
6273     - fixed an erroneous test in checkremote.c - missing data
6274     initialization in LPD/lpd_jobs.c, LPD/lpd_status.c
6275     - common/getqueue.c off by one error - LPD/lpd_remove.c - cfpp
6276     uninitialized in Get_queue_remove()
6277    hagberg@mail.med.cornell.edu (Eric Hagberg) A/UX portability
6278     fixes in portable.h Fixed lpr, lprm MAN pages;  fixed usage
6279    messages.  Added CONTROL permission checking for LPRM operation;
6280    i.e. - if you have CONTROL permission you also can remove files.
6281
6282Release LPRng 1-2-0
6283    Documentation - DOC/Intro and DOC/Install
6284    Filters: CTI-ifhp-1.1.1 lp-pipe-1.0.0  lp-support-1.0.0 psfilter-1.0.2
6285    Fixed a minor bug in LPD/lpd.c - geteuid() missing
6286
6287
6288Release LPRng 1-1-2
6289
6290    Documentation (Introduction, and Installation) added
6291    psfilter-1.0.1 added to FILTERS
6292    Added test for signal.h to configure.in.
6293    reported by Martin Forssen <maf@math.chalmers.se>
6294      fixed missing bounds check in common/printcap.c,  put install-sh in
6295      directories needed (autoconf does not fix up $(INSTALL) correctly)
6296      lookup loop for remote hosts in common/checkremote.c
6297      Link_listened(void) missing in include/lp.h
6298
6299Release LPRng 1-1-1
6300
6301    Added lp,lpsched, lp-pipes support
6302    Fixed a bug in the job renumbering code in lpd_rcvjob.c; always started
6303    with 0, instead of next job in sequence.
6304    Fixed a bug in lpd_rcvjob.c, additional 0 ACKS being sent.
6305    Fixed a bug with the filter options;  added $0, $-, $'
6306    Fixed the default filter parameter list - accounting file at end
6307
6308Release LPRng 1-1-0
6309
6310    Cleaned up all sorts of minor problems with duplicate variables
6311        being declared in two places.
6312    Hopefully cleaned up the problems with Errormsg() not getting
6313     sys_nerr; sigh.
6314    Fixed accounting. Again. Sigh.
6315    Added (fixed) support for host%port
6316    Added install/test documentation.
6317
6318    Added even more portability tests to checkpc. - device locking,
6319        stty, file locking.
6320
6321Release LPRng 1Alpha9
6322
6323    Accounting has been added.
6324
6325    Fixed up a very very very rare problem with file locking by
6326    redoing some tests.
6327
6328    Added the checkpc -T serial_line option
6329    This performs a whole series of portability tests, all of which
6330    need to pass.
6331
6332    Include file problems strick again: fixed up the right set.
6333
6334Release LPRng 1Alpha8
6335
6336    Sun Aug  6 11:07:51 PDT 1995 Patrick Powell
6337
6338    Renamed files with pathnames greater than 14 chars to shorter ones;
6339    Antique file systems strike again.
6340
6341    Added 'form' and 'hold queue' capability; modified the control and
6342    job files; Renamed the release name to be consistent with GNU standards.
6343    Fixed problem with compatibility between SUN and other systems.
6344    Added LPR -Q flag, LPR -k flag to make it work.
6345
6346    Sun Jul 30 09:09:49 PDT 1995 Patrick Powell
6347
6348    Discovered some problems with the job printing code in LPD/lpd_jobs.c,
6349    re-editted it and put in some stronger checks.
6350
6351    Modified the spool control file format slightly.
6352    This did not work as well as I thought it would in the overall design;
6353    now the spool control file can have any number of different types
6354    of entries for future expansion, i.e.
6355    printing_disabled   1
6356    redirect            printer@host
6357
6358    Several rather silly coding errors in various places that turned up
6359    when a code checkout program was run: if/then not being executed,
6360    etc. etc.
6361
6362    Fixed up the configure.in file to use the old dnl, socket, etc. libraries.
6363
6364    man/Makefile and src/Makefile modified to use INCLUDE=.. so that configure
6365    can be run from another directory.  This is very very strange autoconf
6366    dependency,  but who cares, as long as it works.
6367
6368    Fixed up a whole minor mess of writes and timeout interactions.  Who would
6369    have guessed at this interaction?  Created a couple of utility functions
6370    (Write_fd_str(), Write_fd_len()),  and timeout (Set_timeout(), Clear_timeout())
6371    routines.  These assume that writes will be done with timeouts;  all places
6372    where writes are done have been surrounded by Set_timeout, Clear_timeout.
6373
6374Release LPRng 1Alpha7
6375Mon Jul 24 09:29:15 PDT 1995 Patrick Powell
6376
6377    Changed the Makefile 'TARGET' name to avoid conflicts with other
6378    Makefiles... sigh...
6379
6380    In link_support.c/Link_send(),  the original code was using
6381    several writes to send a line;  this has been modified to use
6382    a single write where possible.  Apparently some implementations
6383    of LPD code expect the command lines to be sent as a single
6384    TCP write operation, and do not look for the \n terminator.
6385
6386    Removed the 'lorder/tsort' from Makefile, and hardcoded the
6387    library file order.  This provides a simple form of portability,
6388    but will require updates to the Makefile if a new library file
6389    is added.
6390
6391    Added better tests for sys_errlist and sys_siglist definitions.
6392
6393    Moved all of the configuration information to the root level;
6394    this fixes a bug with the autoconf code that cannot handle
6395    more than one level of directory structure.  You can now
6396    compile the LPRng software in another directory by using:
6397    cd LPRng.<version>; SRC=`pwd`; \
6398    cp configure $DEST; cd $DEST; configure --srcdir=$SRC; \
6399    make all
6400
6401    Modified the top level Makefile to use the GNU Make -C directory
6402    capability.
6403
6404    Fixed Send_job() to make it more robust in the face of protocol
6405    errors.  The numbers of times a job is retried is set by the
6406    Connection_retry value.
6407
6408    Modified the LPC status reporting to make it clearer.
6409    Removed a redundant error message.
6410
6411Release LPRng 1Alpha6
6412Thu Jul 20 19:23:03 PDT 1995 Patrick Powell
6413
6414    Reorganized the auto configuration code so that it is at the top
6415    level of the distribution.  Added top level MAKEFILE with directory
6416    recursion.
6417
6418    Separated out default printcap and configuration initialization,
6419    put them in src/default.c
6420
6421    Fixed up some minor 'lint' level errors.
6422
6423    Update man pages.  Fix up installation so that VERSION information
6424      is put in the MAN page source.
6425    Editted MAN pages heavily in light of comments from people.
6426
6427    Clean up some code in printcap.h, printcap.c, lp_config.h, getconfig.c
6428
6429    Fixed a missing check for null string with STRCMP in src/getqueue.c.
6430    Considered using safestrcmp() for this reason; checked most places;
6431    safe or appear to be safe.
6432
6433    Modified the format for LPQ status information,  added more detail
6434    about the printer status.
6435
6436    Added -Pprinter option to LPD to simply start and run a spool queue
6437    server.  This allows debugging of filters much easier.
6438
6439    Added bk-of-filter-options and bk-filter-options to provide compatibility
6440    with old style filters.
6441
6442    Fixed up a lot of minor portability issues with Solaris2.4, using the
6443    SUN Soft C compiler.  Fixed fumble in gethostinfo.c - will die if
6444    it cannot find the local host name; this is very bad and should be
6445    immediately fatal instead of dying later.
6446
6447    Fixup the the TESTSUPPORT/Makefile to be a little more intelligent.
6448    Also, put in guards to make sure that you have GNU Make.  This appears
6449    to be essential for sanity reasons alone.
6450
6451Release LPRng 1Alpha5
6452Mon Jul 17 10:57:49 PDT 1995 Patrick Powell
6453
6454    ********* BSDI *************
6455    Literally hundreds of questionable items were reviewed, fixed
6456    or modified.  The 'snprintf' function was renamed to 'plp_snprintf'
6457    in order to avoid conflict with the BSDI/GCC snprintf functions.
6458    Fixed up some questionable uses of snprintf, changed to sprintf.
6459    Discovered an incredibly vulgar behaviour in strncat(),  and
6460    fixed up its uses.  Strncpy will clobber all information in string;
6461    double checked its uses where possible.
6462
6463Fri Jul 14 08:22:03 PDT 1995 Patrick Powell
6464    Fixed up configuration file reading. Was always using default
6465    values.
6466
6467Fri Jul 14 08:23:06 PDT 1995 Patrick Powell
6468    LPD status reporting did not read the printcap 'st' status file.
6469    Now reads the file and reports information using short form or
6470    long form as needed.
6471Version LPRng-3.8.20 - Tue Jan 7 09:18:15 PST 2003
6472
6473  The lpd.conf now has (EMPTY STRING) for defaults which are
6474  empty strings... My Bad.  Patrick
6475
6476  At the request of Karl Kopper <karl@unfiw.com> I reviewed the issues
6477  of queue starting,  polling the queues for done jobs, and other
6478  issues.  A small side effect of this is that the LPD server process
6479  now starts printing processes.  This is actually beneficial as it can
6480  now limit the total number of printing processes and allow some
6481  LPQ/LPC/LPR etc actions. Here is a summary of the current operation
6482  and the options that control it:
6483   Options:
6484      lpd_force_poll - forces a check of the spool queues, even when there
6485        is most likely no reason to.  Used when you have some REALLY odd
6486        programs running that will directly manipulate the LPD spool queues
6487        and you do not want to have to connect to the server.
6488        (default is OFF).
6489     lpd_poll_time - interval in secs between checking queues for work.
6490        Done if there is some reason to suspect that some spool queue
6491        had problems and might need to be restarted.  This also handles a
6492        race condition where a job arrives just as the process servicing
6493        the spool queue exits.
6494        (default is 5 minutes)
6495     lpd_poll_start_interval - if there are spool queues which need service,
6496        fork up to 'lpd_poll_servers_started' processes at a time and then
6497        wait for lpd_poll_start_interval seconds before forking more.
6498        This prevents the deadly situation where the LPD server is started
6499        and in turn  starts a gizillion process; the rc starupt scripts
6500        may fail because there are no free processes (I kid you not on this
6501        one, it drove me nuts trying to find out why the system would crash
6502        ONLY when LPD ran with NO debugging - the IO caused it to slow down
6503        enough so that the other scripts could run).
6504        (default now 1 second)
6505     lpd_poll_servers_started - maximum number of processs to fork to be
6506        spool queue servers at a time.  this prevents the massive forking a huge
6507        number of processes at once.
6508        (default now 5)
6509
6510    When you send a job via LPR, the LPD server forks a 'service socket'
6511    process to handle job reception;  in previous versions after receiving
6512    the job the process would then call Do_queue_jobs() to take on the
6513    duties of the 'handle the jobs in the spool queue' process.  In
6514    this version the 'service socket' process sends a 'start queue'
6515    request to the LPD server and then exits.  The LPD service will
6516    then fork a process to become the 'handle the jobs' process.
6517    Similarly, when an lpc operation needs to start a 'handle the jobs'
6518    process,  a message is sent to the LPD server to start the process.
6519
6520    While there is no real difference in performance on lightly loaded
6521    systems,  there is a big difference on heavily loaded systems.  Now
6522    the LPD server can control the total number of active spool queues
6523    much easier,  and the system does not get overloaded as easily.
6524
6525     Also, the LPRng server does not clobber the system at startup
6526     time as badly now.
6527
6528     By the way,  queues which are started or have jobs put in them
6529     by LPC or LPR have priority over queues that are started by the
6530     LPD process looking for work.
6531
6532  Keith ("HP Printer Dies Horrible Death") Rinaldo
6533  <rinaldok@egr.unlv.edu> has reported that some HP printers lock
6534  up and do not report status, etc., and display a nasty low level
6535  error message on the printer console such as 7900FE.  The IFHP
6536  filter or LPD would sit there waiting for a response.  The 'keepalive'
6537  TCP/IP facility does not solve this problem,  as sometimes the
6538  TCP/IP stack is OK but the job handling code (i.e. - print engine)
6539  is non-functional.  You need to try to get a response from the
6540  printer,  which is what the IFHP filter does.
6541
6542  NOTE: send_job_rw_timeout default value is now 0 (no timeout)
6543
6544  In order to not surprise new users,  the default value is now 0, i.e.-
6545  no timeout.  Details below.
6546
6547    The send_job_rw_timeout is now used to set a maximum time that the
6548    network (or parallel port or serial port) connection will be
6549    'inactive', i.e. - no data input and not available for data output.
6550    When the timeout expires the job will terminate with a JTIMEOUT status,
6551    which will be treated as a JFAIL status.
6552       /* LPRng internal        process exit status */
6553       #define JTIMEOUT 43      /* 12 timeout */
6554    
6555    The IFHP filter (ifhp-3.5.11) now has a similar 'send_job_rw_timeout'
6556    option that has the same effect as the LPD 'send_job_rw_timeout'.
6557    If the file descriptor used to communicate with the printer is
6558    inactive for this period of time,  then the IFHP filter will exit
6559    with a JTIMEOUT error code, which will be treated as a JFAIL status.
6560
6561
6562Version LPRng-3.8.19 - Thu Dec 5 12:34:45 PST 2002
6563  Check_for_missing_files was not writing control file.
6564  (Spotted by Keith ("Wanna bet on that?") Rinaldo <rinaldok@egr.unlv.edu>
6565
6566Version LPRng-3.8.18 - Mon Dec 2 12:08:34 PST 2002
6567  Added the 'fifo' option  - this now makes LPRng handle
6568  one incoming job at a time in FIFO order.  If you send
6569  jobs A B C then they get delivered in order A B C.
6570  For users who MUST have sequential delivery of jobs.
6571
6572  Some Linux distributions set 'unlimited' resources for all
6573  parameters, such as user processes.  Added limit of 1024
6574  processes for such cases as the system will die a horrible
6575  death at startup.
6576
6577
6578Version LPRng-3.8.17 - Sat Oct 26 20:11:28 PDT 2002
6579  Found a race condition between LPD printing, LPRM, and LPC actions
6580   that would cause LPD to stop printing if you removed or did
6581   an LPC action on a job.  After a bit of thought, decided that
6582   the job would get moved or removed anyways.  Sigh...
6583   But you might get a bogus error message about 'cannot
6584   find id' as the job hold file has been removed.
6585
6586Version LPRng-3.8.16 - Mon Aug 12 15:26:05 PDT 2002
6587
6588  lpr now honors :mx=xx values so you can check job size
6589  before you send it.
6590   (Suggested by:  Rick Cochran <rcc2@cornell.edu>)
6591
6592  configure --disable-werror removes the -Werror option from CFLAGS.
6593   (From the wish list of: Rick Cochran <rcc2@cornell.edu>)
6594
6595  Bad incoming jobs are removed.  You do not get the jobs
6596  left in the queue as errors.  Note - spoolers will
6597  keep trying to send jobs even when they get error and
6598  sit in an endless loop.  No solution for this one except
6599  to get a better print spooler or whatever...
6600
6601Version LPRng-3.8.15 - Sun Aug 11 13:11:48 PDT 2002
6602  
6603  Remove_done_jobs
6604    - checks to see if the INCOMING flag is set BEFORE
6605    it checks to see if there is an error and only checks
6606    for the data files if the ERROR or DONE flags are set.
6607    This removes a race condition.  It was bloody obvious
6608    when I looked at it... I wonder why I did not see it
6609    before?
6610
6611Version LPRng-3.8.14 - Tue Aug  6 09:14:06 PDT 2002
6612
6613  man page fixes.
6614    (Spotted by the eagle eyes of: Eric S. Raymond <esr@golux.thyrsus.com>)
6615
6616  Based on third hand reports, some installations of GNU compilers
6617  on HPUX and other systems now have 'fd_set' data types.
6618  I have modified configure so that it checks for 'fd_set' being
6619  present.  I wish there was a way to read the man pages and
6620  find out if this was the real case.
6621
6622  The configure 'enable-ssl/disable-ssl/' option was not working.
6623  Once again beating on autoconf 1.53 ...  It now understands
6624  'enable-OPTION' and 'disable-OPTION'.
6625  
6626  The Samba examples in the LPRNG-Howto were not consistent.
6627   changed 
6628        queuepause command = /usr/sbin/lpc -P%p stop
6629        queueresume command = /usr/sbin/lpc -P%p start
6630   to
6631         queuepause command = /usr/local/sbin/lpc stop %p
6632         queueresume command = /usr/local/sbin/lpc start %p
6633   (Suggested by: Jim Van Sickler <vansickj-eodc@Kaman.com>)
6634
6635Version LPRng-3.8.13 - Mon Jul 22 09:07:57 PDT 2002
6636
6637  Major Enhancement In Printcap and Configuration Functionality
6638  After much consideration, added the 'client.xxx' and 'server.xxx'
6639  facility.  Briefly,  if you have a printcap entry of the form
6640  client.xxx or server.xxx then this can be used to set the corresponding
6641  xxx variable when the printcap entry is used by the lpd server
6642  or the LPRng client programs lpr, lpq, lprm, checkpc, etc.
6643
6644    Entry               Program Type          Sets
6645    server.xxx = vvv    lpd (server)          xxx = vvv
6646    client.xxx = vvv    lpr,lpq... (client)   xxx = vvv
6647
6648  The purpose of this enhancement is to allow a single printcap
6649  entry to be used for both client and server operation, especially
6650  in situations where the lpd server is forwarding or sending jobs
6651  to another lpd queue.
6652
6653  Example of use:
6654    lp:
6655        # used by clients, forcess them to send to
6656        # specified server
6657     :lp=%P@server.hostname:force_localhost@
6658        # used by lpd server
6659        # the server will now send jobs to the
6660        # specified destination
6661     :server.lp=%P@destination
6662
6663  This is equivalent to and replaces the :client and :server
6664  printcap flags, as shown below:
6665
6666    lp:client
6667     :lp=%P@server.hostname:force_localhost@
6668    lp:server
6669     :lp=%P@destination
6670
6671  This selection operation also works with values in the
6672  lpd.conf file, allowing global overrides for clients and
6673  servers.  (I can't imagine a use for this,  but it is there
6674  if somebody wants to use it.)
6675
6676  The lpc client and lpc server commands will display the
6677  selected client.xxx and server.xxx values.  They are also
6678  propagated to the PRINTCAP_ENTRY environment variables
6679  for filters.
6680
6681  Typo's in documentation corrected.
6682  (Patch by: Stepan Kasal <kasal@math.cas.cz>)
6683
6684  lpr Kerberos authentication failures were not being reported.
6685  (Problem noticed by: Rick Cochran <rcc2@cornell.edu>)
6686
6687  Added SSL authentication.  See the README.SSL.SECURITY file for
6688  the truly complicated details.  Note that testing with certificates
6689  signed by non-root CA indicates that the client is not sending
6690  a certificate, even though one has been requested and the
6691  certificates and signing certs are in the right places.
6692
6693  lpd.conf did not have 'include' functionality working.
6694    (Patch by: Stepan Kasal <kasal@math.cas.cz>)
6695  
6696  Added Yet Another LPRng Option: user_is_authuser
6697      user_is_authuser:
6698       if( header_info && User_is_authuser_DYN
6699               && (s = Find_str_value(header_info,AUTHUSER,Value_sep)) ){
6700               Set_str_value(&job->info,LOGNAME,s);
6701               DEBUG1("Check_for_missing_files: authuser '%s'", s );
6702       }
6703  printcap:
6704  lp:auth=kerberos5:user_is_authuser:...
6705   Causes the principle name to be used as the user name.
6706
6707  lpq_in_perl was screwed up
6708  (Patches by: Anthony Thyssen <anthony@cit.gu.edu.au>)
6709
6710  generate_banner core dumped.  Turned out not to be setting
6711  banner format ("f") when generating entry, so that control
6712  file generation core dumped when generating new control file.
6713  (Problem reported by: "Keith Rinaldo" <rinaldok@egr.unlv.edu>)
6714
6715  Updated Remove_done_jobs to sort jobs by completion time.
6716  Added 'Set_nz_flag_value' function to stop the ERROR_TIME value
6717  from being gratuitously updated by various routines.
6718
6719  Found possible cause of 'job data files not removed' problem
6720  in the Remove_done_jobs() code.  There is a possibility of a
6721  data file being orphaned if a 'done job' is removed by the
6722  spooler at the same time that another processes such as lpq
6723  information gathering examines the print job.  Rare, but possible.
6724
6725  Put warnings in the LPRng-HOWTO section on Samba about the
6726  done_jobs option and interaction with SAMBA job status.
6727  (Suggested by: Marcus Manske <manske@dramedia.de>)
6728
6729  Added yet another wakeup and kick to the master server process
6730  so that printer pools will respond faster.  Sigh...
6731
6732Version LPRng-3.8.12 - Mon May 6 08:21:49 PDT 2002
6733
6734  patch for TCPWRAPPERS added a gratuitous -lwrap to the src/Makefile.
6735  (Spotted by: Rabellino Sergio <rabellino@di.unito.it>)
6736
6737Version LPRng-3.8.11 - Thu Apr  4 07:49:30 PST 2002
6738
6739  Subtle problem when a filter fails and produces zero
6740  length file.  This is now treated as a JABORT level
6741  error.  The problem is that RFC1179 treats a file
6742  length as 0 as a 'read until end of file on socket'.
6743  This means that folks who have filters that WILL produce
6744  zero length files need to do something to produce at
6745  least one byte of 'dummy' output.
6746    (Brought to my attention by:
6747      Sergij Kovalenko <s.kovalenko@drgueldener.de>)
6748
6749  Fixed up a portability issue for Solaris 2.6, in linksupport.c.
6750  Need to do an unsigned long cast to do comparison of INADDR_NONE.
6751  (Original patch from: Dr Andreas F Muller <afm@othello.ch>)
6752
6753  Added patches to support TCP wrappers.  Use:
6754    configure --enable-tcpwrappers
6755  (Patch by:  Tobias Burnus <burnus@net-b.de>)
6756
6757  Added a 'Linux Standards Base' (LSB) style startup script
6758    for Linux systems.
6759  (Provided by:  Tobias Burnus <burnus@net-b.de>)
6760
6761  Missing initialization for statb
6762  (Patch by: Rob Joyce <robjoyce@EE.Princeton.EDU>)
6763
6764  Clobbering Logfile_LPD in common/lpd.c
6765  (Patch by: Hugh McDonald <hugh@gw1.symac.dhs.org>)
6766
6767  Added a call to 'Remove_done_jobs()' in lpd_status.c;
6768   then modified Remove_done_jobs to return indication that
6769   a job was removed so that lpd_status.c would RESCAN
6770   queue... Sigh... OK, but it now works 'right'.
6771  (Stale jobs not getting removed noted by:
6772    Richard Ems <r.ems.mtg@gmx.net>)
6773
6774  The problem of saturating a server when checking for work was
6775   re-examined.  The new approach is:
6776    a) if some work was done,  then check for success at
6777        lpd_poll_time intervals.  If there remains work to
6778        be done and there is no process actively doing the
6779        work, mark the queue as needing service.
6780    b) for the marked queues, start at most 'lpd_poll_servers_started'
6781       queues at once,  and start these at intervales of
6782       'lpd_poll_start_interval' seconds.
6783   The effect of this will be to limit the number of processes
6784     that LPD will start at a time.
6785   (Pushed to look at the problem by: Johan Bengtsson <elijah@dd.chalmers.se>)
6786
6787  Found a very odd bug... the escape code for '\:' in printcap entries
6788   appears to be broken.  The fix was to assume that the only places where
6789   it would be used was in 'filter' or other options where the 'expand
6790   escape sequences' code would be called and would take care of replacing
6791   "\:" by a ":".
6792.
6793  The 'Printer_device()' routine, when opening a filter as an output
6794  device, did not provide 'stdout' for the filter.  Some filters such
6795  as pap from Appletalk seem to need this as they produce messages
6796  on STDOUT (fd 2) as well as STDERR (fd 3).
6797
6798Version LPRng-3.8.10 - Sun Mar 31 11:31:19 PST 2002
6799
6800 printcap.5 had :as and :ae examples reversed
6801  (Spotted by the guy with the red pen and the eagle eyes:
6802    Craig Small <csmall@eye-net.com.au>)
6803
6804 Slew of patches sent in by Tim Waugh <twaugh@redhat.com> 
6805   - silly little kerberos include file patch
6806   - can't spell printer patch
6807   - si no moleste the files in the spool queue patch
6808     (already done)
6809   - added configure ability to find 'pr' program
6810   - GCC flags -W -Wall -Werror -Wno-unused-parms
6811      - also fixed up &*)*(&)*(& unsigned and signed
6812        integer casts
6813 Added patch to allow tcp wrappers to be used.  Configure updated
6814   configure --enable-tcpwrappers     use tcp wrappers (-lwrap)
6815   (Patch from: Tobias Burnus <burnus@net-b.de>)
6816
6817 The authentication and connection information for permissions
6818  checking is now recorded so it can be used for permissions checking.
6819  and a couple of new fields have been added.
6820  The following permission tags now have the indicated values
6821   UNIXSOCKET - true (match or 1) if connection was over a UNIX socket,
6822     i.e. - the local host.
6823   When SERVICE=P 
6824     REMOTEHOST - the original remotehost from which the job was sent
6825      (previously was the HOST value)
6826     REMOTEPORT - the original port from which the job was sent
6827      (previously was undefined )
6828     AUTH - true (match or 1) if job sent using authentication
6829     AUTHTYPE - authentication type
6830     AUTHUSER - value of authentication key for user who originated
6831        job.  For example, for kerberos this is the user's principle value
6832     AUTHFROM - value of authentication key for sender of job.  For example,
6833        if the job was from the LPR program,  this would have the same
6834        value as AUTHUSER.  However, if it was forwarded from a server,
6835        it would have the server's authentication name or value.
6836  lpd.perms.in update to match the new entries
6837   (Requested by: Toby Blake <toby@cogsci.ed.ac.uk>)
6838
6839  Once again the checkpc file creation stuff is modified so that
6840   it can create files in a directory NOT owned by the lpd group/user.
6841   This is necessary for log files and other items.  Note that this
6842   MAY cause problems for log file truncation as you need to copy
6843   file contents rather than just renaming them.  But it turns out
6844   that I am already doing this so it appears to be OK.
6845     CAVEAT EMPTOR.
6846   (Reported by: Torsten Wiebesiek <wiebesiek@tnt.uni-hannover.de>)
6847
6848  Usage messages now display version information as well as options
6849   and available debug flags.  Idea shamelessly swiped from somebody else.
6850   (Stolen from: 'Guido' Van Rossen)
6851
6852Version LPRng-3.8.9 - Sat Mar  2 15:02:11 PST 2002
6853
6854  The 'unix_socket_path' and 'lpd_port' options have been modified
6855  slightly to correct some ambiguous behaviour, and a 'lpd_listen_port'
6856  option has been added.
6857    lpd -p lpd_listen_port -P unix_socket_path
6858     - the -p and -P command line options override the
6859       lpd.conf lpd_listen_port and unix_socket_path options
6860     - the default values for lpd_listen_port is "", indicating
6861       the use the 'lpd_port' value.
6862   The value "off" suppresses opening a port or socket.
6863
6864     This allows the following operation:
6865     No unix socket:
6866        lpd -Poff   (/etc/lpd.conf unix_socket_path=off)
6867     No lpd listening socket:
6868        lpd -poff   (/etc/lpd.conf lpd_listen_port=off)
6869        Note that LPD will still open connections to the
6870        remote LPD servers using 'lpd_port'.
6871   If you want to override the destination lpd port, you must
6872      modify the lpd.conf file.
6873
6874  Jeff Chua of FedEx (Federal Express) <jchua@fedex.com>
6875  showed up at my office armed with a set of test scripts and a laptop
6876  running LPRng.  He demonstrated the problem of the 'missing datafile'
6877  during job transfers.  I have fixed the problem in this release.
6878  See the UTIL/testpr file.  
6879   (Thanks to: Jeff Chua: <jchua@fedex.com>)
6880    
6881  more autoconf + automake + libtool insanity:
6882     WITH_LINK removed
6883     STRIP now used by libtool, changed to STRIP_OPTION
6884     Added AC_C_VOLATILE (see note on volatile below)
6885  (Reported by: Rick Troxel <rick@helix.nih.gov>)
6886
6887  Forced a rescan of the input queue when the number of done jobs
6888   exceeds 'done_jobs' or the time since the first done job exceeds
6889   done_jobs_max_age .  This solves a silly problem that shows up
6890   when you have a slew of jobs in a queue,  the subserver is processing
6891   them,  and no new jobs arrive while it is processing them.  Under these
6892   conditions the 'done jobs' would not have been removed until all were
6893   done.  If you were printing 1000 jobs then you could not submit any
6894   new jobs, even though you have done 999 of them... :-)
6895
6896   Sigh... these boundary conditions are the pits.
6897
6898  Added the 'volatile' option to declarations of static and nonstatic
6899  variables updated in signal handlers.  You really don't want to
6900  hear the frothing about over-enthusiastic optimizing compilers, do you?
6901
6902  Ran the Kerberos tests, discovered minor definition problems with
6903  krb4_auth.h and Kerberos4 support.  Have no way to test this,  hope
6904  the problem is resolved.
6905
6906  The AUTHUSER information received at job submission time was not
6907  being stored and used later when printing permissions were checked.
6908  (Discovered by: Toby Blake <toby@cogsci.ed.ac.uk>)
6909
6910  Added a 'UTILS/README.ForKerberosHackers' file so that Kerbero Hackers
6911  can quickly and brutally set up a test LPRng system.  Not for the
6912  faint hearted.  Carry a dog nummy when you read this stuff...
6913
6914  Some users hit themselves in the head and complain about headaches.
6915  If the 'lpd_port' value is 0,  then checkpc and lpd squawk.
6916   (Not telling me who the user was, but reported by:
6917      Craig Small <csmall@eye-net.com.au>)
6918
6919 
6920
6921Version LPRng-3.8.8 - Sat Feb 23 07:35:45 PST 2002
6922
6923  Restored include file functions to lpd.conf.  Also put in recursion
6924  depth checks so that it will stop if you have a loop.
6925
6926Version LPRng-3.8.7 - Fri Feb 22 12:24:38 PST 2002
6927
6928  Modified the wildcard lookup so that it returns some sane
6929   values for defaults, i.e. - '*' is not treated like
6930   a real printer and the first 'real' printer is used.
6931     Sigh...
6932
6933  autoconf, automake, and libtoolize insanity.
6934    Each of these facilities has a different version of the
6935    config.guess and config.sub files, and will brutally copy
6936    them to the distribution directory when you run automake,
6937    autoconf, or libtoolize.  Problem sort of solved by
6938    running through the /usr/local/share/{auto*,libtool}
6939    directory and finding latest versions of things.  As the
6940    CarTalk guys say, "Bo-0H-OH-OH Gus!".  Sigh. 
6941
6942  The 'Service_connection: bad request...' error message now has
6943   the IP address of the sender added.
6944  (Good idea from: Rainer Tammer <rainer.tammer@spg.schulergroup.com>)
6945
6946  Makefile.in had the diagnostic options left enabled after
6947   regression tests.
6948   BAD! Bad Programmer! BAD! No coffee for you today.
6949   (Reported by: Petri Kaukasoina <kaukasoi-lprng@elektroni.ee.tut.fi>
6950      among others...)
6951
6952  Portability stuff,  // comments, and src/Makefile referencing
6953   ${SRC}/../UTILS instead of ../UTILS.
6954   (Reported by: Hans Peter Verne <h.p.verne@usit.uio.no>)
6955
6956  Missing check in lpstat for end of string condition:
6957   for( t = Printer_DYN; t && !isspace(cval(t)); ++t );
6958    => for( t = Printer_DYN; !ISNULL(t) && !isspace(cval(t)); ++t );
6959   (Reported by: Villy Kruse <vek@pharmapartners.nl>)
6960
6961  psbanner was creating a /tmp/before file.
6962   (Reported by:
6963     Anthony R Iano-Fletcher <Anthony.Iano-Fletcher@cbel.cit.nih.gov>)
6964
6965  Fixed the 'job done' status message so that it shows the job id.
6966   (Suggested by: Christoph Beyer <christoph.beyer@desy.de>)
6967
6968  Added some sanity checks to handle cases when hold files and
6969   control files do not have identifier information in them.
6970
6971  Checkpc now checks for duplicate spool directories.
6972
6973Version LPRng-3.8.6 - Fri Feb  8 19:31:52 PST 2002
6974
6975  HF_NAME not getting set when hold file read and it is not
6976  in file.  This makes updates miserable.
6977  (Problem spotted by: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>)
6978
6979  Fixed typeo in configure where I had unixsocket and unixsocketpath
6980  instead of unix_socket and unix_socket_path...
6981  (Pointed out by: Craig Small csmall@eye-net.com.au)
6982
6983  Modified the host/printer lookup behavior when clients
6984  are using 'force_localhost'.  You now use the 'original'
6985  queue name rather than the 'destination' queue name.
6986  Wonder how long this has been there.
6987  (Prompted by a problem report from: Andrew Gray" <grayaw@egr.unlv.edu>)
6988
6989  Missed a 'AF_UNIX' definition.  Now guarded with ifdefs.
6990 
6991  Corrected LPRngHOWTO accounting information:
6992   (Error reported by: "Dirk Krause" <d.krause@fh-sm.de>)
6993
6994    Example:
6995     lpd generates:  
6996      jobstart  - from the lpd.conf 'as=' option
6997      jobend    - from the lpd.conf 'ae=' option
6998        -H   - host name
6999        -n   - user name
7000        -P   - printer
7001        -k   - control file name
7002        -b   - byte count of job/file
7003        -t   - current printing time
7004        -J   - Jobname (if present in control file)
7005        -C   - class (if present in control file)
7006        -M   - mailname (if present in control file)
7007    
7008     ifhp filter generates:
7009       start/end         - of filter, for entire job
7010       filestart/fileend - if or other filter, for each file
7011       (options above are same)
7012        -A  - identifier information (if present in control file)
7013        -q  - process id of filter
7014        -p  - current value of page counter, 0 indicates no
7015              page counter on printer or it is not readable
7016    
7017    jobstart '-Hh110.private' '-nroot' '-Plp' \
7018       '-kcfA129h110.private' '-b48780' '-t2001-10-19-09:36:36.000'
7019                               ^^^ bytes in file
7020    
7021    start '-q26130' '-p105340' '-t2001-10-19-09:36:38.330' \
7022                     ^^^^^^^  starting page counter value for job
7023        '-Aroot@h110+129' '-nroot' '-Plp' 
7024    filestart '-q26132' '-p105340' '-t2001-10-19-09:36:38.350' \
7025                          ^^^^^^^  starting page counter value for file
7026        '-Aroot@h110+129' '-nroot' '-Plp' 
7027    fileend '-b19' '-T435' '-q26132' '-p105359' '-t2001-10-19-09:43:51.504'
7028                                      ^^^^^^^  ending page countvalue for file
7029             ^^^ number of pages printed for this file
7030        '-Aroot@h110+129' '-nroot' '-Plp'
7031    end '-b19' '-T435' '-q26130' '-p105359' '-t2001-10-19-09:43:51.504'
7032                                      ^^^^^^^  ending page countvalue for job
7033         ^^^ number of pages printed for this job
7034        '-Aroot@h110+129' '-nroot' '-Plp'
7035    jobend '-Hh110.private' '-nroot' '-Plp' \
7036        '-kcfA129h110.private' '-b48780' '-t2001-10-19-09:43:51.000'
7037                               ^^^ bytes in file
7038
7039Version LPRng-3.8.5 - Tue Jan 22 15:58:46 PST 2002
7040
7041  Added a minor fix to lpq so that it will check all queues.
7042   (Courtesy of Jim Trocki <trockij@transmeta.com>)
7043
7044Version LPRng-3.8.4 - Thu Dec 13 08:25:17 PST 2001
7045
7046   ARGH! ARGH!  screwed up lpq -a by forgetting to
7047   get the 'all' printer information.  Doh!
7048   (Spotted by and slapped his forehead by:
7049      Patrick Powell <papowell@lprng.com>)
7050
7051   "Why do we need a TCP/IP port?"  quoth the raven,  I mean
7052   Craig Small <csmall@eye-net.com.au>.
7053   "I have a version that has this facility..." respondeth
7054   Patrick ("Mr. Grumpy") Powell.  "But I think you will not
7055    be happy".  I merged the two versions.  Be Happy.
7056
7057   configure:
7058     Added these options
7059       --enable-unix_socket  (default disabled)
7060       --with-unix_socket_path=PATH  (default /dev/lprng)
7061
7062   /etc/lpd.conf:
7063    OPTION      TYPE   DEFAULT PURPOSE
7064     unix_socket FLAG   1       enables/disables the UNIX socket
7065     unix_socket_path STR   /dev/lprng    path to the pipe using this
7066
7067    Also: lpd_port = 0 will disable the TCP/IP port
7068
7069     lpd -p 0    - disables the TCP/IP port
7070       or /etc/lpd.conf  lpd_port=0
7071     lpd -P /path   - enables, unix socket specified by path
7072       or /etc/lpd.conf  unix_socket@
7073     lpd -P off     - disable unix socket
7074
7075      Permissions:
7076       Connections to the UNIX socket will appear to come
7077       from localhost, (127.0.0.1) port 0.  You can use the
7078       UNIXSOCKET to check for this condition, or explicitly for
7079       localhost/port 0
7080         ACCEPT/REJECT ... UNIXSOCKET
7081    Also updated the INSTALL note.
7082
7083   checkpc:  I was using 'To_daemon()' calls all through the
7084     code.  This was not needed and would cause a substantial
7085     slowdown in operation.  I now do exactly ONE call at the
7086     start of operations.
7087
7088   updated the config.guess and config.sub to the latest version
7089   provided by autoconf.
7090
7091   Incoming jobs now have a status entry.  This is to support IPP
7092   and status reporting for incoming jobs.  The idea is that you
7093   can start transferring a job and then,  when the whole job is
7094   transferred,  the job will be done.  To make this happen you
7095   need to put an entry in the queue to act as a place holder and
7096   reserve the job number for this action.  When transfering an
7097   IPP job,  you can send it in chunks.  This now allows the IPP
7098   system to send the job header (request), set up the job status,
7099   and then the job contents.  Just to make life interesting...
7100
7101   Found some places where I was using 'sizeof(xxx)' instead of a
7102   passed value for an error message buffer.  Very short error
7103   messages - 3 chars long... :-)
7104
7105   LPD now REALLY uses the lock files to prevent multiple
7106   instances from running.  This might/will/could break on
7107   systems that NFS mount their lock directories.
7108
7109   Cleaned up the error message about bad print job formats.
7110    Clearly there are some REALLY strange printing systems out there.
7111    (reported by: Phil Moses <pmoses@physics.ucsd.edu>)
7112
7113   Checkpc -A XX -r now has nicer format:
7114     t1:  file 'hfA877', age 24.57 hours > 24.00 hours maximum
7115     (Spotted by: (Craig Small) csmall@eye-net.com.au)
7116
7117   Added the following to the pass_env options:
7118    LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
7119    LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
7120    LC_IDENTIFICATION LC_ALL
7121    This should help with LOCALE support.
7122
7123Version LPRng-3.8.3 - Mon Dec 10 20:40:02 PST 2001
7124
7125   Fixed the operation of 'lpr -Pxx' when printcap for xxx
7126   has the format:
7127     xx:direct:lp=...
7128     Sigh... too many special cases...
7129       (Pointed out at LISA2001, and fixed on site...
7130       Now who was that masked Sysadmin???...)
7131    (From the mailing list:
7132      James Thomas Klaas <jklaas@engin.umich.edu> )
7133
7134   Removed spurious commas in control file Z options.
7135
7136   Configure did not set 'done_jobs_max_age' correctly.
7137   (Patch from: Dejan Ilic <dejan.ilic@home.se>)
7138
7139   lpc flush now cleans out status as it should have done...
7140    GRRR... user pointed this out at LISA 2001...
7141
7142   Fixed up a problem with global variable Name.
7143      From:  Rick Cochran <rcc2@cornell.edu>
7144    I got LPRng to build under OSX.  It required only one patch which
7145    seems to be due to the fact that "Name" is declared "extern" all
7146    over the place, but is only defined in getopt.c.  Since lpstat
7147    doesn't use getopt, ld complains.  I'm not sure why GNU ld should
7148    complain under OSX and not on other platforms.
7149     (Patch by:  Rick Cochran <rcc2@cornell.edu>)
7150
7151   Editted the lpr man page.  Updated the information about
7152    obsolete options.
7153
7154   Updated the installation procedures for FreeBSD, linux, etc.
7155   The STANDARD_configuration script now checks to see if there
7156   is a /usr/share/man and if so, runs  configure with
7157   --mandir=/usr/share/man.  Man pages now show up in the
7158   right place.  This was true on *BSD, various LINUX distros,
7159   and some versions of SunOS/Solaris.
7160
7161   Updated the DISTRIBUTIONS/FreeBSD entry and the postinstall
7162   scripts so that the port stuff works better.  Now if you do:
7163         cd LPRng/DISTRIBUTIONS/FreeBSD*
7164         make PREFIX=/usr SYSCONFDIR=/etc
7165   You will get the same effect as:
7166         cd LPRng
7167         sh STANDARD_configuration
7168         make clean all install
7169   But, as you might suspect, there are some minor gotchas.
7170   The man pages usually get installed in /usr/share/man, but
7171   when you use the PORT system and override PREFIX it
7172   insists on installing them in /usr/man... and various
7173   versions of the FreeBSD and OpenPort stuff INSISTS that
7174   when generating a port that the originals of the man pages
7175   are in the ${PREFIX}/man/manX directories.
7176
7177   I gave up and cheated:  you get an obnoxious warning to
7178   either create /usr/man or to make a symbolic link from
7179   to /usr/share/man from /usr/man before installation starts.
7180   I know, I know.  But I don't have that many brain cells
7181   left to fry...
7182
7183
7184Version LPRng-3.8.2 - Mon Dec  3 12:26:52 PST 2001
7185
7186  MAJOR CONFIGURATION CHANGE:
7187
7188  LPRng can retain status of last N completed jobs
7189     configure --with-done_jobs=N
7190         - set done_jobs value, default 1
7191     configure --with-done_jobs_max_age =N
7192          - set done_jobs_max_age value, default = 0 (no expiry)
7193
7194     Or in the printcap/lpd.conf:
7195       :done_jobs=1
7196       :done_jobs_max_age=1
7197
7198   Example:
7199    Printer: t1@h110 'Test Printer 1'
7200     Queue: no printable jobs in queue
7201     Server: no server active
7202     Status: job 'cfA231h110.private' removed at 18:25:36.281
7203     Rank   Owner/ID         Class Job Files             Size Time
7204    done   papowell            A   278 /tmp/hi              3 18:25:31
7205
7206  Controlled by:
7207    :save_on_error        - all jobs with error saved, status not removed
7208    :save_when_done       - all jobs with no error saved, status not removed
7209    :done_jobs=N          - last N jobs completed (error or no error) saved
7210    :done_jobs_max_age=N  - jobs with status older than N seconds removed
7211
7212  This is best explained by:
7213    On job completion:
7214    if( (no error && save_when_done)
7215       || (error && save_on_error)
7216       || done_jobs > 0 || done_jobs_max_age > 0 ){
7217      do not remove job
7218    }
7219
7220    When queue updated:
7221    if( !(save_on_error || save_when_done) ){
7222       while( done_jobs_max_age >= 0
7223         && the time since completion of oldest done job > done_jobs_max_age ){
7224               remove the oldest done job
7225       }
7226       while( done_jobs >= 0 && total number of done jobs > done_jobs ){
7227          remove the oldest done job
7228       }
7229    }
7230
7231  Fixed up the order of 'require_explicit_q' in the variable list.
7232
7233  Added 'lpd -p port' so that lpd port can be specified at run time.
7234   (Suggested by: Chris J. Herbst <chris@herbst.com>)
7235
7236  Added 'PrintingCookbook' to the distribution.
7237
7238  The 'shorthost' DNS lookup result was not being set correctly
7239  if DNS lookup failed and you had to drop back to using IP address.
7240  Clearly the shorthost form of IP10.0.0.1 is IP10.0.0.1, not
7241  IP10.
7242
7243  Added patches to help support Win32 porting using Cygwin:
7244  UID 0 is now ROOTUID instead of 0 value.
7245  ROOTUID is set by ifdef in portable.h
7246
7247  checkpc -f no longer puts out the annoying '/var/run/lpd.515
7248   does not exist' message.
7249
7250  List_sep (which is only used in Check_for_rg_group) needs
7251  a comma.
7252    (Discovered by: Graeme Wood <Graeme.Wood@ed.ac.uk>)
7253
7254  Reworked the 'start lpd subprocess' code so that it is a little more
7255  civilized.
7256
7257  Modified portable.h so that LPRng compiles properly on HPUX 11.xx
7258  systems.
7259
7260  lpc help fixed up - 'redo - reprints jobs'
7261
7262  Cleaned up the 'Make_sort_key' code so it does not do needless
7263   malloc.
7264
7265Version LPRng-3.8.1 - Thu Nov 15 16:08:41 PST 2001
7266
7267  The original default actions and values for the LPD_PRINTCAP_PATH
7268  have been restored, as it broke too many other things.  A work around
7269  for the problems with using LPD and database based configuration
7270  has been found... ugly, but it works.
7271
7272  Chooser also now will wait when it cannot find a queue instead of
7273  just exiting.  This solves the problem of 'hung' load balance print
7274  queues using 'chooser' support.
7275
7276  Trim the accounting file information.  This now solves the 'mysterious
7277  full spool partition' error messages.
7278
7279  'indefinately' is really 'indefinitely' ... so says 'ispell'
7280
7281  The 'remove_z' now really removes 'Z' options.
7282   (Found by: Ryan Lovett <ryan@stat.Berkeley.EDU>)
7283
7284  The 'require_explicit_q' added for those folks who absolutely require
7285  that a queue be specified and do not want them to use a default queue.
7286   (Patch to code supplied by: James Thomas Klaas <jklaas@engin.umich.edu>
7287     with a little help from Dan Escapa)
7288
7289  Grrr... left in a line of code when I was doing some testing of the
7290  setuid functions in Win32 and screwed up the setuid stuff.
7291
7292  Fixed up a silly problem with file descriptor 0 not bound to
7293  /dev/null in lpd subprocesses.
7294
7295  Fixed the 'Trim_status_file' routine so that it now treats file
7296  descriptor 0 and -1 as 'closed' files.  This prevents some silly
7297  problems with initialization.
7298
7299Release LPRng 3.8.0 Mon Oct 15 12:09:13 PDT 2001
7300
7301   At line 174 in accounting.c:
7302     } else if( safestrncasecmp( s, "hold", 4 ) ){
7303   This should be
7304     } else if( !safestrncasecmp( s, "hold", 4 ) ){
7305   otherwise anything send back to lpd from the accounting filter
7306   other than accept will result in a JHOLD!
7307    (Spotted by: "C. L. McAvaney" <chrismc@deakin.edu.au>)
7308
7309   Added :force_ipaddr_hostname option.  This causes the IP address of the
7310   remote host to be used for the hostname, overriding the information
7311   in the control file.  This can be used when you really need the
7312   IP address rather than the hostname in the control file.
7313     (Needed by: Rick Cochran <rcc2@cornell.edu>)
7314
7315Release LPRng 3.7.9 Mon Oct 15 06:18:43 PDT 2001
7316
7317  Version control strikes again.  Sigh...
7318  Now all the files are carefully put into place
7319   (Fumble fingers by:  Patrick Powell <papowell@astart.com>)
7320
7321Release LPRng 3.7.8 Tue Sep 25 12:35:46 PDT 2001
7322
7323  Can't spell... fixed typos in man pages.
7324  (Corrections from: Karsten Weiss <knweiss@gmx.de>)
7325
7326  lpd_logger.c - free(sp); s=0 ... this sure does make
7327   free() and malloc() unhappy...
7328   (Found totally by accident: Patrick Powell <papowell@astart.com>)
7329
7330  lpr '-Y' (enable lpr_filter) processing fixed up a bit.  Now has better
7331   diagnostics and information.
7332
7333  An extremely rare but annoying network condition causes LPQ print
7334  status to fail.  When running as root (setuid root),  and doing an LPQ
7335  operation,  the lpq process will try to bind to a port in the low
7336  port range (512 - 1023).  This will sometimes fail with a timeout
7337  if the port has been recently used and bound to.  I have put a bit
7338  more 'randomization' into the selection of the port,  but there is really
7339  nothing that can be done,  as the TCP/IP error status does not distinguish
7340  between 'connection refused because you just connected from this port'
7341  and the remote printer being off line.  Sigh...  The obvious answer
7342  to this is to bind to the low ports only when needed, but this requires
7343  users to know when to set the option.  I give up.
7344
7345
7346Release LPRng 3.7.7 Fri Sep 14 15:54:48 PDT 2001
7347
7348  checkpc whooped its cookies when running checkpc -f and
7349  the device is /dev/null (lp=/dev/null).   Apparently I
7350  cannot set /dev/null to use blocking IO...  Sigh...  So I
7351  do not count 'changing non-blocking IO to blocking IO'
7352  as an error.
7353
7354  i8n French Translation (gettext) added.
7355  (Supplied by: Francois Mescam <Francois.Mescam@onera.fr>)
7356
7357  The files generated by the 'incoming control filter' were not
7358  being re-read by the LPRng system.  Silly me.
7359  (Discovered by: Tuomas Toropainen <tuomas@nic.funet.fi> )
7360
7361  The 'bq_format' option was not being handled correctly
7362  for defaults.  This option has the value:
7363    bq_format=IoIo...D
7364       I = original input format (or '*' for wildcard match)
7365       o = filter output format
7366       D = default (if present),  otherwise keep original
7367  It now handles the case where no translation is required
7368  correctly.
7369  (Prompted by a question from:
7370     Rainer Tammer <rainer.tammer@spg.schulergroup.com>)
7371
7372  Did not check to see that I was a client before doing
7373    setgroup to daemon.  Stupid of me.  GRRRR... I now have
7374    a test for this in the code.
7375   (Warning from: Petri Kaukasoina <kaukasoi-lprng@elektroni.ee.tut.fi>)
7376
7377Release LPRng 3.7.6 Fri Sep  7 05:36:00 PDT 2001
7378
7379  There was no call to Getdaemon_group so the default daemon group
7380  was 0.  This, as they say, was double plus ungood.
7381   (Spotted and reported with a cackle of diabolical laughter by:
7382       Petri Kaukasoina <kaukasoi@elektroni.ee.tut.fi> )
7383
7384  I added a 'half_close' flag so that you can force a 'close(fd)'
7385  rather than a 'shutdown(fd,1)' to be done for those problem child
7386  network printers that whoop their TCP/IP stacks and die horrible
7387  deaths when they get a half closed connection.  This is,  as they
7388  say, a bug in the print server,  but I have encountered worse.
7389  The same printers also whoop their cookies when reporting status
7390  but I don't seem to be doing a half-close on 'lpq' connections
7391  so this doesn't seem to be a problem.  I have modified the 'lpq'
7392  code so it does not do a 'half-close'.
7393
7394   Example:
7395     lp:lp=host%9100    # happy, well behaved, print spooler box
7396     lpb:lp=host%9100:half_close@  # buggy print spooler box
7397
7398  Grammar fixed in LPRng-HOWTO.
7399    (Red pencil work done by: <Jeffrey.H.Knodel@chase.com>)
7400
7401Release LPRng 3.7.5 Sun Sep  2 12:43:39 PDT 2001
7402
7403  I was not closing all open file descriptors.  This caused checkpc and
7404  lpd (when running as 'spool queue server') to die mysteriously after
7405  processing a couple of jobs.
7406  (Clue to cause supplied by: Heiko Burghardt <burghardt@riege.de>)
7407
7408  The lpc -s status only reported number of jobs.  Now it also reports
7409  queue status,  as it used to, and should have.  And it reports only
7410  the number of printable jobs.
7411  (Patch by:  Garry Zacheiss <zacheiss@MIT.EDU>)
7412
7413  Patch to accommodate Broken RFC1179 Implemenation #39 from Apple.
7414  (Gory details and a patch by: Darius Davis <s328919@student.uq.edu.au>)
7415
7416  The 'Read_fd_len_timeout' and 'Write_fd_len_timeout' code would not
7417  pause indefinately if the timeout value was 0.
7418  (Noticed by: David E. Cross <crossd@cs.rpi.edu>)
7419
7420  A slew of patches from Crutcher Dunnavant at redhat.com:
7421  From the LPRng-3.7.4-23.src.rpm at the RedHat ftp site:
7422    LPRng-3.7.4-direct.patch - fixed a typeo in vars.c
7423    LPRng-3.7.4-inet_ntop.patch - conflicting/duplicate
7424        definition of inet_ntop.
7425        NOTE: I also fixed the inet_pton() definition to
7426        be consistent with the patch.
7427    LPRng-3.7.4-jobfilescan.patch, LPRng-3.7.4-lockfile.patch
7428        a little less agressive checkpc operation.  Checkpc
7429        now does not NOT update the targets of symbolic links.
7430        This solves the problem of various tools creating
7431        files in the spool directory as well as symbolic links
7432        to filters.  The FILES need to be accessible by
7433        filters running as the LPD user, the targets of the
7434        symbolic links should not be touched.
7435    LPRng-3.7.4-kerb5.patch - not used, do not want to hardwire
7436        paths into configure.  Modified RPM config file to add
7437        /usr/kerberos/{include,lib} instead
7438    LPRng-3.7.4-lockfile.patch - lockfile created now
7439    LPRng-3.7.4-manpage.patch - typo in lpr.1 fixed
7440    LPRng-3.7.4-nointl.patch - configure using wrong -lintl
7441        value.
7442    LPRng-3.7.4-nonblock.patch - changed some blocking opens
7443        to nonblocking opens in checkpc so that checkpc did not
7444        hang.  Silly of me not to have done this,  as the
7445        Check_write() routine even had a nonblocking flag just
7446        for this purpose.
7447    LPRng-3.7.4-s390.patch, LPRng-3.7.4-setgroups.patch
7448        This is a fiddle, not a major problem.  The only
7449        exploit possible is if the lpd server is started
7450        with "extra" groups besides the default one.  If
7451        you do not install lpd SETUID root (which is the default)
7452        then you have to be root to start this (su root OR login
7453        as root),  and this means that either login or su is
7454        not setting up the group membership correctly.
7455        But it is better to err on the side of paranoia than
7456        be careless.
7457    LPRng-3.7.4-shutdown.patch
7458        Note: the 'shutdown()' patch was NOT applied as it breaks
7459        a slew of other things.  Clearly we have some problem
7460        printers out there that need to be identified.
7461  (Courtesy of: Crutcher Dunnavant <crutcher@redhat.com>)
7462
7463  Updated GETTEXT/i8n support to gettext-0.10.39.
7464
7465  The printcap option 'prefix_option_to_option' is declared as a flag in
7466  src/common/vars.c in both versions 3.7.4 (line 355) and 3.6.26.
7467  { "prefix_option_to_option", 0, FLAG_K, * &Prefix_option_to_option_DYN,0,0},
7468  should be:
7469  { "prefix_option_to_option", 0, STRING_K, &Prefix_option_to_option_DYN,0,0},
7470  (From: Anthony R Iano-Fletcher <Anthony.Iano-Fletcher@cbel.cit.nih.gov>)
7471
7472  Redid the authentication documentation and code...  cleaned it up a bit.
7473  And comments.  And printcap.5 updated, HOWTO updated.  Sort of works now.
7474  Fixed up '$a' filter options so that :af=xxx is put on command line only
7475  if it is NOT a filter.  This clears up the mysterious Linux Printfilter
7476  deaths.
7477
7478  Permission checking now works for SERVICE=X.  You can only do remote host
7479  and port comparisions (REMOTE_IP=, REMOTE_HOST=, PORT=).  This was initiated
7480  by a bug report about address mask generation.
7481  (From: Willi Burmeister <wib@cs.uni-kiel.de>)
7482
7483  'lpc client' now displays defaults.
7484
7485  The changes to use the 'initgroups()' call for setting process group and
7486  effective group also cleared up problem reported by some Debian users.
7487
7488  You can now put a colon in printcap entry values using: \:.  This makes
7489  life a little easier for some folks who need to have options of the form
7490  "http://...".  You can now do:  filter=/.../sendftp -d ftp\://some/site
7491
7492  The configure defaults for filter_path (PATH value for filters)
7493    are now /bin:/usr/bin:/usr/local/bin
7494  The configure defaults for filter_ld_path (LD_LIBRARY_PATH value for filters)
7495    are now /lib:/usr/lib:/usr/local/lib
7496
7497  Reviewed LOTS and LOTS of documentation.  Fiddles all over the place.
7498
7499Release LPRng 3.7.4 Wed Dec 27 07:10:27 PST 2000
7500  ARGH ARGH!  Distributed the test version and not the release
7501  version for 3.7.3 - this has not been a good week.
7502
7503  The printcap entry '*:client:rm=IPADDR:force_localhost' now works correctly
7504  with lpq -a.  Side effect: you do not get status if you do not have a
7505  default printer.  i.e. - 'lp|*:client:rm=IPADDR' is better.
7506
7507  I now kill off process by using SIGHUP, SIGINT, SIGQUIT and SIGCONT.
7508    Even Guido thinks this is overkill but expects that there will be
7509    some system where even this does not work.
7510
7511  Added a check for the VERSION of gdbm as well.
7512
7513  ARGH ARGH ARGH... I fixed a problem with signals (SIGINT) killing off
7514   the process waiting for a lock on a file descriptor,  but I did
7515   it wrong.
7516   (Pointed out most gleefully,  complete with TRUSS output by:
7517     Doug Morris <doug@daynetwork.com>
7518       AND
7519     John Perkins <john@cs.wisc.edu>)
7520
7521Release LPRng 3.7.3 Sun Dec 24 17:47:52 PST 2000
7522  Updated the default printcap file with a simplified set
7523   of instructions.
7524  There was a 'sleep(1000)' instead of a 'plp_usleep(1000)'.
7525   Needless to say,  this did slow things down a bit.
7526  LPRng HOWTO Section on Samba had 'printcap file' instead of 'printcap name'
7527   (Spotted by: Marcel Kunath" <kunathma@pilot.msu.edu>)
7528  HPUX compilation without GCC had a gratuitious CFLAGS=-Aa.  I removed the flags.
7529   (Reported by: Ryan Novosielski <novosirj@umdnj.edu>)
7530
7531Release LPRng 3.7.2 Fri Dec 22 10:45:00 PST 2000
7532  Discovered that job moves were not working correctly.  Was
7533  removing the lpd_port value by mistake.
7534
7535  Close_gdbm() was not defined,  and the #if HAVE_GDBM_H
7536   confused some compilers.
7537  (Reported by: Shane Voss <Shane.Voss@glg.ed.ac.uk>)
7538
7539  ifhp.conf got the 'reverse_priority' description wrong.
7540  (Proof-reder was: Michael J. Carter <mcarter@lanl.gov>)
7541
7542  When I added the user printcap stuff I did not set a return
7543  value and the 'tc=' broke.  Sigh.
7544  (Reported by:  gizillions of people, including
7545     Michal Kouril <mkouril@ececs.uc.edu>)
7546
7547  RFC1179 does not ABSOLUTELY PROHIBIT some print spooler
7548    expecting multiple LPQ request.  So it does not close
7549    the connection after sending status.  So I now do a
7550    shutdown() to cause it to not expect further commands.
7551   (Detective work done by Rainer Tammer <rainer.tammer@spg.schulergroup.com>)
7552
7553  The 'short_status_date' and 'full_time' options seem to conflict
7554    with each other.  The 'full_time' means to use full time formats
7555    in LPQ status,  and the 'short_status_date' means to use short
7556    date formats.  The 'full_time' option now controls both of these,
7557    which is probably what was intended in the first place.
7558    (Pointed out by: Bill Kemp <bkemp@srp.gov>)
7559
7560  Get_all_printcap_entries() was not clearing All_line_list so you
7561    would get duplicate entries. Solved the 'mystery duplicate printer'
7562    problem observed during testing.
7563
7564  Natter in the README and INSTALL for Solaris users.
7565
7566Release LPRng 3.7.1 - Tue Nov 28 06:33:32 PST 2000
7567
7568 Major Changes That Effect Backwards Compatibility
7569
7570  1. local printcaps for users - ${HOME}/.printcap
7571     This allows users to specify a printcap in their local
7572     directories.  Of course, you can use the 'user_printcap@'
7573     option to disable this.  But why bother?
7574
7575  2. job file filtering always enabled
7576
7577     The classical 'store and forward' behavior has been changed.
7578     If you have a print queue with filters
7579        AND you have a file with the format specified for a filter
7580        THEN the file is filter and the filtered output is used.
7581
7582     This is CONTRADICTORY to 'vintage' BSD and 'legacy' LPRng
7583     behavior.
7584
7585     If you want to have 'job flattening',  that is,  to have
7586     the job combined into a single file with all the files
7587     processed, you need to use 'lpd_bounce'.  If you are currently
7588     using 'lpd_bounce' you will see no difference in behavior.
7589
7590     The bq_format option is used to get the 'new' formats after
7591     filtering.  Bq_format has the form:
7592       OnOnOn...D
7593         where O is the original format, n is new format,
7594         and D is default if there is the original format
7595         is not present.
7596
7597         If no default then original is retained.
7598
7599     The bq_format default is now 'f', not 'l'.
7600
7601     Example:
7602       bq_format=f    (default)
7603          all processed files have 'f' format
7604       bq_format=flmf (default)
7605          f -> l, m -> f, others unchanged if processed.
7606
7607   3. lpr -k option is now re-enabled to allow lpr to handle
7608       pipe input without creating large data files.  Note
7609       that if you kill programs off then you might end up
7610       with a truncated job.
7611
7612       You can use:  cat | lpr -k  OR cat | lpr -k -- -
7613
7614   4.  You can now have :lpr= Command Line Options
7615      This will prepend the command line option flags to the lpr
7616     command.  Note that this now allows you to set up a user printcap
7617     entry that has command line options suitable for lpr.
7618
7619   5. Super lightweight no spooler printing to devices
7620      with filter support.
7621        New command line options:  -B, -X filter, -Y
7622        New printcap option: :direct
7623
7624      SEND JOB DIRECTLY TO REMOTE TCP/IP PORT:
7625          lpr -Y -Phost%port file1 file2
7626       OR:
7627          use :direct flag in printcap
7628          In your ${HOME}/.printcap or /etc/printcap file put:
7629            lp:direct:lp=h14%9100:remote_support=R:client
7630          And use:
7631            lpr -Plp file  (:direct is effectively the same as -Y)
7632
7633          Effectively:
7634            ( for i in file1 file2 ; do ${filter} <$i; done ) > h14%9100
7635          where ${filter} is chosen from the printcap entry.
7636
7637          Note: if you do not specify a file then this reduces to reading
7638                  from STDIN, e.g.-
7639                  ${filter} > h14%9100
7640
7641      NOTE EXTREMELY WELL- for 1 file jobs:
7642             The STDOUT of the filter is the TCP/IP port connection.
7643      This allows the filter to get status and other information from the
7644      remote printer.
7645
7646      SEND JOB VIA A PROGRAM (SAMBA smbclient, for example):
7647
7648          lpr -Y -P '|/smbclient //server/share' file
7649       OR:
7650             lp:direct:lp=|/smbclient //server/share:remote_support=R:client
7651          lpr -Plp file
7652             Effectively:
7653                   ${filter} <file |/smbclient //server/share
7654
7655      SEND JOB TO LPD SPOOLER (Network Print Server):
7656          Ummm... well we already do this.  The :direct flag
7657      and the -Y flag are basically NO-OPS for this.
7658
7659          lpr -Y -P pr@host file  == lpr -Ppr@host file
7660        OR:
7661          lp:direct:lp=pr@host:client
7662             == lp:lp=pr@host:client
7663
7664          lpr -Plp file1 file2
7665             Effectively:
7666            for i in file1 file2; do filter $i >temp.$i ; done
7667             lpr -Ppr@host temp.file1 temp.file2 ...
7668
7669      USER SPECIFIED FILTER:
7670
7671      To use a user specified filter: lpr -X filter
7672
7673        Example
7674           lpr -Y -Phost%port -X userfilter file
7675        OR:
7676           lp:direct:...:filter=userfilter:client
7677
7678           Effectively:
7679               cat file | userfilter >host%port
7680
7681      NOTE EXTREMELY WELL- for 1 file jobs:
7682             The STDOUT of the filter is the TCP/IP port connection.
7683          This allows the filter to get status and other information from the
7684           remote printer.
7685
7686
7687       SPECIAL CASE for lp=queue@host:
7688
7689            lpr -X userfilter -Pqueue@host file1 file2
7690            Effectively:
7691              send control file;
7692              for i in file1 file2 ; do
7693                 userfilter $i > tempfile
7694                 send tempfile;
7695              done
7696
7697       EXTREMELY SPECIAL CASE:  -k option
7698
7699          The -k option with RFC1179 spooling AND a single file will
7700          case the following actions to be taken:
7701
7702                send control file
7703                send a 'expect BIG file' command
7704                cat userfile | filter > server
7705
7706         You can also add -X userfilter and get:
7707
7708                send control file
7709                send a 'expect BIG file' command
7710                cat userfile | userfilter > server
7711
7712
7713       This is done so that you could run
7714    lpr as a filter and send HUGE data files to the printer.
7715    This is done by invoking the '0 length file is read to
7716    EOF' facility of RFC1179.  Unfortunately,  this is
7717    not supported by all network print spooler boxes,  so the
7718    'fakelargefile' option allows you to fake this by sending
7719    a very large file number (in K bytes).  I suggest using
7720    1000000 - i.e. - a 1 Gigabyte file.
7721
7722 Start of a new branch:
7723  iNTERNATIONALIZATIOn (i18n) Support Revisted
7724
7725 iNTERNATIONALIZATIOn support has been reviewed and incorporated
7726  in a much more stable and maintainable manner.  Rewrote the
7727  ABOUT-NLS.LPRng file.  Modified the Makefile to update version
7728  information in the po/*.po files as well.  Reviewed much of the
7729  error message and status messages,  and added them to the translation
7730  list.  Added the N_() facility for 'static' messages and tables.
7731
7732  On 4 Sep 2000,  a compromise problem with the gettext facility
7733  was announced.  This was based on the standard 'fprintf' functions,
7734  which have a '%n' option to allow values to be written to memory.
7735  I have totally eradicated the use of the standard printf, fprintf,
7736  and so forth,  and use a safe version of snprintf without this
7737  capability.  This allows LPRng to be used on systems where similar
7738  attacks can be launched.  In addition, if the executable is running
7739  with uid or euid 0 (i.e. - root), then NLSPATH environment variable
7740  is unset.  This may break some of the 'set process name' code on
7741  some systems, but I cannot think of another method that will do this.
7742
7743 You can now use FreeBSD/BSDI/ and most likely some other newer versions
7744  of the BSD Make in addition to GMake.  What a pain this was.
7745  If your make supports VPATH it should work.  Hopefully.
7746
7747 GDBM used to store information.  This now makes handling LARGE numbers
7748  of files, etc., in a spool queue directory feasible.  Needless to say,
7749  status generation time is VERY small.
7750
7751  There are several caveats on this. If you kill off the lpd server
7752  when it is in the middle of updating the database file,  you will
7753  end up corrupting the database file or having an incomplete one.
7754  To resolve this problem, the 'checkpc -f' command can be used,
7755  as well as the 'lpc flush' command.  Also,  the initial queue
7756  scan done at system startup will rebuild the databases.
7757
7758 IPV6 portability was not quite there.  Some minor fiddles.  So I stopped
7759  playing the violin.  Maybe some time in the future.
7760  (Fiddling done and patch supplied by: John Perkins <john@cs.wisc.edu>)
7761
7762 Fixed the lpq.c status trimming functions to be a little more robust.
7763  Also, put back the recursive lpq functionality.
7764  (Recursion loss spotted by: Christoph Beyer <christoph.beyer@desy.de>)
7765
7766 The lpraccnt program is removed from the distribution.  The 'monitor' program
7767  can be used instead.  I wonder why I had two of these in the distribution.
7768
7769 The load balance queues are now treated like 'first class' queues and jobs
7770  moved to them are treated like incoming jobs.  This allows all of the
7771  incoming filters to be run,  routing to be done, and other abuses
7772  far too esoteric to grace these CHANGES notes.  This involved doing some
7773  very odd things with chdir(), etc. to make sure that the filters would
7774  run with the correct directory.  Also, status information for load balance
7775  queues changed so that you don't get silly messages about non-existent
7776  jobs which have been moved to the load balance queue.  Fixed up problems
7777  when you run out of file space with load balance queues.  Fixed up debug
7778  and status file information logging with load balance queues.  Fixed
7779  a really silly design flaw in Setup_printer() that closed the status
7780  file just when you did not want it closed - and then truncated it.
7781  Debug file is now closed and opened only ONCE during a call to Do_queue(),
7782  making it possible to debug the queue service.  All in all, a really
7783  thorough redoing of the queue handling was necessary to make them
7784  into first class citizens.
7785  (Motivated by the questions of: Jason Keltz <jas@cs.yorku.ca>)
7786
7787 lpd now mumbles at you when you try to start it up and it has
7788  problems.  Of course, most folks do 'lpd >/dev/null 2>&1' but
7789  we will ignore them...
7790  (Inspired by the well chosen arguments of:
7791   <eric@lammerts.org> and Craig Small <csmall@eye-net.com.au>)
7792
7793 lpd now CORRECTLY opens output filters - lp=|/path
7794  (Spotted by: Seth Chaiklin <seth@psy.au.dk>)
7795
7796 LPRng-HOWTO - Samba example corrected
7797  (Correction by: Philippe Weill <philippe.weill@aero.jussieu.fr>)
7798
7799 lpd_port=[ipaddr%]port now will cause lpd to bind to the interface with
7800   the specified IP address.
7801   (Prompted by the whingings of some anonymous Debian user and
7802     forwarded by: Craig Small <csmall@eye-net.com.au>)
7803
7804 checkpc runtime help was wrong.
7805   (Spotted by: James P. Dugal <jpd@louisiana.edu>)
7806
7807 INSTALL_PREFIX replaced by DESTDIR to be consistent with other distributions
7808   and packages.
7809
7810 lp -f formname now makes the CLASS information 'formname' as well.
7811   (Inspired by: Dave Lovelace <dave@fci.izzy.net>)
7812
7813 In LPRng/common/linelist.c,  many missing checks for null pointers.
7814   (Found in a core dump supplied by: Mike Whitson <mwhitson@MIT.EDU>)
7815
7816 lpr -o option is now the same as lpr -Z option
7817   (Suggestion to save sanity of SYSV users by: Joseph Krahn <jkrahn@nc.rr.com>)
7818
7819 lpq did not always have a space before job file size.
7820   (Noted by: Jonathan Briggs <jbriggs@esoft.com>)
7821Release LPRng 3.6.26 Fri Oct 13 07:38:38 PDT 2000
7822 unsetenv() is not available on some systems.  Fallback
7823   to setenv and then putenv() if not present
7824 (Found by: Niklas Edmundsson <nikke@ing.umu.se>)
7825
7826Release LPRng 3.6.25 Tue Oct  3 09:19:11 PDT 2000
7827 syslog Compromise -
7828   modified syslog to use 'syslog(xx,"%s", msg).
7829 gettext Compromise -
7830   added the following to Initialize():
7831    if( getuid() == 0 || geteuid() == 0 ) unsetenv("NLSPATH");
7832 IN6_ADDR removed,  in fact IPV6 stuff removed.
7833
7834   See the various CERT advisories.  Sigh...
7835
7836Release LPRng 3.6.24 - Fri Aug 11 08:03:23 PDT 2000
7837 LPRng-HOWTO - added update for Samba print queue configuration.
7838 LPRng-HOWTO - added section on how to configure Solaris lp printing
7839  to communicate with LPRng.
7840  (Changes courtesy of: Gerald Damian <gdamian@ford.com>)
7841 Typo in gethostinfo.c spotted.
7842  (Courtesy of the debugging talents of: Robin Sommer <rsommer@uni-paderborn.de>)
7843 And I removed the wrong line so that the data files were not being
7844  deleted when a job was completed.  Helps to read the control file and
7845  get the data file names...
7846  (Pointed out by: Thomas Emmel <emmel@mechanik.tu-darmstadt.de>)
7847 There was a 'cut and pasteo' that caused me to use the wrong value
7848  to get trim lpq status.
7849  (Core dump and clues supplied by: John Perkins <john@cs.wisc.edu>)
7850 LPRng HOWTO - added small section on setting up Solaris lp queues to
7851  forward jobs to LPRng/BSD printers.
7852 IPV6 Support fixed up a bit to actually work...
7853  (Spotted during testing,  now that we actually have IPV6 working
7854  on our router.)
7855 Added a 'flush cached status' when a spool server exits.  Now you
7856  get the correct status when there is no active server.
7857 Modified the 'Read_write_timeout' code to be consistent with reading
7858  status from parallel port printers the way that the ifhp filter
7859  does it.
7860 Found a minor sillyness in the 'send_to_logger()' code - I carefully
7861  format data and then toss it way.  Now I do checks first.
7862 Fixed up lpq status generation - only read a small part of the status
7863  file for information.
7864
7865Release LPRng 3.6.23 - Fri Aug 11 08:03:23 PDT 2000
7866
7867 The Linux Printing Summit was held from July 27-28, 2000
7868  in San Jose,  and was Sponsored by VA Linux.  There was an
7869  extremely enjoyable interchange of views between all of the
7870  various interested factions.  You will see some additional changes
7871  in LPRng as a result of these meetings and the input from users
7872  and developers.
7873
7874 Support for status caching has been incorporated in LPRng.
7875  In addition, 'spool queue lookup throttling' has been
7876  added in order to improve the speed of status gathering.
7877  And there are now facilities to control the format of returned
7878  status.
7879
7880  This is implemented as follows:
7881
7882    a) Each queue has a file containing keys corresponding to
7883       status queries.  For example, if you do 'lpq' then the
7884       query key would be "4_"  corresponding to the "\004\n"
7885       query sent to the server.  If you do 'lpq this that'
7886       you have the key "4_this_that_" and so forth.
7887
7888    b) Corresponding to each query is a file containg the status
7889       for the query.  If the status is 'stale', that is,
7890       older than 'lpq_status_stale' seconds,  then the lookup
7891       is redone.
7892
7893    c) When a job is submitted to a queue,  or the status of a job
7894       changes,  or a control operation is performed on the queue,
7895       then the cache is flushed.  Currently,  this means that
7896       the status has to be regenerated for all queries.
7897
7898    d) If the queue status was changed less than 'lpq_status_interval'
7899       seconds ago,  then the cached status (if any) will be used.
7900
7901    e) If the process needs to update the print queue, it will
7902       attempt to lock the status file.  This means that at most
7903       one process will be scanning the print queue for status
7904       at a time.  This has had an extremely good improvement on
7905       status reporting, especially under high load conditions
7906       and multiple processes attempting to scan the queue.
7907       This locking actually improved throughput much to my
7908       surprise.  A careful analysis showed that by having only
7909       one or two processes scanning the directory at a time,
7910       the OS was better able to cache and buffer data.  In actual
7911       fact,  the second process would then find the files that
7912       it was looking for already in memory or in the buffer cache.
7913       Also,  if the two processes were getting the same data
7914       (lpq -a),  the first one would set up the data in the cache
7915       and the next one would simply read the cached data.
7916
7917  The 'lpc flush' command has been added to flush all of the
7918    cached status.  This was added for testing and for administrative
7919    purposes.
7920
7921  A new Super Secret option (well, it is documented now) has
7922    has been added to the 'lpq' facility.  The following
7923    only works with LPRng servers (as of this release, of course):
7924
7925        lpq -- -lines=N   (in general: lpq -- -opt=v,opt=v)
7926
7927    The '-lines=N' is passed directly through to the LPRng
7928    lpd server,  where used to set the size of the returned status.
7929    It is NOT propagated to other servers,  BUT it is used to
7930    truncate status returned from them.  This will effectively
7931    give you a VERY compressed status extremely quickly when
7932    combined with the caching facility.
7933
7934    The -- is used to indicate that the -lines=N is actually an
7935    option to be passed through to the server.  This capability
7936    has been in LPRng,  but this is the first documented use
7937    of it that will be supported.
7938
7939    The addition of this facility has some interesting implications.
7940    You can now have a VERY lightweight lpq facility,  for getting
7941    the status of one printer,  if you know the server it is on:
7942
7943    echo "\004printer -lines=2 xx xx xx" > nc host 515
7944     (nc is the 'netcat' program written by mudge@avian.org)
7945
7946    Of course you do not have authentication,  etc., but this is
7947    One Of Those Tradeoffs.  YOU ARE WARNED: USE THE SOCKET CONNECTION
7948    METHOD AT YOUR OWN RISK AND DON'T WHINE WHEN YOU DISCOVER THAT
7949    THE LACK OF AUTHENTICATION IS CAUSING YOU PROBLEMS.  If this
7950    is a problem, use the 'lpq' application and turn on authentication.
7951
7952    On the other hand,  you can now get printer status WITHOUT the
7953    use of an 'lpq' process to format it.  I expect the various
7954    folks building WebServer interfaces for LPRng print status will
7955    be more than happy now, as this works well in a multi-threaded
7956    environment,  is strictly socket/connection based.
7957
7958    Another benifit is that NonLPRng (can you say Microsoft?)
7959    based applications can now use the -lines=N entry to select
7960    the amount of status that they want returned.  This allows
7961    remote clients not LPRng based to select the level of verbosity.
7962
7963  This work was inspired by the Samba Developers, especially Andrew
7964  Tridgell, John Terpstra, and Jeremy Allison,
7965  <http://www.samba.org/samba/team.html>,  and their presentations
7966  and discussions at the Linux Printing Summit held in San Jose,
7967  July 26-31, Sponsored by VALinux.
7968
7969 You can now specify a filter for your input files at the user level.
7970  This is to support the requirements and/or desires of the various
7971  users of print spooling software to have a filter applied at the
7972  application end.
7973
7974  The syntax is:
7975     lpr -X /path file1 file2
7976  equivalent to:
7977     for each file in filelist; do
7978       tempfile=maketempfile;
7979       /path <$file >$tempfile
7980     end
7981     lpr $tempfile1 $tempfile2 ...
7982
7983  The filter is invoked once per job file,  on each job file.
7984  The options passed to the filter are the usual ones for all
7985  LPRng filters.  Some will not have any meaning,  such as job
7986  number, etc., and will not be present or have a '0' value.
7987  The filter will run as the user's id, and will not have root
7988  capabilities.  If this is needed,  then the filter must have
7989  the capability of acquiring them.
7990
7991  This work was inspired by the GIMP Project presentation of Robert
7992  Krawitz <rlk@alum.mit.edu> http://www.tiac.net/users/rlk/ Project
7993  lead for The Gimp Print --  http://gimp-print.sourceforge.net at
7994  the Linux Printing Summit held in San Jose, July 26-31, Sponsored
7995  by VALinux.
7996
7997  I ran into problems with the SysV to LPRng option passing. Apparently
7998   different versions of SysV printing pass options as S, O, or
7999   whathave you values in the control file.  The prefix_o_to_z
8000   option has been replaced by the more general 'prefix_option_to_option'
8001   facililty.  This specifies the control file option lines to
8002   prefix to a control file option line.  For example:
8003
8004    prefix_option_to_option=S,O Z  will prefix S and O to Z
8005    prefix_option_to_option=Z O    will prefix Z to O.
8006
8007    This now appears to cover all cases,  and the LPRng HOWTO
8008    has been modified as well.
8009
8010  The simple minded 'send mail to user' facility had some problems.
8011   I fixed them up,  and added a 'sendmail_to_user' flag that allows
8012   the facility to be disabled for sending mail to users,  but still
8013   sends mail to operator.  I have also updated the HOWTO with some
8014   notes about using this facility.
8015   (Patches sent by: Maja Gorecka-Wolniewicz <M.Gorecka-Wolniewicz@cc.uni.torun.pl>)
8016
8017  Several calls to Print_job(...) assumed that a file will respond with
8018   status information,  as would a real printer.  Not a good assumption.
8019   I wonder where my mind is at somedays...
8020  The 'Network Grace' timeout should only be used when a server is trying
8021   to connect - clients should not have to wait.
8022
8023  I have once again changed the checkpc code to be very very very
8024   conservative in what it removes from the spool queues.  This will make the
8025   folks who use netatalk,  etc.  very happy.  The bad news is that files
8026   put into these directories by other tools will not get removed.  C'est
8027   la vie,  C'est la guerre...
8028   (Patches inpiring the changes sent by: "William R. Knox" <wknox@mitre.org>)
8029
8030  pclbanner had a stupid typeo left over from debugging.
8031   It wrote debugging information out to /tmp/before
8032  The 'lpr_bounce' code did not work after the last fix to solve problems
8033   with Print_job closing files.  Now you can use filters again from lpr.
8034
8035  I have added the 'wildcard' print queue names and 'incoming_control_filter'
8036   options.  Together, they implement a way to put options and
8037   other information into the control file when a job is submitted.
8038   This method was exploited by Adeel Khurshid <kurshid@cs.odu.edu>
8039   while at Fujitsu Network Communications,  and is used by the
8040   'apsfilter' by Andreas Klemm and Thomas Bueschgens.
8041
8042     Example:
8043      lp|lp_*:lp=%P@server
8044      lp|lp_*:server
8045        :incoming_control_filter=/.../update_z
8046        :...
8047
8048   When you use lpr -Plp_landscape_ledger you will actually end up
8049   sending the job to the lp queue, with the queue name (Q control
8050   file line) set to lp_landscape_ledger.  This information can be
8051   used to update the various control file lines.  The LPRng/UTILS/update_z
8052   file has an example of a script that will do this.  Note that this
8053   makes the use of the apsfilter utility even easier.
8054   (Inpired by a control filter by: Adeel Khurshid <kurshid@cs.odu.edu>)
8055
8056  I removed a couple of bogus entries that I was putting into the
8057   job control file.  These appear to be holdovers from some testing.
8058   They were put in but never used.  Strange, that.
8059
8060  The append_z, prefix_z, and other related Z operations are done
8061   only when the job is received.  This now allows the job to be
8062   processed by filters and not have the work undone.  sigh.
8063   Documentation cleaned up as well.
8064
8065  The control file processing has been cleaned up and the redunant
8066   and erroneous (sigh) copy of the control file in the job{} data
8067   structure has been ruthlessly purged.  I sure wish Ruth worked
8068   for me,  I seem to be doing so much ruthless cleanup.
8069   I see the hand of testing and debugging in much of this stuff,
8070   and the tracking down of memory leaks as well.
8071
8072  You can now use [^x] in the glob patterns.  Sigh...  The things
8073   people do when they get the bit in their teeth.
8074
8075  The LPD support for 'lpq' and 'lprm' requests has been modified so that
8076   if there are chained queues and each queue is on the server THEN
8077   I simply call a routine and do not fork a process.  This solves a
8078   problem with process exhaustion when somebody had a loop in their
8079   printcap.  I also put in some tests for this.  However, without
8080   adding Yet Another Option to the LPRM and LPQ stuff I don't see
8081   how I can do it.
8082
8083  You can now send up to 'max_jobfiles' (default 52) to the server.
8084   Note:  you can actually only send 52*52 = 2704
8085   The data files are given names
8086     dfAnn -> dfZnn -> dfann -> dfznn ->
8087     dgAnn -> dgZnn -> dgann -> dgznn ->
8088     dzAnn -> dzZnn -> dzann -> dzznn ->
8089     daAnn -> daZnn -> daann -> daznn ->
8090     deAnn -> deZnn -> deann -> deznn ->
8091     dAAnn -> dAZnn -> dAann -> dAznn ->
8092     dZAnn -> dZZnn -> dZann -> dZznn
8093
8094  There is now support for the HP extensions:
8095  (Courtesy of Richard Hart USG <hart@zk3.dec.com>,
8096    who sent me the following information)
8097
8098     Summary of HP's Extensions to RFC-1179
8099
8100     1. 4-Digit Job Numbers
8101     HP preserves the System V-style 4-digit sequence number, or job number, in
8102     file names and attributes, while BSD uses 3-digit job numbers.
8103
8104     2. Control and Data File Naming Conventions
8105     Control files are named in the following format:
8106        cA<seqn><host>
8107        <seqn> is the 4-digit sequence number (aka job number).
8108        <host> is the originating host name.
8109     The data file naming sequence format is:
8110         dA<seqn><host>   through   dZ<seqn><host>     followed by...
8111         da<seqn><host>   through   dz<seqn><host>     followed by...
8112         eA<seqn><host>   through   eZ<seqn><host>     followed by...
8113         ea<seqn><host>   through   ez<seqn><host>     ... etc. ...
8114     So the first data file name in a request begins with "dA", the second with
8115     "dB", the 27th with "da", the 28th with "db", and so forth.
8116
8117     3. HP-Specific BSD Job Attributes (Control File Lines)
8118     The following control file lines are extensions of RFC-1179:
8119        R<login>
8120           Write to the named login's terminal when the job is complete.  This is
8121           an alternate to the RFC-1179-style e-mail completion notification.
8122           This notification is selected via the lp "-w" option.
8123  -- R line -> M line
8124        A<priority>
8125           Specifies the System V-style priority of the request, a single digit
8126           from 0-7.
8127  -- A value -> priority
8128        N B<banner>
8129           Note that this line begins with an "N", a space, and then a "B".  The
8130           argument is the banner page title requested via the lp "-t" option.  If
8131           that option was not given then the argument is null.
8132  -- banner -> T banner
8133        N O<options>
8134           Note that this line begins with an "N", a space, and then an "O".  The
8135           argument contains the System V-style "-o" options specified in the lp
8136           command line.  The option names appear without a leading "-o".  The
8137           first option name begins in the fourth character of the line; each
8138           option is separated by a blank.  If no "-o" options were given then the
8139           argument is null.
8140  -- <options> -> appended to Zvalue <options>
8141
8142     The following control file lines are generated differently than in standard
8143     BSD:
8144        J<jobname>
8145           The argument is the System V-style request-ID, for example,
8146           "printer-42".  Note that leading zeros are not present in the sequence
8147           number.  If a System V-style title is requested then it is sent using a
8148           "N B" attribute, and not the "J" attribute.
8149
8150  There is now a new and improved error message for fumble fingers:
8151   h4: {1185} % lpq -Pxx
8152   Printer: xx@h4 - ERROR: spool queue for 'xx' does not exist on server h4.private
8153      non-existent printer or you need to run 'checkpc -f'
8154   h4: {1186} % lprm -Pxx
8155    ERROR: spool queue for 'xx' does not exist on server h4.private
8156      non-existent printer or you need to run 'checkpc -f'
8157   h4: {1187} % lpc -Pxx status
8158    Printer           Printing Spooling Jobs  Server Subserver Redirect Status/(Debug)
8159   xx@h4: spool queue for 'xx' does not exist on server h4.private
8160      non-existent printer or you need to run 'checkpc -f'
8161   I hope that this cuts down on the problems reported by people who do not
8162   RTFM about 'checkpc -f'.
8163
8164  I have added code to track the maximum open file descriptor so that
8165    the 'cleanup' code is a little more intelligent.
8166
8167Release LPRng 3.6.22 - Sun Jul 23 17:37:02 PDT 2000
8168  There is yet one more problem with high load levels -
8169   I did not set the timeout to reasonable value and the lpd server
8170   goes into a tight loop waiting for it.
8171
8172Release LPRng 3.6.21 - Sun Jul 16 16:58:19 PDT 2000
8173  Clean up some Tru64 system warnings about casts.
8174   (Supplied by: "Justus J. Addiss" <jjaddiss@mmm.com>)
8175  Seemed to have found a solution to the parallel port problem
8176   by brutally using fstat() to see if we have a device,  and if
8177   so, then unless it is a tty, assuming that it is a write only
8178   device.  This is stupid,  and I just KNOW that when somebody
8179   adds a USB device I will suffer for this.  When you have a
8180   'write only' file descriptor,  you just do a 'write' with timeout.
8181   No select, nothing.  Just a write.  This seems to solve the
8182   problem.  Oh yes.  You also make sure the file descriptor
8183   is non-blocking.
8184   (By:  Patrick Powell <papowell@lprng.com>)
8185  There is a bizzare problem with doing select for read on some Solaris
8186   systems with certain patch sets on file descriptors that have
8187   been set for non-blocking.  The select call will actually return
8188   and indicate that the device can be read...  But when you do,
8189   you get -1, and EUNAVAIL or some similar code indicating no data
8190   to be read.  This is truly bizzare.  To ensure that this does
8191   not happen,  you must do a select on a nonblocking file descriptor.
8192   To add injury to insult,  this seems to not be reliably reproducible.
8193   You really had to be there for this one.  I now set all the file
8194   descriptors into blocking mode and then do select,  then put them
8195   in nonblocking mode to do the write or read.
8196  The mysterious 'lpc reread' killing lpd was discovered to be caused
8197   by trying to free an already freed pointer, which was garbage.
8198   This was related to cleaning up the memory leak problem in 3.6.20.
8199   Sigh...
8200  I cannot spell krbros... krb5... or kb5... and thus cannot invoke the
8201   dog in the configuration script.
8202   (Happily pointed out by:  John Perkins <john@cs.wisc.edu>)
8203
8204Release LPRng 3.6.20 - Sat Jul  8 12:32:38 PDT 2000
8205  One of the silly memory leaks that has been reported, tested for,
8206   analyzed, etc., finally was found.  The problem was in the
8207   child.c file,  where I keep track of children processes
8208   by dynamically allocating a list.  While I carefully cleaned
8209   up the list in children of the main LPD process,
8210   I never cleaned up the list in the main LPD process.  Thus,
8211   if you created a large number of children the list would grow
8212   a small amount (4 bytes) for each child.
8213   This problem was found by brutally using the 'DMALLOC' debugging
8214   package,  finding every 'malloc' call in the main LPD process
8215   and then looking for a matching free call in the main line loop.
8216   When one was not found for the case where I had 0 processes
8217   I knew that I had found the problem.  Sigh.
8218   (Stumbled over after staring at the code for a week by:
8219      Patrick Powell <papowell@lprng.com>)
8220  Makefile now checks that POSTINSTALL is 'NO' or 'no'
8221    (Noted by: Craig Small <csmall@eye-net.com.au>)
8222  checkpc -C and checkpc -c file removed.  Legacy options and
8223   I don't know why they were still there.
8224   (Noticed by: Jesper Dangaard Brouer <hawk@diku.dk>)
8225  The call to 'Remove_tempfile()' routine was removed from
8226   the 'cleanup()' when trying to find the above mentioned memory
8227   leak and was not put back.  Bad Coder! Bad!
8228   (Found by: A Earle <ae@play.psych.mun.ca>)
8229  The pclbanner and psbanner had some errors that showed up under
8230   bash.  Very odd that the ksh and /bin/sh did not whoop on them.
8231   (Clever debugging by: David Livingstone <davidl@cn.ca>)
8232  checkpc -r -A was a little too agressive and it blew away all
8233   sorts of files.  The -r now only works on job files.
8234   I do NOT remove job files unless the -r -A age options are
8235   given.  This prevents some problems with jobs being moved
8236   into a queue just as checkpc is being run from cron.  Sigh...
8237   Cron.  I forgot all about Cron.
8238   (Noticed by: Craig Small <csmall@eye-net.com.au>)
8239
8240
8241Release LPRng 3.6.19 - Sun Jun 25 11:13:35 PDT 2000
8242  The filter status was not getting used correctly.  This was
8243   a side effect of trying to clean up aborted jobs and
8244   accounting.  One step forward, one step back.  Sigh.
8245  The Tru64 compiler objects to casting pointers to ints, so
8246   we have to cast to a long THEN to an int.
8247   (Reported by: Justus J. Addiss <jjaddiss@mmm.com>)
8248  Did not update the 'Tempfile' variable when I was checking multiple
8249   print queues.  This meant that it was using a stale queue name.
8250   Only shows up if the queue directories are on different
8251   file systems.
8252   (Spotted by the eagle eyes of: Robin Sommer <rsommer@uni-paderborn.de>)
8253  Apparently the CHANGES file had 'z_append' instead of 'append_z'.
8254   So it is changed.  Do we need a Meta-CHANGES file to record changes
8255   to the CHANGES file?
8256   (Caused by the readings of: Michael J. Carter <mcarter@lanl.gov>)
8257
8258Release LPRng 3.6.18 - Mon Jun 19 09:37:04 PDT 2000
8259  The UTILS/accounting.pl script did not handle malformed
8260  lines caused by truncation well.   It now does,  but
8261  insists that you have lines starting with
8262    start, filestart, end, fileend for status.  This ties
8263    into ifhp-3.6.15
8264  Updated the DISTRIBUTIONS/FreeBSD to make the port correctly
8265  Updated the DISTRIBUTIONS/RPM to make the port correctly
8266  Changed the psbanner font to a more readable font
8267   (Artistic criticsm by: Bodo Moeller <moeller@cdc.informatik.tu-darmstadt.de>)
8268  Lowercased DNS lookup return values.
8269   (Need discovered by: Alf Wachsmann <alfw@slac.stanford.edu>)
8270  Tru64 cc compiler whoops its cookies on void * conversions...
8271   (Reported by:  Justus J. Addiss <jjaddiss@mmm.com>)
8272
8273Release LPRng 3.6.17 - Sat Jun 17 15:58:21 PDT 2000
8274  Analysis of the Setuid Compromise for LINUX done; LPRng
8275   is only susceptible if a non-root user manages to run a client
8276   program that in turn runs a program that she has compromised.
8277   Since the programs run by LPRng and other servers should owned
8278   by root and not writable,  this would require the compromiser
8279   to have already modified these - by alreadying having root perms.
8280   This means that they have already compromised the system.
8281
8282   Replaced the agressive 'check at all times and costs' with
8283    a) a configure time check for the 'bad linux kernel'
8284    b) a run time check done only by clients for a compromise.
8285    c) not installing LPD setuid ROOT so that it cannot be
8286       started and used as a compromised process.
8287
8288Release LPRng 3.6.16 - Thu Jun  8 15:24:37 PDT 2000
8289  Long numbers and the silly 'is this really and IP address code'
8290   conflicted.  Fixed it again.
8291   (Spotted and reported 32 minutes after the release was out by:
8292      Thomas Vogt <t.vogt@drgueldener.de>)
8293  Did not check for null pointer, the following printcap was not
8294    read correctly:
8295      .junk:
8296      stuff:tc=.junk  <- ummm... nothing there, CRASH
8297   (Spotted and reported 30 minutes after the release was out by:
8298      Justus Addiss <jjaddiss@mmm.com>)
8299  Changed :as and :ae checks so that you can use :as=/path as well as
8300    :as=|/path
8301   (Inspired by comments from: Sree Lakshmi <chinnu@jncasr.ac.in>)
8302  pclbanner did not work under RedHat.
8303   (Spotted by:  David Kerr Livingstone <davidl@cn.ca>)
8304  Goofs in the HOWTO spotted.
8305   (Spotted by: Zanferrari Domenico <domenico.zanferrari@kone.com>)
8306  Updated the HOWTO format.  Now using DocBook to generate output.
8307  RPM packages not generated correctly
8308  If the -Dxxx option is the VERY FIRST on the command line,
8309   then you set up the debug options very early in the parsing
8310   and operation.  This can lead to a GREAT deal of rubbish unless
8311   you need it.
8312
8313Release LPRng 3.6.15 Thu Jun  8 15:24:37 PDT 2000
8314  postinstall.generic.sh was sytactically incorrect.
8315   (Patch by:  Justus Addiss <jjaddiss@mmm.com>)
8316  RPM Fixes:
8317    /usr/docs/LPRng now removed
8318  Linux (and possibly other) SETUID BUG compromise detection
8319    added.  The setuid(n) call is supposed to be a one-way trip to
8320    uid n,  but this can be compromised by users setting
8321    flags.  Present in kernels before 2.2.16,  and possibly
8322    other capabilities based systems.  Added a test to make sure
8323    that this is really a one-way trip.
8324       As far as I can tell,  this would only be an issue if the
8325    user had a shell script that was executed by LPRng and the script
8326    could be replaced by something else.  This is possible in systems
8327    which are using NFS - I have exercised the compromise and it
8328    exists.
8329
8330Release LPRng 3.6.14 Sat May  6 08:46:26 PDT 2000
8331
8332  configure now has --with-lockfile=path.
8333   (Courtesy of:  Willi Burmeister <wib@cs.uni-kiel.de>)
8334   Complete configure options are now:
8335
8336  --with-cc=COMPILER      select compiler to use
8337  --with-ccopts=CFLAGS    select compiler command line options
8338  --with-linker=LINKER    select linker to use
8339  --with-ldopts=LDFLAGS    select linker command line options
8340  --with-cppopts=CPPFLAGS  select compiler preprocessor command line options
8341  --disable-setuid                  disable setuid root client and server executables
8342  --enable-priv_ports               require connections to be from privileged ports
8343  --disable-force_localhost         force_localhost default to disabled
8344  --disable-require_configfiles     client programs require lpd.conf, printcap
8345  --enable-kerberos                 enable kerberos support
8346  --enable-mit_kerberos4            enable MIT Kerberos 4 support
8347  --disable-kerberos_checks         disable kerberos library location and checking for support
8348  --with-lpddir=DIR                 lpd executable directory (default ${sbindir})
8349  --with-lpd_conf_path=PATH         path of lpd.conf (default: ${sysconfdir}/lpd.conf)
8350  --with-lpd_perms_path=PATH        path of lpd.perms (default: ${sysconfdir}/lpd.perms)
8351  --with-printcap_path=PATH         path of printcap (default ${sysconfdir}/printcap)
8352  --with-lpd_printcap_path=PATH     path of lpd_printcap (default ${sysconfdir}/lpd_printcap)
8353  --with-lockfile=PATH              lockfile PATH, default /var/run/lpd
8354  --with-ld_libary_path=PATH        LD_LIBRARY_PATH value
8355  --with-filter_path=PATH           filter PATH value
8356  --with-userid=NAME                run LPRng software as this userid, default daemon
8357  --with-groupid=NAME               run LPRng software as this groupid, default daemon
8358  --with-chooser_routine=NAME       load balance queue chooser routine name in user object file
8359  --with-order_routine=NAME         queue order routine name in user object file
8360  --with-user_objs=NAME             user specified object file
8361  --with-user_include=NAME          include file with function prototypes for user object file
8362  --with-filterdir=DIR              filter directory (default ${libexecdir}/filters)
8363  --disable-strip                   disable stripping binaries by default
8364  --enable-nls           use Native Language Support
8365  --with-included-gettext use the GNU gettext library included here
8366  --with-catgets          use catgets functions if available
8367
8368  Terminal clearing now done by using 'clear' program.
8369   Configure will look for a clear program and LPQ will fork and
8370   exec it.  If no clear,  then simply send a '^L' or '\014' (form
8371   feed) to the stdout.  This is due to the horrible support in
8372   most OS's for curses, termlib, termcap, term...  well,  you get
8373   the idea.  For a true trip through hell, read the configure
8374   script for 'vim' and see what they do.  Not for me,  when this
8375   is only a VERY small part of a much larger system.
8376   (Changed after finding curses, ncurses, and sys5 curses on
8377     a system by: Patrick Powell <papowell@lprng.com>)
8378
8379  Makefile.bsd  is now a VERY small makefile:
8380    # List the things you want to generate:
8381    all clean install uninstall:
8382       gmake $(MAKEFLAGS) $@
8383
8384    I know that some of the BSD folks will hate me for this,  but
8385   I have decided that trying to support both types of Makefiles
8386   and making them work was just too much effort.  Also,  the BSD
8387   folks now have much better supporort for Gmake in their build
8388   scripts.  Also, see below... Enhanced Install and Package Creation
8389   Support.
8390
8391  Enhanced Install and Package Creation Support
8392   (Laid at the feet of: Craig Small <csmall@eye-net.com.au>)
8393    One of the problems that is encountered when trying to build a package
8394   or do an install is to compile stuff in one directory and then install
8395   it in another.  The trouble is,  you want to install it in a MIRROR
8396   directory.
8397   For example,  you have
8398    ${SYSTEMSRC}=/private/src,  where the source is,
8399    ${BUILD}=/var/tmp/BUILD/ where you are going to build all the stuff,
8400    ${MIRROR}=/var/tmp/MIRROR where you want to place what you created
8401
8402   The following is generally what is done during distribution creation to
8403   do this:
8404     cd ${BUILD}/.../LPRng;
8405     ${SYSTEMSRC}/.../LPRng/configure --prefix=/usr/local --sysconfdir=/etc
8406     make
8407     make install XX=${MIRROR} -> puts thing in
8408              ${MIRROR}/usr/local
8409              ${MIRROR}/etc
8410
8411   After trying 9 (nine) different variations on a theme,  I now have the
8412   following method to do this:
8413     make install INSTALL_PREFIX=${MIRROR} POSTINSTALL=NO
8414
8415   What is this?  The install script/steps will install files in
8416   ${INSTALL_PREFIX}${prefix}, ${INSTALL_PREFIX}${sbindir}, etc.
8417   etc., where ${prefix}, ${sbindir}, etc, are hardwired by the
8418   configure step to the /usr/local/, etc.  Now you might wonder
8419   why this is done.  The reason is that GMAKE, bless its little
8420   heart,  will use the $PREFIX environment variable value if it
8421   is set.  So you cannot do ${PREFIX}/${sysconfdir}  in install
8422   scripts,  and if you do not set it on the command line,  have
8423   it put in the right place.
8424
8425   The POSTINSTALL=NO is used to suppress 'true' postinstallation
8426   stuff that would copy files into 'unexepect' places, such as
8427   '/etc/printcap' or '/etc/lpd.perms' or '/etc/lpd.conf'.  Now
8428   if you are building a system distribution for raw install,
8429   then you want this to be done,  and you would use:
8430     make install INSTALL_PREFIX=${MIRROR}
8431
8432   If you are building,  say a FreeBSD 'package' distribution
8433   or a RedHat RPM then you would use:
8434     make install INSTALL_PREFIX=${MIRROR} POSTINSTALL=NO
8435
8436   Now for all of you who want to make a package and need to find
8437   the files that LPRng will install,  I suggest you look at the
8438   following:
8439
8440     INSTALL_PREFIX=/var/tmp/LPRng  #note that you do NOT export this
8441     (
8442    cd $INSTALL_PREFIX;
8443      mkdir usr/local/bin usr/local/sbin /usr/local/libexec /etc /usr/local/etc/rc.d
8444        ....
8445     )
8446     make; make install INSTALL_PREFIX=${INSTALL_PREFIX}
8447     (cd $INSTALL_PREFIX;
8448     find . -type f | sed -e '/man[0-9]/d' \
8449        -e '/\/info\//'d -e 's/..//'  >/tmp/files
8450     find . -type f | sed -n -e '/man[0-9]/s,.*man[0-9]/,,p' \
8451        -e 's/..//'  >/tmp/manpages
8452
8453   You can now find the non-doc files, manpages, etc. etc. etc.
8454   and then update the various locations as you need.  Clearly this
8455   should be done only as root,  on a system where you do not have
8456   other users running,  where somebody cannot do 'ln -s /etc/passwd
8457   /tmp/manpages' and so forth.
8458
8459   For a truly abusive use of this method,  look at the
8460   DISTRIBUTIONS/FreeBSD* and DISTRIBUTIONS/Solaris* directories.
8461
8462   Yes,  I have no shame.
8463   (Put into the distribution after telling people 5 times how
8464     to use this by:  Patrick Powell <papowell@lprng.com>)
8465
8466  lpr -U option did not work correctly when UID was root.
8467    (Patch happily submitted after a long search by:
8468        Roberto Togneri <roberto@ee.uwa.edu.au>)
8469  lpd was mangling jobs with more than 26 files - caseless compare
8470     strikes again.
8471    (Found with great consternation by: Peter Scheurer <scheurer@sopra-gmbh.de>)
8472  permissions and filters:
8473    When you use a filter for "perms_path" was not executed when a
8474    connection to the lpd is made. So there are no rules then and the
8475    result of the permission check simply is the default_permission (and
8476    it results in having no rules for the 'R'-check as well)
8477    By convention,  a line containing the name of the printer for which
8478    permission is wanted.  Now a blank line is written for 'X' rules.
8479    Added capability of filter getting permissions to Setup_printer().
8480    (Found by: Robin Sommer <rsommer@uni-paderborn.de>)
8481  lpd_jobs: race condition eliminated at the cost of a high system
8482    overhead when multiple jobs are spooled to the same queue.
8483    (Inspired by: Shawna Chase" <chase@crd.ge.com>)
8484  client connections on Solaris 2.5 systems fail with EADDRNOTAVAIL,
8485    and need a 'retry'.  Alternative is to use non-priveledged port.
8486    (Found by: Peter A. Harris <peter.a.harris@exgate.tek.com>)
8487  innetgr() needs FQDN on some systems, and 'shorthost' on others.
8488    Added check to do both.
8489    (Reminded by: Robin Sommer <rsommer@uni-paderborn.de>)
8490  syslog messages not working.  May need to add 'ordering' test to
8491    configure for level comparison.
8492    (Noticed by: Jurgen Northe <juergen.northe@junghans-fwt.de>)
8493  RFC1179 transfer failures to remote spool queue did not do retries
8494    correctly.  The 'JFAIL' status was treated as a permanent failure,
8495    not a temporary.  The 'Service_printer' code now uses the number
8496    of send attempts to do a retry and backoff on transfer times:
8497    configuration and/or printcap options:
8498      send_try:  maximum number of times to send to remote
8499        (0 = infinite) - default 3
8500      connect_grace: minumum time between attempts - default 0
8501      connect_interval: interval between attempts - default 10 sec
8502      max_connect_interval: maximum time to wait - default 60 sec
8503        if( attempt > 0 && max_connect_interval > 0 ){
8504            n = connect_interval * (1 << (attempt-1)) + connect_grace;
8505            if( n > max_connect_interval ) n = max_connect_interval;
8506            sleep(n);
8507        }
8508    (Discovered by: Christof Drescher <drescher@pro-image.de>)
8509  Default filter options were missing '$b'.
8510    (Pointed out by: Jose Carlos Rodrigues Lopes <jrl@europa.fcee.ucp.pt>)
8511  The md5 authentication support did not return back 'error' status for
8512    lpr operations.
8513    (Noticed by: Patrick O'Brien <pdo@cs.umd.edu>)
8514  The 'IS_OS' macros are now set to the OSVERSION;  this makes tests like
8515       #if defined(IS_BSDI) && IS_BSDI > 401
8516    possible.  Sigh...
8517  The filter_path (PATH environment value for filters) added /usr/contrib/bin
8518    (Suggested by: Jeffrey C Honig <jch@bsdi.com>)
8519  UTILS directory needs to be part of the global 'make' so that
8520    tools are created with the right paths.
8521    (Discovered when fixing a problem found by: Jeffrey C Honig <jch@bsdi.com>)
8522  check_for_nonprintable default is now OFF due to 85 distinct problems reported
8523    by various users.
8524    (Email that broke the camel's back sent by: John Hawley <jhawley@bgea.org>)
8525  lp -s was printing status.
8526    (Discovered and fix by:  Mark.Belton@mgc.com.au)
8527  proctitle() code was mangling the envp[] - this only showed up if you
8528    happened to set debug level 6 or higher.
8529    (Discovered by: Vincent Fox <vincent@cad.gatech.edu>)
8530  Microsoft now sends the IP address as part of the control
8531    and data file names.  OK.  We can handle that.
8532    (Pointed out by: Rainer Schoepf <schoepf@uni-mainz.de>)
8533  When using a routing filter, the DATAFILES environment variable
8534    contains the data files.  The routing filter can modify
8535    the datafiles,  but cannot remove them or truncat them.
8536  The default for bq_format is now 'f' - i.e. - you  can reprocess
8537    outputs of bounce queues.  The old default was l (binary),
8538    which was not processable.
8539  The 'lpq -s ID' command was not reporting information correctly.
8540    It always reported the total printable, not the ones selected
8541    by the options.
8542   (Discovered by: Patrick Powell <papowell@lprng.com>)
8543  Retested Kerberos 5 and Kerberos4 stuff with Kerberos 1.1.1,
8544   found problems with compilation,  fixed them.
8545   (Helped by: Mike Whitson <mwhitson@MIT.EDU>)
8546  Updated Version and Copyright information.
8547  Added configure --enable-kerberos option for folks who need to build
8548   'non-exportable' binaries.
8549  Added a '$(INSTALL_PREFIX) entry to the install scripts to allow folks
8550   who want to install the binaries in a different subtree to do so.
8551   I might make this 'PREFIX' to fit in better with feedback.
8552  More fixing of Kerberos stuff - fixed up the problems with different
8553   uses of krb5_xfree.  Added tests for the krb4des library.
8554   (Helped by: Mike Whitson <mwhitson@MIT.EDU>)
8555  The spool_file_perms option was not being used to set permissions for
8556   files in the spool directory.  Noted in the Debian LINUX bugs list.
8557   It was also noted that the user was trying to set some very odd permissions
8558   that would result in a possible security loophole,  but Hey!  I just
8559   do LPRng...  Users (not the LPD server) use 0600 permissions,  just
8560   to avoid those nasty security problems.
8561
8562  Nit pick on man pages: SEE ALSO should not reference same man page.
8563   (Submitted by: Debian Linux Bug List)
8564
8565  checkpc now checks for server printcap entries with lp=xxx and rm=yyy
8566   values.  This way you at least warn the users when they screw up.
8567   (Good suggestion by: Craig Small <csmall@eye-net.com.au>)
8568
8569  Moved tests for 'setproctitle' in configure around to deal with some
8570   problems of libraries being included when they should not have been.
8571
8572  Fixed up the distclean.  Removed junk files.  Move the LPRng_DOCS
8573   into the HOWTO,  as there were no other files left.
8574
8575  Fixed permissions.  Did some fiddling to add easier FreeBSD/NetBSD
8576   etc. support.  Side effect was that testing install is easier.
8577   Added a 'INSTALL_PREFIX' to the installation paths that allows
8578   me to make sure that things go to the right places.
8579
8580  Move the various distribution specific information into DISTRIBUTIONS
8581   directory.
8582
8583  Made the LPRng and ifhp configure.in mainly identical.  Also use the
8584   same portable.h file.
8585
8586  Fixed (once again) typeos in the man pages, and the installation
8587   of compressed man pages.  Sigh...
8588
8589  Added a 'filter_stderr_to_status_file' flag that causes print filter
8590   errors to be written to the status file (:ps=file) rather than to
8591   the status log file.  Also added truncation of the status file.
8592   (Inspired by : "William D. Colburn (aka Schlake)" <wcolburn@nmt.edu>)
8593
8594  Discovered, as a result of testing the 'filter_stderr_to_status_file'
8595   flag that backslash '\' escapes were not being handled correctly
8596   on the filter line.  Fixed this.
8597
8598  If a filter has <,>,;, or | in it, or starts with (
8599    then it is executed by using:
8600    :if=/.../filter xxx   -> /bin/sh -c '/.../filter xxx'
8601    This allows you to do things like '/.../filter 2>>status'
8602    Updated checkpc to check for matching () for filters.
8603
8604  Modified the src/linksupport/connection() code so that the
8605   lpq and other clients do not try binding to port 515.  This
8606   can cause problems when used with Samba.  The code in
8607   linksupport.c that set SO_REUSEADDR and SO_KEEPALIVE was
8608   also tidied up.
8609
8610  lpc -a now works sort of correctly and the documentation has
8611   been changed to reflect it.
8612
8613  The LPC=xx permissions checking did not require a 'C' operation.
8614   Also, cleaned up some message printing.
8615
8616  Make_passthrough was examined and a couple of changes made to
8617   handling the case when the filter path contained a meta character.
8618   The path now has parenthesis put around it.  By default,  this
8619   form of invocation does NOT have options passed to it.
8620
8621  Added a '$*' parameter to provide all the default command line
8622   options.  This now allows you to do:
8623    :if=(/some/path $* | output filter)
8624
8625  New functionality: remove_z, prefix_z, and append_z
8626   (Inspired by a comment by: Richard Kaszeta <kaszeta@me.umn.edu>)
8627    remove_z=pattern,pattern,...
8628      remove the -Z option specified by the pattern.
8629      Example: -Ztest,this,thing   + remove_z=th*,out -> -Ztest
8630    append_z=option,option,...
8631      appends this to the -Z options
8632      Example: -Ztest   + append_z=landscape -> -Ztest,landscape
8633    prefix_z=option,option,...
8634      prefixes this to the -Z options
8635      Example: -Ztest   + prefix_z=landscape -> -Zlandscape,test
8636
8637    Example of use:
8638      You want to have a set of queues where you can have the
8639    queue set the functionality:
8640
8641    landscape:append_z=landscape:lp=remote@host
8642    portrait:append_z=portrait:lp=remote@host
8643       lpr will add these options before the job
8644     is sent.
8645
8646     OR you have a 'bounce queue' situation where you
8647    want to add -Z options as the job goes through:
8648      portrait:append_z=portrait
8649         :lp=remote@host:server
8650      lpd will put these options into the job file
8651      ON RECEPTION.  Also,  before sending to a remote
8652      queue as well.  Kinda bombproof, but covers most
8653      situations.
8654
8655  If you have force_localhost then you want to connect to
8656    the server with the primary name of the printcap entry.
8657    The clients were using the lp=pr@remote pr value instead.
8658
8659  CONFIGURATION OPTION:  ld_library_path and filter_path
8660    you can set these values through configure.
8661
8662  Portability Support:  DISTRIBUTION directory and init files
8663
8664    Put the init scripts for various OS's in the main directory.
8665    This helps the poor administrator who is trying to figure
8666    out what init script he needs.
8667
8668    Gathered up all of the various system dependency stuff and put
8669    it in one big directory.
8670
8671  Fixed up the DISTRIBUTION/Solaris.pkg stuff
8672
8673  The 'subserver' queue management now works.  The problem was that
8674    the main queue server process had to fork a subserver process
8675    for the subserver queue,  and it could not tell that the subserver
8676    queue had been changed.  The following solved this:
8677     a) in the lpd_control.c code, if the queue is a subserver
8678        queue,
8679        1. I set a 'changed' flag in the spool control file.
8680        2. I send a SIGUSR1 signal to the process that is the server
8681           for the subserver queue.
8682        3. If that signal is unsuccessful, then I send a SIGUSR1 signal
8683           to the main queue process.
8684        4. If that signal is unsuccessful I restart the server
8685    b) in the lpd_jobs.c code, in the Process_jobs() routine:
8686        1. I check to see if this queue has subservers,  and then
8687           check the subserver queues.  If the 'changed' flag was set or some
8688           other reason exists to start the subserver, I start a
8689           subserver process.
8690        2. In the main queues 'wait for work' loop,  when I get a
8691           'SIGUSR1' I scan the subserver queues and check to see
8692           if their 'changed' flag is set.
8693           If it is set AND there is no subserver process THEN I will
8694           start a server process.  Otherwise I wait until the subserver
8695           process exits.
8696        3. In the main queues 'wait for work' loop,  when I look for
8697           a free subserver queue to use AND I find one which is
8698           available AND it has a change flag set THEN I start a
8699           subserver process.
8700     As you suspect,  this was NOT a simple set of changes.
8701    (Painfully debugged by: Patrick Powell <papowell@lprng.com>)
8702
8703  Kerberos Fix From MIT: added auth=none support, and allow default
8704    principal lookup.
8705    (Patch by: Robert A Basch <rbasch@MIT.EDU>)
8706
8707  FreeBSD port/package support, Solaris pkg support, RPM (RedHat) Support
8708    The configuration, build, and install process has been modified
8709    to better support package generation.  (I know, it is a dirty business
8710    and I am trying to make it easier for the vendors.)
8711
8712    I have been driven to this by problems that people have with installing
8713    stuff for the first time,  and the rising level of 'Did not RTFM'.
8714
8715    a)  postinstall script selection
8716        The last step of the make install process is to find
8717      a 'postinstall' file and execute it.  The file is chosen by
8718      looking in the configuration directory for a suitable file.
8719      The file is found by using the 'OSNAME' value found by the
8720      configure script.  Linux is a special case - mainly because
8721      I tested several versions and found that they had different
8722      'linux-this' and 'linux-that' suffixes.
8723        I also locate a 'preremove' script and do the same selection.
8724      There is a default 'postinstall' and 'preremove' script as well.
8725
8726        OSNAME=${OSNAME}; case "$${OSNAME}" in *linux* ) OSNAME=linux;; esac; \
8727        echo "OSNAME orig $(OSNAME) '$${OSNAME}'"; \
8728        s=`ls postinstall.$${OSNAME} 2>/dev/null`; \
8729        echo POSTINSTALL "'$$s'"; \
8730        if test -n "$$s" ; then cp $$s postinstall; fi; \
8731        s=`ls preremove.$${OSNAME} 2>/dev/null`; \
8732        echo PREREMOVE "'$$s'"; \
8733        if test -n "$$s" ; then cp $$s preremove; fi;
8734
8735     b) postinstall script execution
8736        If the POSTINSTALL option is not NO, then I execute the postinstall
8737      script as the last step of the 'install' process:
8738
8739    if [ "${POSTINSTALL}" != "NO" ] ; then
8740        MAKEINSTALL=YES INSTALL_PREFIX=$(INSTALL_PREFIX) $(SHELL) postinstall ;
8741    fi;
8742
8743       Note that the 'MAKEINSTALL' environment variable is set to YES.
8744       This can be used to determine that the postinstall script is being
8745       executed by the 'make install' step.
8746
8747     c) "pseudo root" or "PREFIX" support
8748
8749       I have put a "${INSTALL_PREFIX}" variable at all points where
8750       a normal script would have a target.  Thus if you do:
8751
8752           mkdir /var/tmp/LPRng-root
8753           make install INSTALL_PREFIX=/var/tmp/LPRng-root
8754
8755       you will find that all of the files are now put in sub
8756       directories of /var/tmp/LPRng-root.  You can now do:
8757
8758       (cd /var/tmp/root; find . -type f -ls ) >/tmp/files
8759       (cd /var/tmp/root; find . -type d -ls ) >/tmp/directories
8760       cat /tmp/files | grep 'man[0-9]' >/tmp/manpages
8761       cat /tmp/files | grep '/doc' >/tmp/doc
8762        and so forth.  Your Imagination and Creativityy Ma Vary
8763      (YIACMV).  It is left as an exercise for the student on how to
8764      use this with their favorite (Ummm... ok - least hated) package
8765      method to generate a %files, pkg/PLIST,  packinglist, etc. etc.,
8766      for use in package generation.
8767
8768     d)  sample 'init', 'preremove', and 'postinstall' scripts.
8769      I have ruthlessly taken example scripts for FreeBSD, BSDI,
8770      and RedHat Linux and put them in the root directory so that
8771      people can see these scripts.
8772
8773     e) If you want to see how to use these, look in the DISTRIBUTIONS
8774     directory.
8775
8776     Here is the postinstall.freebsd.sh : - comments are marked with *** ....
8777
8778     # FreeBSD Convenience Script for Source Install
8779     # -- START --
8780     # CHANGES,v 1.1 2001/08/21 20:33:14 root Exp
8781     #
8782     #  If you are building a PORT, see the
8783     #  DISTRIBUTIONS/Freebsd directory for a complete port
8784     #  building package.
8785     #
8786     # This is the shell script that does the postinstall
8787     # dynamic fixup
8788     #  It needs to be massaged with the information for
8789     #  various paths.
8790     # If you are building a package,  then you do NOT want
8791     #  to have this executed - it will put the sample files
8792     #  in place.  You need to do this during the postinstall
8793     #  step in the package installation.
8794     #
8795     echo RUNNING postinstall.freebsd.sh PACKAGE="$PACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" cwd `pwd`
8796        **** you can remove this,  but it sure helps when you are trying to
8797        **** figure out what is happening.
8798     ****  - fix is used to put the /etc/lpd.conf, /etc/lpd.perms, and /etc/printcap
8799     ****    or their variants into place.  This is truly ugly,  as there is
8800     ****    no easy way to do this well.  You first assume that you will have at
8801     ****    build time a file with the name 'lpd.conf' (for example) in the
8802     ****    current directory.  If you have this,  then you copy it brutally to
8803     ****    the destination, $TARGET/lpd.conf.sample and,  if there is not an existing
8804     ****    $TARGET/lpd.conf file.
8805     ****
8806     ****    Now we get into some ugly stuff.
8807     ****
8808     ****    When doing a package install,  you will want to copy the package version's
8809     ****    of this file into the same place.   But we do not want to overwrite the
8810     ****    existing lpd.conf, as it will break existing printing.  Note that this
8811     ****    is exactly what happens with RPM - it clobbers the existing config file,
8812     ****    and widdles by telling you about it.  Right.  Who reads all of the rpm output?
8813     ****
8814     ****    So here is what we do.  We will force a package to have only the
8815     ****    lpd.conf.sample file, and we will COPY it to the right destination.
8816     ****
8817     ****    The FreeBSD port/package system functions by having a pkg/PLIST file
8818     ****    that contains all of the files we will put in the package.  If you have
8819     ****    done 'make install INSTALL_PREFIX=/var/tmp/LPRng'  you will get all the
8820     ****    files installed in the /var/tmp/LPRng, and now can simply use file to
8821     ****    list them.  For an example,  see DISTRIBUTIONS/FreeBSD/Makefile and
8822     ****    the 'make plist' target.   I call this a 'chroot' image, cause it is
8823     ****    (hopefully) the same as though you did a 'chroot' to the $INSTALL_PREFIX
8824     ****    directory.
8825     ****
8826     ****    Unfortunately,  this simple picture breaks down when somebody decides
8827     ****    to use the 'PREFIX' facility of the package/port installation facilty.
8828     ****    So we add yet another wrinkle to this.  Use:
8829     ****    'make install INSTALL_PREFIX=/var/tmp/LPRng PACKAGE=YES'
8830     ****    when you are generating a 'chroot' image.  Then you test for this in the
8831     ****    script and put things in a nice place when you are making a package,
8832     ****    and then forcefully reinstall them.
8833
8834     fix () {
8835        v=`echo $1 | sed -e 's/[:;].*//'`;
8836        p=`echo $2 | sed -e 's/[:;].*//'`; d=`dirname $p`;
8837        if expr "$p" : "|" >/dev/null; then
8838            echo "$v destination is filter - '$p'"
8839            exit 0;
8840        fi
8841         echo "Checking for $p in $d"
8842        if [ ! -d "$d" ] ; then
8843            echo "Directory $d does not exist!"
8844            mkdir -p $d
8845        fi
8846        if [ -f $v.sample ] ; then
8847            if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
8848        elif [ -f $v ] ; then
8849            if [ $v != $p.sample ] ; then cp $v $p.sample; fi
8850        else
8851            echo "Do not have $v.sample or $v"
8852        fi
8853        if [ ! -f $p.sample ] ; then
8854            echo "Do not have $p.sample"
8855        elif [ ! -f $p ] ; then
8856            cp $p.sample $p;
8857            chmod 644 $p;
8858        fi;
8859     }
8860     # we use the /usr/local/etc/rc.d method to start lpd
8861     echo "Installing configuration files, cwd " `pwd`
8862     # we have to take them from one place and put in another
8863     if [ "X$PACKAGE" = "XYES" ] ; then
8864        # we put files into the destination
8865      ****  when we make a package,  we need to put the files in the
8866      ****  ${PREFIX}/.... location to be FreeBSD standards compatible
8867         fix lpd.perms "${INSTALL_PREFIX}${PREFIX}/etc/lpd.perms"
8868         fix lpd.conf "${INSTALL_PREFIX}${PREFIX}/etc/lpd.conf"
8869         fix printcap "${INSTALL_PREFIX}${PREFIX}/etc/printcap"
8870         init=${INSTALL_PREFIX}${PREFIX}/etc/rc.d/lprng.sh
8871         echo "Setting up init script $init using init.freebsd"
8872         if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
8873        cp init.freebsd $init
8874     elif [ "X$MAKEINSTALL" = "XYES" ] ; then
8875      ****  OK, now we are doing a make install - this could be a
8876      ****  real install by the user,  or the deadly 'make install'
8877      ****  done by the port package Makefile generation.  But
8878      ****  we know what to do:  install it in BOTH places.  This will
8879      ****  always end up with a copy in .../lpd.perms,  and perhaps
8880      ****  an extra copy as well in perhaps /usr/local/etc/lpd.perms
8881
8882         fix lpd.perms "${INSTALL_PREFIX}${PREFIX}/etc/lpd.perms"
8883         fix lpd.conf "${INSTALL_PREFIX}${PREFIX}/etc/lpd.conf"
8884         fix printcap "${INSTALL_PREFIX}${PREFIX}/etc/printcap"
8885         fix lpd.perms "${INSTALL_PREFIX}${LPD_PERMS_PATH}"
8886         fix lpd.conf "${INSTALL_PREFIX}${LPD_CONF_PATH}"
8887         fix printcap "${INSTALL_PREFIX}${PRINTCAP_PATH}"
8888         init=${INSTALL_PREFIX}${PREFIX}/etc/rc.d/lprng.sh
8889         echo "Setting up init script $init using init.freebsd"
8890         if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
8891        cp init.freebsd $init
8892         chmod 744 $init
8893        echo "Stopping LPD"
8894        pid=`cat ${LOCKFILE}* 2>/dev/null`;
8895        if [ -n "$pid" ] ; then kill -INT "$pid" 2>/dev/null; fi
8896        if [ -n "${KILLALL}" ] ; then ${KILLALL} 2>/dev/null; fi
8897        # check the printcap information
8898        echo "Checking Printcap Info and fixing permissions"
8899        ${SBINDIR}/checkpc -f
8900        # restart the server
8901        echo "Restarting server"
8902        sh $init start
8903     else
8904       ****  OK, this is done when we do a package install.  You will
8905       ****  be amazed to discover that the ./etc/lpd.perms file is now
8906       ****  present here - so you can install this.  Gahh... The reason
8907       ****  for this seems to lie with the way that the package/port
8908       ****  mechanism works.  If this is changed,  then it is back to the
8909       ****  trenches to find out where and if the file location has
8910       ****  changed.
8911
8912        # when doing an install from a package we get the file from the package
8913         if [ -f etc/lpd.perms.sample ] ; then
8914             fix etc/lpd.perms "${LPD_PERMS_PATH}"
8915             fix etc/lpd.conf "${LPD_CONF_PATH}"
8916             fix etc/printcap "${PRINTCAP_PATH}"
8917             init=etc/rc.d/lprng.sh
8918             echo "Checking init script $init"
8919             if [ ! -f $init ] ; then
8920                 echo "WARNING: $init missing!"
8921                 exit 1
8922             fi;
8923             cp $init /usr/local/$init
8924             chmod 744 $init
8925         else
8926             echo "WARNING: configuration files missing from package!"
8927         fi
8928     fi
8929
8930  Here is the postinstall.linux.sh:
8931
8932    # LINUX/RedHat Source Installation Convenience Script
8933    # -- START --
8934    # CHANGES,v 1.1 2001/08/21 20:33:14 root Exp
8935      *** same as above
8936    fix () {
8937      *** same as above
8938    }
8939    echo "Installing configuration files"
8940    init=${INSTALL_PREFIX}/etc/rc.d/init.d/lprng
8941    if [ "X$MAKEINSTALL" = "XYES" ] ; then
8942        if [ ! -d `dirname $init` ] ; then mkdir -p `dirname $init ` ; fi;
8943        cp init.linux $init;
8944        chmod 744 $init
8945        fix lpd.perms "${LPD_PERMS_PATH}"
8946        fix lpd.conf "${LPD_CONF_PATH}"
8947        fix printcap "${PRINTCAP_PATH}"
8948    else
8949        *** this is tricky ....
8950        fix "${LPD_PERMS_PATH}" "${LPD_PERMS_PATH}"
8951        fix "${LPD_CONF_PATH}" "${LPD_CONF_PATH}"
8952        fix "${PRINTCAP_PATH}" "${PRINTCAP_PATH}"
8953    fi
8954    if [ "X$PACKAGE" != "XYES" ] ; then
8955        echo "Configuring startup scripts"
8956        if [ ! -f $init ] ; then
8957            echo "Missing $init";
8958        fi
8959        if [ -f /etc/redhat-release -a -f /sbin/chkconfig ] ; then
8960            echo "RedHat Linux - running chkconfig"
8961            /sbin/chkconfig --del lpr
8962            /sbin/chkconfig --add lprng
8963            echo "Starting Printer"
8964            sh $init start
8965        else
8966            echo "Hand install the configuration files"
8967        fi;
8968    fi;
8969
8970   Cleaned up the 'Make_passthrough' use by having a single
8971    'Filter_file' routine.  Problems of unclosed file descriptors
8972    disappeared.   Sigh...
8973
8974   Discovered that the 'generate banner' code was not working, and
8975     has probably not worked since 3.5.4.  Shows how many people
8976     use this.  Fixed.
8977
8978   Discovered that the 'af=|/...' option caused 'orphaned' children
8979     which would hang around until the main lpd server process
8980     exited.  Problem unsolvable on the systems where the problem
8981     exits.  The :as and  :ae provide better functionality for
8982     this case.
8983
8984   If you have an OF filter and one of the other filters dies,
8985    then you invoke the final OF filter,  even though the job
8986    will exit with an error.  This allows you to do some cleanup
8987    in the OF filter.  Implemented by modifying the common/printjob.c
8988    code so that it did a 'goto end_of_job' rather than 'goto error'.
8989    I wonder why I did not see this before.
8990
8991   Fixed a really dumb idiot problem with portability.  I simply do
8992    not allow lp=|/filter on systems without the 'socketpair'
8993    function.  Sigh...  There must be a way around this but I can't
8994    see one.
8995
8996   Added a 'JSUSP' to the error codes.  Sigh...  Needed this to
8997    indicate that a filter had suspended itself correctly.
8998
8999   Check the size of the status file before writing - this adds one
9000    fstat() call per write,  but you don't update the status file
9001    very often.
9002    (Pointed out when his status file filled up the /var spool
9003      directory by: Dmitry Bely <dbely@mail.ru>)
9004
9005  We don't steal,  we borrow:  the :sh flag in the printcap causes
9006   lpr to act like the -h (no header) flag was present.
9007   (Showing the tattered edges from cutting it out of the
9008     the FreeBSD lpr code, sent by: Garance A Drosihn <gad@eclipse.acs.rpi.edu>)
9009
9010  pclbanner and psbanner now back in /bin/sh.  Sigh.  Some supported
9011   systems do not have Perl.
9012    (Grudgingly ported to /bin/sh scripts by:
9013      Patrick Powell <papowell@lprng.com>)
9014
9015  The printcap 'x:' is now a real printcap.  You use the default
9016    entry values for it.  Strange how this one did not get caught
9017    earlier.  The 'lpc client x' and 'lpc server x' now looks up the
9018    wildcard as well as the normal information.  And finally, checkpc
9019    will squawk if you try to use a wildcard as a queue name,
9020    rather than an alias.
9021
9022  You can now do run time load balancing using user specified program
9023   OR a built in filter.
9024
9025   Printcap/configuration option:
9026     chooser=/path/to/program
9027         STDIN = list of queues to choose from, one per line
9028         STDOUT = single queue to use
9029              (if none, job is skipped)
9030       exit code: == 0 handle job and put it into specified queue
9031           if any
9032                  != 0 treat job as though error code was returned
9033                       for processing.  Allows job to be held, etc.
9034     chooser_routine
9035       chooser_routine@  - default - do not use chooser routine
9036       chooser_routine   - use chooser routine
9037
9038       configure --with-chooser_routine=name --with-user_objs=objectfile.o
9039          defines the CHOOSER_ROUTINE compilation option to name
9040          includes the objectfile.o in the library.
9041
9042      routine usage is described in common/user_objs.c
9043
9044      Now you can have a very optimized routine that will do all sorts
9045       of horrible things.  Enjoy.
9046
9047  You can now do queue ordering using a user provided routine
9048
9049     order_routine
9050       order_routine@  - default - do not use order routine
9051       order_routine   - use order routine
9052
9053       configure --with-order_routine=name --with-user_objs=objectfile.o
9054          defines the CHOOSER_ROUTINE compilation option to name
9055          includes the objectfile.o in the library.
9056
9057      routine usage is described in common/user_objs.c
9058
9059      Now you can have a very optimized routine that will do all sorts
9060       of horrible things.  Enjoy.  Note that the overhead for a filter
9061       was horribly high and I could not come up with a clean interface.
9062       Besides, if you are mucking around with this stuff, you better
9063       make sure you know what you are doing.  See the user_objs.c
9064       and LPRng/src/common/getqueue/Make_sort_key() for details.
9065
9066  When you did a redirect of a queue, would not move the jobs in
9067   the queue.  This is now fixed.
9068
9069  Updated the printcap.5 man page so it is a bit closer to reality.
9070
9071  Finally got slammed with a 'blank page' of output once too
9072   often.  The ':sf' (supress form feeds between job files) flag
9073   is now history.  If you need a form feed between a job file,
9074   then use 'ff_separator'.
9075
9076  Yet another version of the UTILS/accounting.pl file.
9077
9078  The client -A option (use authentication) now selects the authentication
9079  type from the AUTH environment variable.
9080
9081Release LPRng 3.6.13 Fri Jan 28 08:03:07 PST 2000
9082  MIT Kerberos support:  added code to detect when sending job to server
9083   and the server name is 'localhost'.  This requires a special ticket
9084   lookup to get the right ticket,  as there is no lpd.localhost ticket,
9085   only lpd.servername.
9086   (Supplied by: Mike Whitson <mwhitson@MIT.EDU>)
9087  src/Makefile.in:  ln ${STRIP} -> ln -s
9088   (Noticed by: Mike Whitson <mwhitson@MIT.EDU>)
9089  The filter $- specification did not handle $-/xxx and $-root/xxx
9090   correctly.
9091   (Spotted by: Simon Wilkinson <sxw@dcs.ed.ac.uk>)
9092  When using 'user' or 'custom' authentication,  lpr errors were
9093   not printed out.  This was due to common/sendjob.c:Send_auth()
9094   not setting non-zero return status when there were error conditions.
9095   (Reported by: Patrick O'Brien" <pdo@cs.umd.edu>)
9096  man/install-sh missing, and ifhp src/install-sh as well.
9097   (Reported by: Bill Kemp <bkemp@srp.gov>
9098  LPRng/Makefile.in referenced the wrong location for lpd.conf and lpd.perms
9099   sample files.
9100   (Spotted by:  Marty Leisner <leisner@sdsp.mc.xerox>)
9101  LPD: now do accept in the main lpd process, and this time we brutally
9102   send a message to the remote end if we cannot fork the child
9103   process.
9104  Some linksupport.c routines modified to NOT close sockets on
9105   error condition.  This allows us to try to read additional error
9106   information from the remote system.
9107  Tested the kerberos5 authentication with kerberos-1.0.5.  Fixed
9108   sserver.c and sclient.c.
9109  LPRng-HOW corrected.  Filters only get SIGINT and SIGCONT sent
9110   to them to kill them off.
9111   (Spotted by: Robin Sommer <rsommer@uni-paderborn.de>)
9112  Authentication support code rewritten to support error message and status
9113   returns.  Also,  added error messages and status reports.
9114  lpd started too many servers.  The Get_max_server() code returned
9115   the maximum number of server processes that should be running,
9116   and I would try to start this number.  This would lock up the system
9117   until one had exited.  Now I start up max_servers - 4 at most
9118   at startup time.  This is still high,  but seems to work.
9119  lpq.c: missing argument to plp_snprintf()
9120    (Patch by: Craig Small <csmall@eye-net.com.au>)
9121  The environment variables passed to filters were not getting their
9122    escaped characters expanded.  Thus, PATH=xx\072xx\072xx was
9123    getting passed instead of PATH=xx:xx:xx
9124  The default lpd.conf has been fixed so that it has escaped values for
9125    : instead of : in the file.
9126  Some filters require a killpg() AND a kill(SIGINT) AND a kill(SIGCONT)
9127    to die.  Next it will have to be garlic and a stake... Sigh.
9128    (Noted by:  Peter Scheurer <scheurer@sopra-gmbh.de> )
9129  The translate_format and translate_incoming_format options can now have
9130    '*f' entries - the * matches all formats.  This would translate all
9131    file formats to f.
9132
9133  The LPRM forward in common/lprm.c did not pass the user's name correctly.
9134    (Found by: John Perkins <john@cs.wisc.edu>)
9135  Reformatted LICENSE so that the words GPL are in the first lines
9136    so that people can tell right away.
9137  Updated dates to match Jan, 2000
9138  LPQ and LPRM commands were not being forwarded correctly.
9139
9140  RADICAL CHANGE IN CODE ORGANIZATION:
9141    In the next major release I will be restricting authentication to
9142  code modules only,  and users will have to write (gasp!) C code to do
9143  this.  This is due to the problems with adding various types of
9144  encryption, etc., which are not well supported by shell scripts,
9145  etc.  (I won't discuss the legal issues, these are ugly.)
9146
9147    The following restructuring of the Authentication API has now been done.
9148  a) Printcap, lpd.conf information
9149     The auth=xxx and auth_forward=yyy set the type of authentication
9150    to be used by the sender.  The auth=xxx is used by the clients
9151    to communicate with the server and the auth_forward for server to
9152    server communication.
9153  b) for each authentication type there is an unlimited amount of configuration
9154    stuff available now.  The configuration/printcap entries have the
9155    format xxx_key.  The xxx_id entry is used by clients to identify the
9156    id of the remote server that they are to use for authentication type
9157    xxx.  When the server accepts a connection,  it will use the xxx_id
9158    value as its 'key' or whatever for the connection.  Similarly,  when
9159    doing server to server communication,  the xxx_forward_id is the
9160    id of the remote server;  the remote server will still use xxx_id.
9161    The reason for this has to do with printcap organization.  You want
9162    to have both entries present in a printcap,  one for a client to send
9163    to the server, and the other for the server to forward to another
9164    server.
9165      You should note that this will break down a little bit when you
9166    have bounce queues.  Since there is only one xxx_forward_id available
9167    for all of the destinations,  all of the destinations will need to
9168    use the same xxx_forward_id value.  This problem will have to be solved
9169    at the authentication module level,  probably by not using the xxx_id
9170    and xxx_forward_id for anything but advisory information.
9171      For backwards compatibility, kerberos can also use kerberos_server_principal
9172    and kerberos_forward_principal instead of kerberos_id and kerberos_forward_id
9173    respectively.
9174  c) for server to server authentication,  use the 'auth_forward=type' to
9175    set the authentication type for forwarding.
9176  d) For example, to use kerberos authentication the client printcap
9177    entry would have:
9178        auth=kerberos
9179        kerberos_id=lpr/lpr@server.host  OR
9180        kerberos_server_principal=lpr/lpr@server.host
9181        kerberos_service=lpr
9182        kerberos_life=...   (this are usually not used)
9183        kerberos_renew=...  (this are usually not used)
9184
9185    The server printcap entry would have:  (note no 'auth=' stuff used)
9186        forward_auth=kerberos    (to use kerberos to forward)
9187        kerberos_id=lpr/lpr@server.host  OR
9188        kerberos_server_principal=lpr/lpr@server.host
9189        kerberos_service=lpr
9190        kerberos_life=...   (this are usually not used)
9191        kerberos_renew=...  (this are usually not used)
9192        kerberos_keytab=/etc/krb5.keytab
9193        kerberos_forward_id=lpr/lpr@anotherserver.host
9194
9195    In addition,  you will find that PGP authentication has been more fully
9196    supported.
9197      CLIENTS:  use environment variables
9198        PGPPASSFILE = location of a file with the PGP password
9199        PGPPASSFD   = fd to read the password from (very very rarely used)
9200      Client Configuration:
9201        auth=pgp
9202        pgp_id = pgp id of the server, used to get server key from key ring
9203        pgp_path = /...  - path to PGP executable on user system
9204
9205      Server Configuration
9206        pgp_id = pgp id of the server, used to get server key from key ring
9207        pgp_path = /...  - path to PGP executable on server system
9208        pgp_server_passphrasefile = file containing passphrase to be used by server
9209           to unlock key file
9210         Server keyring files are in the server user home directory,
9211        i.e. - if server runs as 'daemon' it is ~daemon/.pgp/pubring.pgp and
9212        ~daemon/.pgp/secring.pgp.  Don't fight it.
9213
9214    Note that user level authentication using shell scripts is still there,
9215    but I am making it hard to use.  Don't use it.  Evil.  Bad.  See the
9216    notes below on how to add C code to do this.
9217
9218   And I have added some interesting code to use md5 authentication and
9219    shared secrets:
9220      CLIENTS:  use environment variables
9221        MD5KEYFILE  - file containing md5 keys format is:  name=key.
9222      keys are currently 16 chars long - the ASCII values are used
9223      to set the 'key' value.  Yes, yes, I know there are only approx
9224      76**16 = 5 * 10*29 possible keys using this.  Tough.  A key for the
9225      user name (login name) and the md5_id need to be present
9226
9227         Example:
9228         User Keyfile
9229           # from the configuration information: md5_id=key
9230           # we use 'key' to look up the host information
9231           # the entry has the format '[user_auth] salt'
9232           #  if user_auth is present then it will be used as the
9233           #  'from' or 'client' information.  The recipient will use
9234           # this value to look up the corresponding hash key value in
9235           # servers keyfile
9236           #key  = user_auth   salt
9237           lpr@h4=papowell-h4  xx01223750adfj9098789sdfadf
9238           lpr@h5=papowell-h5  asdfu189asdfasdfasdfasdfasd
9239
9240        Server Keyfile (host h4)
9241           #key  = user_auth   salt
9242           # user key
9243           papowell-h4=xx01223750adfj9098789sdfadf
9244           # key for forward transfer to host h5
9245           lpr@h5=lpr-h4 adfa9ipioasdfasdfjklsf
9246           # key for forward transfer from host h5
9247           lpr-h5=adfa9ipioasdfasdfjklsf
9248
9249        Server Keyfile (host h5)
9250           #key  = user_auth   salt
9251           # user key
9252           papowell-h5=asdfu189asdfasdfasdfasdfasd
9253           # key for forward transfer to host h4
9254           lpr@h4=lpr-h5 adfa9ipioasdfasdfjklsf
9255           # key for forward transfer from host h4
9256           lpr-h4=adfa9ipioasdfasdfjklsf
9257
9258        Configuration:
9259          auth=md5
9260
9261
9262    Just to make life interesting,  I have also added a demonstration
9263      of how to do md5 signing and authentication.
9264
9265   e) Code reorganization
9266       The LPRng/src/common/sendauth.c and LPRng/src/common/lpd_secure.c
9267    files have the following stuff added at the end.
9268
9269  #define SENDING
9270  #include "user_auth.stub"
9271
9272   struct security SendSecuritySupported[] = {
9273      /* name,       config_tag, connect,    send,   receive */
9274      { "kerberos4", "kerberos", Send_krb4_auth, 0, 0 },
9275      { "kerberos*", "kerberos", 0,           Krb5_send },
9276      { "pgp",       "pgp",      0,           Pgp_send },
9277      { "user",      "user",     0,           User_send },
9278  #if defined(USER_SEND)
9279  USER_SEND
9280  #endif
9281      {0}
9282  };
9283
9284     This is an example of how you add user level stuff for encryption
9285   and not go to jail for international arms smuggling.  The "user_auth.stub"
9286   file contains the source code for the various modules, or you can put the
9287   source code in another file and link it in.  This is recommended when you
9288   want to use a dynmically loadable library and ship the library. (Note:
9289   yes, I looked at loadable modules a la Apache,  but LPRng runs on systems
9290   that do not support this, so I gave up.  This is the older method from
9291   other real time software that seems to work.)
9292
9293     The data structure has the name of the authentication, used with the
9294   auth=xxx tag.  The name field corresponds to the xxx value.
9295
9296     The config_tag is used to do lookups in the various configuration and
9297   printcap files to get values.  Why not make them the same?  As you see
9298   in the example, we have kerberos4 and Kerberos 5,  but we use different
9299   support routine with the same key values.  Backwards compatibility is
9300   thus assured.  Oh, yes. Note that you can use wildcards for the name value.
9301   The connect, send, and receive fields are the support routines that are
9302   used for handling encryption.
9303
9304   connect:  make a connection,  fumble around and do authentication,
9305    and then return.  Kind of like a 'connect' call,  but does handshaking.
9306    Note that the data link and other stuff is handled by LPRng.  Very
9307    lightweight and fast.
9308
9309   send: this is an alternative to connect.  The routine is handed a file
9310    that it packs up and then sends to the remote end.  In response
9311    it gets data back that it will unpack and deliver to the user as
9312    status or error messages.
9313
9314   receive:  this routine is called when the LPD server gets an authentication
9315    request.
9316      If the 'connect' routine is used,  'connect' sends a magic
9317    string to the server that will cause it to call this routine.  The routine
9318    will do the hand shaking,  and then return.  The normal LPD service
9319    routine will take over.
9320      If the 'send' routine is used,  this routine will get the stuff sent
9321    by the remote end, unpack it, or what ever is appropriate,  and then
9322    call the LPD service routine.  By convention, it passes the routine
9323    a file to put its error messages, etc., into.  When the routine returns,
9324    the file contents are packaged up and sent back to the server.
9325
9326     Note:  Kerberos4 :  uses connect / receive
9327            Kerberos5 :  uses send / receive
9328            PGP       :  uses send / receive
9329            MD5 'send':  uses send / receive
9330            MD5 'con' :  uses connect / receive
9331
9332   The source code for PGP authentication is in LPRng/common/linelist.c
9333   (don't ask).  You can get an idea of how to add more authentication by
9334   looking in LPRng/common/user_auth.stub for excruciatingly detailed
9335   discussions and examples.
9336
9337   The #define SENDING controls what stuff in the user_auth.stub
9338   gets included.  If you look in the sample file,  you will find:
9339
9340   #if defined(SENDING)
9341   extern int md5_send();
9342   #  define USER_SEND \
9343      { "md5", "md5", md5_send, 0, md5_receive },
9344   #endif
9345
9346   This little bit of code causes the prototype md5_send() to be put in place,
9347   and then the USER_SEND to be defined.  Note that in the original file (send_auth.c)
9348   that this is used in a table to insert the correct authentication stuff.
9349
9350   Enjoy.
9351
9352Release LPRng 3.6.12 Tue Oct 26 16:59:35 PDT 1999
9353  AIX does not like control files where Nxxx comes before data file lines.
9354   Added a 'nline_after_file' option to cause LPRng to put Nlines after
9355   data file lines.
9356   (Noticed by: Nik Conwell <nik@bu.edu>)
9357 configure - kerberos libraries are now specified at the start
9358   of the library list (LIBS="-lkrb5 $LIBS")
9359   (Suggested by: John Perkins <john@cs.wisc.edu>)
9360 Typo caused LPD not to read the permissions file.
9361   (Noticed by EVERYBODY,  but first by: Patrick O'Brien" <pdo@cs.umd.edu>)
9362
9363
9364Release LPRng 3.6.11 Sun Oct 24 13:37:44 PDT 1999
9365  Permissions checking: SERVICE=* was not getting handled correctly.
9366   (Found by: Dejan Ilic <svedja@lysator.liu.se>)
9367  Jobs with more than 26 files were quietly being mangled.
9368   (Found by: Derek Masseth <dmasseth@u.arizona.edu>)
9369  lp simulation now returns a 'job identifier' consistent with
9370   Solaris 2.5 format.
9371   (Noticed by:  Martin Mokrejs <mmokrejs@natur.cuni.cz>)
9372  Added support for case sensitive key lookup in sorted lists.
9373   (General cleanup and tidy: Patrick Powell <papowell@lprng.com>)
9374  Set_linger() (setsockopt socket linger timeout) failure is
9375   now ignored,  rather than treated as failure.  This now
9376   handles the case where pipes are actually second class citizens
9377   and the operation fails.  Note that this probably could
9378   be fixed by testing the file descriptor for type and then
9379   determining the exact socket type,  but this is NOT portable.
9380  Set the default paper size for the IFHP-HOWTO to letter.
9381   The psutils package can be used to resize this for a4, which
9382   is slightly larger.
9383  Did horrible things to job reception to handle jobs with
9384   spaces and more bogus entries in the name fields.  This
9385   is really strange.  Note: still one quirk - if the server name
9386   has a space in it AND the job is originated on the server,
9387   THEN the originating host is set to 'localhost'... which is
9388   correct but may be odd when forwarding to another system.
9389  Compaq AKA DEC True 64 support added - configure.in now does
9390   odd things to detect correct libraries to be used to get
9391   gethostbyaddr() support.  Portablility.
9392  configure --disable-strip will disable stripping of binaries.
9393   (Requested by: Marty Leisner <leisner@sdsp.mc.xerox.com>)
9394  Permissions, 'SERVICE=P', and job removal:
9395   if a print job gets through the 'R' (lpr job sumission) checking,
9396   and gets into the queue,  there is another check ('P' or print
9397   time checking.  This was done to subdue complaints from systems
9398   which could not handle a 'no permssions' error and would sit
9399   there endlessly trying to send the same job to the printer
9400   queue, and other users would not get their jobs through.
9401
9402   When a job is ready to be printed and fails the 'SERVICE=P'
9403   permissions check,  it is now removed and not printed,
9404   UNLESS the 'save_on_error' flag is set,  in which case it
9405   is marked with a permissions error and left in the queue.
9406
9407   Note 1:  the lpd.perms file has been updated to reflect this
9408   behavior.
9409   Note 2:  the HOWTO has been updated to reflect this behavior.
9410   Note 3:  if you have a DEFAULT REJECT in your lpd.perms,  this
9411   means that no jobs will get printed. :0).  Enjoy.
9412
9413  Set the 'SO_KEEPALIVE' option on sockets to force keepalives to be
9414   sent so that dead connections would be detected.
9415  Updated some code in the common/lpd_remove.c file to close a small
9416   timing race condition for job removal.  Sometimes a job would get
9417   removed and the server process would not be killed.  Note that
9418   the kill is done by sending SIGINT to the processes.
9419  Changed a int to double for file length in common/lpd_rcvjob.c.
9420  Modified UTILS/cheap_lpr and UTILS/LPRng.pm to handle more than
9421   one file in print jobs.
9422  Checked out a few problems with PGP and user specified authentication.
9423   (Spotted by: Patrick O'Brien" <pdo@cs.umd.edu>)
9424  LPQ - use the file name information if no 'J' (job) line in control
9425   file, and finally "NULL" if no information. This prevents many scripts
9426   from breaking.
9427  getqueue.c:Get_datafile_info() was not getting the N,U, and format
9428   values correctly under all circumstances,  i.e. - duplicates,
9429   out of order N lines,  totally bogus or missing N information.
9430   What a mess.
9431   (Spotted and patch by: Edwin Lim <elim@research.att.com>)
9432   (And lots of others, with comments, flames, and snickers as well.)
9433  Fixed a problem when you used a filter to get printcap information,
9434   and you did a recurive get,  and you had a tc=xxx entry.
9435   (Spotted and debugged by: Simon Wilkinson <sxw@dcs.ed.ac.uk>)
9436  configure --enable-priv_ports action was reversed...
9437   (Spotted by: Robert Montjoy <Rob_Montjoy@ececs.uc.edu>)
9438  Warning message about '@' in a printcap name was malformed.
9439   (Spotted by: Andreas Kahnt <ak@m-ebert.de>)
9440  Added a 'tc_only' flag to allow printcaps to be explictly
9441   marked for 'tc=name' use only.  This allows people using
9442   NIS, NIS++, and other database engines to put printcap
9443   information in database forms.
9444  Now 'checkpc -P printer' will only check specified printer.  Handy
9445   for 'checkpc -f -P printer' type of operations when you add a
9446   new printer to a system.
9447   (Suggested by: Wilfried Gaensheimer <wilfried.gaensheimer@hl.siemens.de>)
9448
9449
9450Release LPRng 3.6.10 Sun Sep 12 19:46:33 PDT 1999
9451  lpc.1 man page moved to lpc.8 man page
9452  (Suggested by: Craig Small <csmall@eye-net.com.au>)
9453
9454  PERMISSIONS CHECKING:
9455    The USER, HOST, IP, SAMEUSER, SAMEHOST, entries will now SUCCEED
9456    when checking permissions for an operation to be applied to a
9457    spool queue;  when the individual jobs in the queue are checked
9458    the comparisons will then be done.  This has the effect of allowing:
9459       ACCEPT SERVICE=C LPC=hold,release SAMEUSER SAMEHOST
9460       ACCEPT SERVICE=M SAMEUSER SAMEHOST
9461    to be specified and allows a user to hold, release, or delete
9462    their jobs.
9463    (Need pointed out by: Jens Noelle <noelle@amica.rwth-aachen.de>)
9464
9465  Updated the lpd.conf file generation to put in the types of options.
9466
9467  NONE renamed to NONEP due to conflicts with some <sys/types.h>
9468    definitions.
9469
9470  Added a $_ capability to filter options.
9471    (Patch by: Mike Whitson <mwhitson@MIT.EDU>)
9472
9473  Added a configure option to set the :sh default to 1 (on).
9474
9475Release LPRng 3.6.9 Mon Aug 30 13:30:58 PDT 1999
9476  reverse_priority_order flag - priority z-aZ-A, i.e. - A is lowest
9477   (Requested by: Dennis Bush <Dennis.Bush@dowjones.com>)
9478  LPD now does a chdir("/") so that it is in a well known location.
9479   (Requested by: Craig Small <csmall@eye-net.com.au>)
9480  Time used to sort job is now the arrival time of the last byte
9481   of the job.
9482
9483Release LPRng 3.6.8 Fri Aug 27 17:06:10 PDT 1999
9484  *** WARNING:  configure strikes again
9485  ***
9486  *** printcap, lpd.conf, lpd.perms now default to:
9487  ***  /usr/local/etc/{ printcap, lpd.conf, lpd.perms}
9488  ***
9489     You may want to do:
9490       ln -s /etc/printcap /usr/local/etc/printcap
9491     OR
9492       configure --with-printcap_path=/etc/printcap
9493
9494     Please move your lpd.conf and lpd.perms files to /usr/local/etc/
9495
9496  Why?  Because when trying to port this to XxxxBSD, BSDI, Solaris,
9497  SunOS, HPUX, DGUX,  etc etc etc I have run into so many inconsistencies
9498  that I have just given up.
9499
9500  You might as well assume that the following is true for a default install.
9501
9502  Updated configuration to be a little more consistent with other packages
9503   default installation directories:
9504     ${prefix}  is usually /usr/local
9505     ${bindir}  is usually ${prefix}/bin, (/usr/local/bin)
9506     ${sbindir} is usually ${prefix}/sbin (/usr/local/sbin)
9507     ${libexecdir} is usually ${prefix}/libexec (/usr/local/libexec)
9508     ${sysconfdir} is usually ${prefix}/etc (/usr/local/etc)
9509     ${mandir} is usually ${prefix}/man     (/usr/local/man)
9510
9511   We install the executables in:
9512         (* indicates default SETUID Root install)
9513     ${bindir}/ lpr *, lprm *, lpq *, lpstat *
9514     ${sbindir}/lpc *, checkpc, lpd *
9515     ${libexecdir}/filters/ lpf, banner, etc
9516     ${sysconfdir}/ lpd.conf, lpd.perms, printcap
9517     ${mandir}/ man pages
9518
9519   Suppose you wanted to put them in /usr/bin, /usr/sbin, and /etc:
9520     configure --prefix=/usr --sysconfdir=/etc
9521
9522
9523   Note the following explicit overrides:
9524  --disable-setuid        disable setuid root client and server executables
9525  --enable-priv_ports     require connections to be from privileged ports
9526  --disable-force_localhost force_localhost default to disabled
9527  --with-lpddir=DIR       lpd executable directory (default ${sbindir})
9528  --with-filterdir=DIR     filter directory (default ${libexecdir}/filters)
9529  --with-lpd_conf_path=PATH     path to lpd.conf (default: ${sysconfdir}/lpd.conf)
9530  --with-lpd_perms_path=PATH    path to lpd.perms (default: ${sysconfdir}/lpd.perms)
9531  --with-printcap_path=PATH     path to printcap (default ${sysconfdir}/printcap)
9532
9533  Fixed up the INSTALL and HOWTO documentation as well.
9534
9535  Note 1:  you can make a symbolic link from /usr/local/etc/printcap to
9536   /etc/printcap and this will solve the issue as well.
9537
9538  ---
9539  Job time is now recorded down to the millisecond a jobs sorted according to that
9540    time.  This will slightly improve the situation due to multiple jobs arriving at
9541    at (approximately) the same time.  Jobs are sorted accordingly.
9542    (Suggested by: Abramo Bagnara <abbagnara@racine.ra.it>)
9543
9544Release LPRng 3.6.7
9545
9546  LPRng now handles files larger than 2 gigabytes on systems where the max
9547    size_t is larger than 2 gigabytes.
9548  configure now checks to see that there is a prototype for lseek().
9549    (Both inspired by somebody trying to print a 2G file:
9550       John Kimberley <jkimberly@harland.net>)
9551  lpq -n linecount
9552     Limits number of status lines to linecount.  Can be used when
9553   you want an exact number rather than using -llll.
9554  lpc now puts debug flags in () -
9555     Printer    Printing Spooling Jobs  Server Subserver Redirect Status/(Debug)
9556    t1@h4       enabled  enabled    0    none    none          (4)
9557  There is a horrible problem with load balance queues, SIGCHLD, and missing
9558    SIGUSR1 signals on Solaris 2.4, 2.5, and 2.5.1.  The code in lpd_jobs.c
9559    has been rewritten,  silly things have been done and it now looks awful,
9560    but it works,  is portable,  and ugly.  So much for elegance.
9561  Added more %U option to lpc, lprm to allow SAMBA to specify users.
9562
9563Release LPRng 3.6.6 Sun Aug 22 10:42:20 PDT 1999
9564  LPD did not exit with non-zero success code when there was another
9565    lpd active.
9566    (Patch from: Stephen Fischer <fischer@cse.unsw.edu.au>)
9567  LPD bounce queues changed the 'N' data in the control file.  Should not
9568    do this.
9569    (Noticed by: John Rothlisberger <rthlsbrj@pprd.abbott.com>)
9570
9571  New timeout - exit_linger_timeout
9572    When an LPD server process exits,  it needs to try to 'flush' data over
9573    the various pipes, sockets, etc, that are part of the IPC.  The problem
9574    is that on some OS's,  when a process exits the data in a pipe buffer
9575    may be discarded if the process exits due to a signal.  Added
9576    'exit_linger_timeout'  to force all pipes/sockets to be 'lingered' on
9577    during cleanup.  This is a totally bogus method.  What is needed is a
9578    setsockopt() function similar to 'fflush' that would not return until
9579    all the data is flushed to the remote end.  It turns out that the
9580    SO_LINGER with a 0 value should have done this,  but the 0 value causes
9581    a 'default' value to be used.  Grr...  Needless to say this is a hack
9582    of the worst type,  does not work on all systems.
9583
9584  LPR was failing due to connnections closing due to lack of processes.
9585    When a connection is made to the LPD server,  it used to do accept()
9586    and would then fork a process.  This would lead to some ... interesting...
9587    denial of service attacks,  and some very odd problems when you ran out
9588    of processes.  The code now does the following:
9589       creates a pipe()
9590       forks a process =
9591         = child will now do an accept
9592         = child will then close the pipe
9593       parent WAITS until the child pipe is closed.
9594    This has the effect of making sure that the child process has
9595    done the accept,  and will BLOCK until the accept is done.
9596    This makes sure that there is a process to handle the connection.
9597    Wierd, I tell you.  Note that there is a way to do a DOS attack on
9598    some systems that signal a connection is available BEFORE the 3 way
9599    handshake completes,  and should cause endless problems.  You can
9600    also launch DOS attacks on inetd, ftp, etc. etc. on these systems
9601    as well.  See CERT for more nasty details.
9602
9603  LPQ now correctly reports all jobs, even ones from different
9604    machines with the same job numbers.  Yeah, it looks confusing
9605    in the output to have two job 12's,  but HEY!  what do you want
9606    on 80 columns?
9607
9608  LPQ now confuses people trying to figure out why there are
9609    duplicate jobs in the status listing.  See above.  Isn't this
9610    marvellous?
9611
9612  lpd_jobs: when processing long queues a huge number of tempfiles
9613    would be created.  Now these are removed each time the queue is scanned.
9614    Sigh...
9615
9616  lpd_jobs: when you have a connection opened using lp=host%port,
9617    then lpd now do a shutdown(port,1) on the socket.  Now we get
9618    into the really odd stuff.  We first set the linger value to
9619    'read_write_timeout' if nonzero otherwise the 'exit_linger_timeout'.
9620    IF the 'wait_for_eof' flag (default TRUE) is set,  we try
9621    READING from the socket until we get an eof.  We then close
9622    (with the linger) the socket.
9623
9624    Here are the problems that this tries to solve.
9625
9626    When you send a job to a printer over a socket connection,
9627    you stuff the files into a socket and then expect the OS to
9628    deliver the data.  WRONG!  The OS puts this in some buffers.
9629    It returns from the WRITE call with success.  You now do a
9630    close().  At this point there are some interesting possibilities:
9631    a) your data is delivered,  even after waiting 6 weeks for the
9632    other end to respond (BAD choice); b) the system attempts to
9633    deliver your data for,  say,  120 seconds (default 'linger'
9634    time on some BSD systems);  c) you can specify how long you
9635    want to have the system try to deliver the data.  While this
9636    is going on of course, you cannot open a connection to the
9637    device,  as it is still busy with the previous connection.
9638
9639    You really want to treat the 'close' like a 'write' and wait
9640    for a reasonable (read_write_timeout) time for this to happen.
9641    When you do a write 'shutdown',  the TCP/IP connection sending
9642    (write) capability is terminated, and the TCP/IP stack does a
9643    handshake with the other end telling it that no more data will
9644    be sent.  The receiver will get an EOF when it tries to read
9645    more data, and will, in turn, close the connection.  Note that
9646    this must be a 'shutdown' and not a 'close'.  All close does
9647    is closes the process's copy of the file descriptor information.
9648    Shutdown is brutal and will terminate with predjudice the tcp/ip
9649    level communication (thank the Diety).  How do you know that
9650    the receiving end has closed the connectio? You do a read from
9651    the socket until you get an EOF.  Of course,  you should be
9652    reading from the &*()*& socket at all times,  as the printer
9653    will be sending status, error messages, etc. etc.  back to you.
9654    But your filter should be doing this,  right?  Oh... you do
9655    not have a filter... well, you MUST have a filter that does
9656    the reading - this is what the IFHP filter was designed to do,
9657    and in fact goes overboard to solve this problem.  Even when
9658    you say 'status@' it STILL tries to read from the file descriptor
9659    because there might just be stuff coming back.  Sigh...
9660
9661Release LPRng 3.6.5 Sun Aug  1 16:46:31 PDT 1999
9662  The date format in the status messages has been changed so that
9663    you can have a short or long format displayed.  By default, the short
9664    format is displayed (short_status_date option is true).  Note that this
9665    sillyness is partly forced on us by Y2K issues.
9666    New flag option: short_status_date - when set, status time/date displays
9667    only time.
9668    (Sigh... by: Patrick Powell <papowell@lprng.com>)
9669  Remote logging information now contains full date and time and process id.
9670    (Sigh... by: Patrick Powell <papowell@lprng.com>)
9671  Update LPRng HOWTO to specify that filter STDERR output is now merged with
9672    the status messages.  This allows errors reported by the filter to appear
9673    on the lpq status.
9674  You can specify filter arguments as the form xxx 'yy yy' "zz zz" and they
9675    will get passed as a block.
9676    (Suggested by:  Martin Forssen <maf@crt.se>)
9677  The lpstat -a code has been fixed so that it correctly searches for
9678    printer names.
9679    (Reported by: Martin Forssen <maf@crt.se>)
9680  Removed duplicate status information lines in status file.
9681    (Discovered by: Patrick Powell <papowell@lprng.com>)
9682  Added 'send_failure_action' information to status output to allow users
9683    of this very odd feature to figure out what is happening.
9684  Fixed up LPRng to handle a stupid RFC1179 idiocy.  If you have a control
9685    file, then the order of N and data file lines is not defined.  So
9686    you have to handle them in any order.  Also,  you can have the same
9687    data file line with DIFFERENT formats - sigh... this means that you
9688    can print it several times with different formats.
9689  The 'generate_banner' option, which was present in 3.5.1, has been restored.
9690    This is only operational when you have a 'normal' forwarding queue.
9691    It uses the 'ab' (always banner), bp (banner printer), bs (banner
9692    printer program for banner at start), and be (banner program for banner
9693    at end), hl (header or banner last) and the user banner information.
9694  The "cm" (comment) option has escapes processed.  Now you can put ":"
9695    in the comment line by using "\072"
9696    (Wanted by: Johan Claesson <Johan.Claesson@uab.ericsson.se>)
9697
9698Release LPRng 3.6.4 Sat Jul 24 14:29:09 PDT 1999
9699
9700  Cut and Paste-o observed in the configure.in file - LPD_CONF_PATH
9701   should be LPD_PERMS_PATH.
9702   (Reported and patched by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu)
9703  Added: AC_PROG_AWK, AC_SUBST(AWK), to configure.in to find the version
9704   of awk to use.
9705   (A good suggestion by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu)
9706  SAMBA Assistance.
9707   The -U option has been extended to the LPRM program as well as the LPR
9708   program.  This allows facilities such as SAMBA to submit jobs on behalf
9709   of users.  In order to allow SAMBA and these facilities not run as root,
9710   the allow_user_specification=name,name,... configuration option will allow
9711   either root or the named users to forgre... I mean impersonate any user.
9712   The SAMBA printing configuration file will now look like:
9713    [global]
9714        printing = lprng
9715        print command = /usr/local/bin/lpr  -P%p -r %s
9716        # alternative to allow userid to be specified as well
9717        # You will have to add the samba UID to the 'allow_user_setting'
9718        #   option in the /etc/lpd.conf file.
9719        # print command = /usr/local/bin/lpr -U%U -P%p -r %s
9720        lpq command   = /usr/local/bin/lpq  -P%p
9721        # alternative
9722        # print command = /usr/local/bin/lpr -U%U -P%p -r %s
9723        lprm command  = /usr/local/bin/lprm -P%p -U%u %j
9724        printcap name = /etc/printcap
9725        load printers = no
9726    [printers]
9727       comment = All Printers
9728       path = /tmp
9729       browseable = no
9730       printable = yes
9731       guest ok = no
9732       writable = no
9733       create mode = 0700
9734    man pages and HOWTO have been update to reflect these changes.
9735
9736  commmon/linelist.c: Escape() had a malloc() size error.
9737  man/lpd.8 man page editted and fixed up for consistency.
9738   (Found by: Patrick Powell <papowell@lprng.com>)
9739
9740  FreeBSD Support: FreeBSD.ports.sysutils has the files for a Ports Install
9741  RedHat RPM: pkg has the files needed to build a RedHat RPM distribution.
9742
9743
9744Release LPRng 3.6.3 Fri Jul 16 16:01:27 PDT 1999
9745
9746  CONFIGURE CHANGES
9747   Please note that the configure and 'make install' have been modified in
9748   order to deal with different installation locations and configuration setups.
9749   Here are the options to configure that you should be aware of:
9750    --with-cppopts=CPPFLAGS  select compiler preprocessor command line options
9751        **** note: these flags will also be passed to CC, so set your options using
9752        **** this configuration option.
9753    --disable-setuid      disable setuid default
9754        **** note:  use this if you want to install without setuid
9755    --disable-priv_ports   set default lpd.perms to reject connections from non-privileged ports
9756        **** note:  if you disable priv-ports, you MUST install setuid.
9757        ****   Thus, you can have --disable-setuid, --disable-priv_ports, but not both
9758    --disable-force_localhost      disable force_localhost default
9759    --with-lpddir=DIR       where to install the lpd binary.
9760        ***   where you want LPD to be installed.
9761    --with-admindir=DIR     where to install the administrative commands, like
9762                            checkpc, lpc, etc.
9763        ***   where you want the other stuff installed
9764    --with-filterdir=DIR     where to install filter (default ${libdir}/filters)
9765                            checkpc, lpc, etc.
9766        ***  where you want the filters installed
9767    --with-lpd_conf_path=PATH     where to install lpd.conf (default /etc/lpd.conf,/usr/etc/lpd.conf)
9768    --with-lpd_perms_path=PATH     where to install lpd.conf (default /etc/lpd.perms,/usr/etc/lpd.perms)
9769    --with-printcap_path=PATH     where to install printcap (default /etc/printcap,/usr/etc/printcap)
9770    --enable-nls           use Native Language Support
9771    --with-included-gettext use the GNU gettext library included here
9772    --with-catgets          use catgets functions if available
9773
9774  MAKE INSTALL changes
9775     These tie into the changes with configure.  You should be aware of them.
9776     You have been warned.
9777
9778     Note 1: FreeBSD
9779       To put LPD in /usr/libexec/lpd,  admin in /usr/sbin, and other stuff in /usr/bin
9780       configure -with-lpd_conf=/usr/libexec/lpd -with-admindir=/usr/sbin --prefix=bin
9781     Note 2: RedHat Linux
9782       To put LPD in /usr/sbin/lpd,  admin in /usr/sbin, and other stuff in /usr/bin
9783       configure -with-lpd_conf=/usr/libexec/lpd -with-admindir=/usr/sbin --prefix=bin
9784
9785  Minor fix to configure, src/Makefile to link only lpq with terminal library
9786    (Supplied by: Roderich Schupp  <rsch@ExperTeam.de>)
9787  Set spool_dir_perms to 0600 instead of 042600.
9788    (Supplied by: Roderich Schupp  <rsch@ExperTeam.de>)
9789  Typos and More Typos in HOWTO
9790    (Spotted by the Eagle Eye of: Wolfgang Schludi <schludi@syscomp.de>)
9791  Printcap 'oh=' was using wrong entry.
9792    (Reported by: Wolfgang Schludi <schludi@syscomp.de>)
9793  lpd -D= did not tell you what you did wrong.
9794    (Reported by: Niklas Edmundsson <nikke@ing.umu.se>)
9795  Kerberos authentication forwarding was incorrect.
9796    (Fixed by: Mike Whitson <mwhitson@MIT.EDU>)
9797  Printcap includes were not being processed correctly.
9798    (Reported by: Don Badrak <dbadrak@census.gov>)
9799
9800  The spool queue control, status, and unspooler files (control.%P,
9801    status.%P, and unspooler.%P) are now specified by the
9802    queue_status_file and queue_control_file options.  This allows
9803    you to relocate the files to another spool queue, or even use
9804    the file.%D option to have a date appended to the file name.
9805    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
9806  When the lpd logger facility makes a connection to the receiver of the
9807    log information,  it sends a dump of the system status.  The dump
9808    consists of a set of lines, one line per print spool entry.
9809    The end of this dump information is indicated by a single END
9810    line, i.e: END\n.  This enables a database management system to
9811    know that all of the queue information has arrived and can then
9812    undertake to do any consistency checks.
9813    (Need determined by:  Patrick Powell <papowell@lprng.com>)
9814
9815  When a 'lpc reread' is done,  the logger process is killed and restarted.
9816    This forces the logger process to use the new printcap or configuration
9817    information.
9818    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
9819  When an unspooler process is active,  a SIGUSR1 signal is sent to it
9820    to force it to rescan the spool queue.  The SIGUSR1 signal
9821    handler sets the Susr1 flag,  and this flag is checked.  There
9822    is a small window between the time that the flag is checked,
9823    the process decides that no new jobs have been put in the queue,
9824    and the process exits.  This window has now been narrowed down even
9825    more by performing a final check just before the process exits.
9826    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
9827  On a heavily loaded system where a large number of files are being
9828    created and/or destroyed,  the spool queue scanning code would
9829    miss some jobs at the start or end of the queue.  This was due
9830    to the fact that the scandir() routine does not lock the spool
9831    directory,  and it can change as the directory is being read.
9832    In order to reduce this window to the smallest possible size,
9833    the directory is now scanned for files and then the files are
9834    processed.
9835    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
9836
9837  Updated HOWTO to reflect these changes.  Updated MAN pages.
9838
9839Release LPRng 3.6.2 Sat Jun 12 16:44:15 PDT 1999
9840  LPRng-HOWTO corrections.
9841   (Corrections by: Vladimir V Egorin <vladimir@math.uic.edu>)
9842
9843  Used the wrong process exit status variable in common/lpd_jobs.c
9844   (Noted by: Olav Kolbu <olav.kolbu@usit.uio.no>)
9845
9846  Added STATE and LPC command execution tracing to the
9847   logger messages.  This allows a remote system which is
9848   monitoring LPRng operation via the logger interface to
9849   monitor when a job is submitted and printed.
9850
9851  Updated format of message sent by logger.
9852    UPDATE message now has a
9853      hf_image= and (optional) lpc= encoded portion
9854    QUEUE message now has a
9855      queue= and (optional) lpc= encoded portion
9856
9857    The lpc identifies that the udpate was done by LPC operation
9858    rather than by LPD as part of normal operation.
9859
9860  File locking had problems under SunOS 4.1.4.
9861
9862  You can now have single letter printer names.
9863    (Sigh... noted by: Patrick Powell <papowell@lprng.com>)
9864
9865  Accounting information now has options (correctly) quoted:
9866   start '-H...' '-c' '-JThis is a job'
9867   This is consistent with ifhp 3.3.2.
9868
9869Release LPRng 3.6.1 Mon Mar 22 09:42:07 PST 1999
9870
9871  This release is a major rewrite of the LPRng software and uses
9872  dynamic memory allocation and as few static and global variables as possible.
9873  This is intended to simplify the porting of the LPRng software
9874  to a multi-threaded environment. In addition,  substantial
9875  cleanup of much of the code was done.
9876
9877  Due to time constraints,  some functionality that is present in other
9878  test versions was not put into this release.  This includes
9879  setting user information by originating IP address.
9880  The 4.x.x release will have support for the new IPP print protocol,
9881  SNMP MIB,  and a HTTP server interface.
9882
9883  As far as possible, existing functionality has been preserved,
9884  with the following notable exceptions.  These are divergent enough
9885  to cause a new major release number to be used, i.e. - 3.6.x
9886
9887  License
9888
9889    Due to various technical legal reasons,  the License for this
9890  release of LPRng has been changed from the GNU Copyleft to the slightly
9891  different but similar in intent Artistic License.
9892
9893  Load Balance Queues and Class types
9894
9895    Assume: a load balance queue with several printers, say
9896       master -> S1, S2;
9897    You can now set the class types accepted by S1 and S2, and
9898    the Master Queue will check the job types against the class
9899    types before sending the job to the appropriate queue.
9900
9901    What is this all about? If S1 has blue paper you can set the
9902  currently printing class to blue (lpc class blue).
9903
9904    Now do lpr -Pmaster -Cblue and your job will be routed to printers
9905  which currently are printing class 'blue'.  Clearly this can be
9906  extended to other things besides paper.
9907
9908    Note that when you use this option you should set the master
9909  queues ignore_requested_user_priority flag so that the first
9910  letter of the class type is not used as the priority.
9911
9912  *********************************
9913  ******* force_localhost *********  distribution default is ON
9914  *********************************
9915
9916    The Most Frequently Reported Problem with 3.4.X and 3.5.X was the following:
9917
9918      lpr is not sending jobs to my lpd server.  Why?
9919
9920  The reason is that other BSD based spoolers ASSUME that the
9921  lpd server will be running on localhost,  and the clients
9922  (lpr, lpq, etc) will connect to the server.  So the printcap
9923  files are written as:
9924   lp:sd=/usr/spool/whatever
9925     :rm=remoteserver:rp=remoteprinter
9926
9927  Of course, lpr reads this as meaning 'connect to the remoteserver',
9928  and never sends the job to the server running on the localhost.
9929
9930  The 'force_localhost' option will FORCE lpr, lpc, etc to connect to
9931  the localhost UNLESS lpr -Ppr@remoteserver is used, i.e.- a command
9932  line override.  In LPRng 3.5.X, the default value of 'force_localhost'
9933  was OFF.  In LPRng 3.6.X, the default value is ON.
9934
9935  Bounce Queues, lpd_bounce,  and LPR Side Filtering
9936
9937    The lpd_bounce option REPLACES bq=xxx
9938  Example:            ->
9939    pr:lp=pr@xxx         pr:lpd_bounce
9940      :bq=far@server       :lp=far@server
9941
9942    This makes bounce queues consistent with remote print queues.
9943
9944    The entire print job job is passed through the various filters,
9945  and the entire output is now sent as a single file to the next
9946  queue.  The format of this file is set by the bq_output=X option.
9947
9948    This now allows the full use of leaders, trailers,
9949  banner page generation, etc., to be used.
9950
9951  Printcap tc=xxx:tc=yyy handling
9952    printcap includes (tc) are done BEFORE setting the values
9953  in the printcap entry,  and in order.  Thus:
9954
9955     lp:s=X:tc=.t1,.t2:tc=.t3
9956     .t1:s=Y
9957     .t2:z=W
9958     .t3:z=P
9959
9960   would result (for lp) in:
9961     lp:
9962      :s=Y # from .t1
9963      :z=W # from .t2
9964      :z=P # from .t3
9965      :s=X
9966    and a final result of
9967     lp:s=X:z=P
9968
9969   (Requested by and faultless arguments by: the lprng mailing list...)
9970
9971  Permissions List File:
9972    You can now say XXX=<filename and the whitespace separated
9973  contents of the file are used as the options value.
9974
9975  Example:
9976    ACCEPT REMOTEHOST=</usr/local/etc/lpd_hosts
9977   and have /usr/local/etc/lpd_hosts contain:
9978
9979    *.site.com
9980    10.0.0.1/24  pc.*.mystuff.org
9981
9982  LPC Permissions Checking
9983
9984  You can now use:
9985    ACCEPT LPC=hold,remove,topq
9986  If you are doing an LPC operation, then this matches the operation.
9987  This replaces the lpc_user=.... printcap abomination.
9988
9989  For example, to allow user X on the server to do hold operations,
9990  use:
9991
9992    ACCEPT LPC=hold USER=x SERVER
9993
9994  The 'ms', 'sy' and 'ty' serial port configuration options are now
9995  the single option 'stty' which makes more sense and is compatible
9996  with other LPRng software.
9997
9998  The 'rt' and 'send_try' options were accidentally aliased - removed
9999  the 'rt'.
10000
10001  There is now finer control for remote LPQ queries.
10002   force_lpq_status=KEY=hostlist;KEY=hostlist
10003     Specifies a set of hosts and the format for lpq status queries,
10004     overridding the requested format.
10005      KEY = l (long) or s (short)
10006      hostlist = list of IPaddress/Mask or GLOB patterns for hostnames
10007     Example:  force_lpq_status=s=*pc.site.com,10.0.25.0/24;l=sunsystem.site.com
10008   reverse_lpq_format=hostlist
10009     Reverse l and s query formats when a request arrives from these
10010     hosts.
10011   return_short_status=hostlist
10012     Return short_status_length status lines when a request arrives from
10013     these hosts
10014  short_status_length=N
10015     Number of status lines to return when return_short_status matched
10016
10017  LPC added commands
10018    active   - checks for an active server
10019    local (all | printer) - show printcap and configuration information
10020      for a local printer.  Debugging aid.
10021
10022  LPQ added option
10023     -L   - equivalent to -llllll....
10024
10025  CHECKPC
10026      checkpc -V now prints out all sorts of additional information for
10027    debugging and problem solving.
10028      checkpc now checks both for server AND client mode.  No fixing done
10029    for client information, just displays it.
10030      checkpc now checks for missing tc=xxx entries.
10031
10032   LPD_CONF_PATH and PRINTCAP_PATH compilation option
10033     make LPD_CONF_PATH=/usr/local/etc/lpd.conf
10034     make PRINTCAP_PATH=/usr/local/etc/printcap
10035       - changes the /etc/lpd.conf and  /etc/printcap file
10036     default locations
10037
10038  AUTHENTICATION
10039
10040     The entire authentication interface has been redone,  and PGP,
10041  Kerberos 5, and MIT Kerberos 4 Print System compatibility has
10042  been added.  The permissions checking method has been changed as
10043  follows,  with respect to the following keys:
10044    AUTH       match or TRUE  if authenticated transfer done
10045    AUTHTYPE   matches the authentication type
10046    AUTHUSER   client or user's authentication id
10047    AUTHFROM   originating server's authentication id when forwarding job
10048    AUTHSAMEUSER   match if the client id in the request and the
10049               (saved) client ID used to spool a job are identical.
10050    AUTHJOB    match or TRUE if a job was submitted with authentication
10051
10052  Options have been redone to put a bit of consistency into things
10053
10054    auth=xxx                   authentication type for client to server
10055    auth_client_filter=/path   client to server authentication filter
10056    auth_forward=xxx           authentication type for forwarding
10057    auth_forward_id=xxx        authentication id for remote end when forwarding
10058    auth_forward_filter=/path  server to server authentication remote server id
10059    auth_recieve_filter=/path  server filter to recieve authentication
10060    auth_server_id=xxx         client to server - id of server
10061                               receiving server - id for reception
10062                               server to server - id for origination
10063    pgp_path=/path     path to pgp program for auth=pgp
10064    pgp_passphrase=clientkey   file in $(PGPPATH) or $(HOME)/.pgp
10065                               holding client passphrase
10066    pgp_server_key=~daemon/.pgp/serverkey   file holding LPD server passphrase
10067
10068  SOLARIS Package Support
10069    Start of generating binary distributions.
10070    (Contributed by: Martin Forssen <maf@crt.se>)
10071
10072  LPD lock file:  now defaults to /var/run/lpd
10073    (Pointed out by: Martin Forssen <maf@crt.se>)
10074
10075  %D expansion,  create_files flag
10076    If you have %D in a printcap value,  it gets expanded to the
10077  current date in YYYY-MM-DD format.  If you have the create_files flag
10078  set,  then the files that normally get trimmed (max size specified)
10079  are created.  This allow you to do:
10080     lf=log-%D
10081  Your log files now will have the pathname sd.../log-YYYY-MM-DD
10082  and you can now get rolling log files on a daily basis.
10083  The files that have this done are the log file, status file,
10084  and accounting file.
10085
10086  PCLBANNER and PSBANNER - new banner printing programs using PERL produces
10087   pcl or PostScript banner page.
10088
10089   lp:bp=/usr/local/.../pclbanner
10090     :of=....
10091     :if=....
10092   OR
10093
10094   lp:bp=/usr/local/.../psbanner
10095     :of=....
10096     :if=....
10097
10098
10099  Bug fixes:
10100    Gadzillions.  Many.  Some were not bugs but simply inconsistencies with
10101  documentation.  Sometimes documentation changed, sometimes the code.
10102
10103  Default Server Print Queue:
10104
10105   The default_printer_when_unknown configuration option
10106   allows you to specify a print queue that the server will use when
10107   it cannot find one in the printcap.  This print queue should have
10108   the format:
10109
10110   /etc/lpd.conf:
10111    default_printer_when_unknown=fallback
10112
10113   /etc/printcap:
10114   fallback:server
10115    :sd=/usr/spool/lpd/%P
10116    :router=/..../router_for_misdirected_jobs
10117
10118    The router should output the correct destination (see router documentation
10119    in LPRng-HOWTO),  and exit with 0, or exit with JREMOVE to cause the job
10120    to be dropped in the bit bucket.
10121
10122Release LPRng 3.5.4 Mon Nov  9 10:07:42 PST 1998
10123  Bug fixes:
10124  Bad link to site in LPRng.smgl documentation.
10125   (Reported by: Anthony Thyssen <anthony@cit.gu.edu.au>)
10126  LPQ status was missing a space separator when reporting
10127    subserver name list.
10128   (Spotted by the Eagle Eyes of: John Callaghan <callagh4@pilot.msu.edu>)
10129  The xt flag has been expurgated,  totally.  As was documented.
10130   (Spotted by: James P. Dugal <jpd@usl.edu>)
10131  LPR_bsd option added so that -m does BSD mail option.
10132   (Requested by various folks)
10133
10134  Testers and bug fixers:
10135   (Compilation: Bernie Kirby <bernie@ecr.mu.oz.au>)
10136
10137
10138
10139
10140Release LPRng 3.5.3 Mon Nov  9 10:07:42 PST 1998
10141  Documentation Error:
10142    LPRng-HOWTO, Section 8, indicated that the lpd.conf file
10143  could be obtained using a filter.  This is not correct.
10144  (Noticed by: David Stenglein <david.stenglein@citicorp.com>)
10145
10146  Major Modification:
10147    removed the 'xu' (per spool queue permission file) after trying
10148  to make the semantics work.  Now we have a single permission file
10149  for all printers
10150
10151  Major Modification - Load Balance Queues:
10152    Some users reported very slow operation of the load balance
10153    queues.  This was verified,  and extensive modifications were
10154    made to the functionality.
10155
10156    CHANGE:
10157        The subserver queues are only scanned at startup
10158      and when there is an explicit indication that a new
10159      job has been put into or removed from the queue
10160      (SIGUSR2 received)
10161
10162  Major Modification - LPD Does Not Ignore LPR, LPC Requests
10163
10164      Some users with either large numbers of spool queues or
10165    spool queues with large numbers of jobs noticed VERY slow
10166    LPD response.
10167      This has been improved considerably.
10168
10169    CHANGE:
10170      LPD server would run through the Spool queues, looking for
10171    trash to be removed or jobs to be started.  This polling is
10172    necessary due to the possibility of a race condition between
10173    the time that a job is put into the queue and the time that
10174    the unspooler checks the queue for entries.
10175      The operation has been modified so that only a SINGLE PROCESS
10176    runs down through the spool queues.  When it finds work to do,
10177    it informs the LPD server,  which now will start ANOTHER process
10178    to check other queues for work.  Note that while these processes
10179    are working their little hearts out,  chewing up swap space
10180    and reading directory entries like mad,  the LPD server can
10181    accept requests for LPQ, etc.
10182
10183  Major Modification - LPR speedup:
10184    The LPD server now accepts jobs for spooling WITHOUT extensively
10185    checking the spool queue.  This eliminates problems with printing
10186    to queues with a large number of entries.
10187
10188  Speed Improvement:
10189    A bit of time analysis showed that LPRng was spending a large
10190    amount of time during queue scanning in the fcmp() routine.
10191    This has been rewritten and is now a strcmp().
10192
10193    During queue scan, Get_controlfile() generates a 'cmp_str' value
10194    that represents the information needed to do sorting.  This is
10195    is then used during queue sorting as the comparison value.
10196
10197    The 'struct cmp_struct' in the include/sortorder.h is used to
10198    make sure that sufficiently long string buffers are allocated.
10199    The make_cmp_str() in common/sortorder.c can be replaced with
10200    a users version if they desire.
10201
10202  Bug Fix:
10203  safestrncpy, mystrncpy, safestrncat, mystrncat now used for string
10204   copies where there is doubt on the buffer/string length.  Note that
10205   these versions will always make sure the buffer is terminated with
10206   a 0 value.
10207
10208  lpr -U xx is supposed only to work for ROOT. Check for root perms
10209    was not done correctly.
10210    (Patch by: Paul Szabo <psz@maths.usyd.edu.au>)
10211  permissions checking:  the C=value1,value2 permissions checking
10212    option wants a C (control file) line starting with character C
10213    and glob matching the indicated value1, value2, etc.  For example,
10214    N=patrick*,powell* should match against line Npatrickwashere or
10215    Npowellwasthere.  The check was done incorrectly.
10216    (Patch by: Paul Szabo <psz@maths.usyd.edu.au>)
10217  LPD/lpd_rcvjob.c - removed limits on lengths of class and host names
10218  When using bounce queues and the generate_banner to cause a banner to
10219    be added to a job,  the 'ab' (always banner) and the lpr -h (no header)
10220    flags now are used in the decision for banner generation.
10221    (Noticed by: Charles Karney <karney@pppl.gov>)
10222  Filters were not being passed -Knnn option.
10223    (Noticed by: Charles Karney <karney@pppl.gov>)
10224  Permissions:  SERVER keyword was not used for X permissions.
10225    (Fix by: Patrick Powell <papowell@lprng.com>)
10226  File Permissions:  spool_file_perms was being ignored due to the
10227    umask() not being (un)set before creating a file.
10228    (Discovered by: Albert Fluegel <albert.fluegel@hl.siemens.de)
10229  ConnectTimeout now times out on connect() calls.
10230    (Reminded by: Heinz-Ado Arnolds <arnolds@ifns.de>)
10231  Accounting filter:  when the filter returns 'JHOLD' the job
10232    will be held (as documented).
10233    (Patch by: Rainer Schoepf <schoepf@uni-mainz.de>)
10234   LPRM incorrectly gives the "clean" usage instead of "lprm" usage.
10235    (Fix by:  Edan Idzerda <edan@mtu.edu>)
10236   The 'xt' and 'check_for_nonprintable' flags were in conflict.  Removed
10237    the 'xt' flag.
10238    (Reported by: "Dugal James P." <jpd@usl.edu>)
10239   The LPD/lpd_remove.c code did not remove jobs correctly when a
10240    :destination=... entry was present
10241    (Patch by: john@cs.wisc.edu)
10242   Log files not being truncated.  Well, they are now.
10243    (Fix by: Patrick Powell <papowell@lprng.com>)
10244   LPR not printing multiple copies (-K option)
10245    (Patch by: Keith Richardson <keithr@ms.com>)
10246   LPD did not check spool queue just before exiting from printing loop.
10247    This opened a BIG race window on systems with lots of jobs in the
10248    spool queue.
10249    (Fix by: Patrick Powell <papowell@lprng.com>)
10250   Expand_command did not check for Do_dollar() returning 0, indicating
10251    a string overflow condition, which it then dereferenced and core dumped.
10252    (Reported by:  (Walter Misar) <misar@rbg.informatik.tu-darmstadt.de>)
10253   Control file filters were not being invoked correctly.
10254    (Reported by: Tony Graham <Tony.Graham@uni-c.dk>)
10255   Memory trashing being done by different behaviour of strncat() on some
10256    systems.  Replaced by mystrncat() and took the performance hit in return
10257    for reproducible behaviour and non-trashing copies.  Sigh.
10258    (Fix by: Patrick Powell <papowell@lprng.com>)
10259   strncpy() and strcpy() does not handle overlapping strings correctly, or
10260    at least that is what the man page says.  Replaced several of these
10261    calls by memcopy() and friends.
10262    (Fix by: Patrick Powell <papowell@lprng.com>)
10263
10264Release LPRng 3.5.2 Fri May  1 14:39:55 PDT 1998
10265  Bug Fix:
10266   lpr -k did not pass the correct length (0) to the
10267   remote system.
10268    (Reported and patch by:  Wolfgang Scherer <ws@ecosys.de>)
10269   common/pr_support/ checks Do_lock() for <= instead of < for
10270    failure condition.
10271    (Reported by:  Wolfgang Scherer <ws@ecosys.de>)
10272   common/proctitle.c had a strdup() call - not supported
10273    under ULTRIX.
10274    (Reported by:  "Todd C. Miller" <Todd.Miller@cs.colorado.edu>)
10275   force_localhost was being tested BEFORE it was set in the printcap
10276    entry.  Now is checked AFTER the printcap entry is processed.
10277    (Reported by: Petri Kaukasoina <kaukasoi@elektroni.ee.tut.fi>)
10278   LPD returns 'o connect permissions' instead of 'no connect ...'
10279    (Noted by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
10280   LPD records filter name in error message correctly.
10281   LPQ now reports full class name in status message if
10282     'class_in_status' flag set in printcap.
10283     (Requested by: Philip J. Nesser II <pjnesser@nesser.com>)
10284   common/sendlpc.c - missing Lp_device = 0
10285     (Reported by: "Dugal James P." <jpd@usl.edu>)
10286   LPD reported the wrong host name in 'no permission' messages.
10287     (Noticed by: Patrick Powell)
10288
10289Release LPRng 3.5.1 Fri May  1 14:39:55 PDT 1998
10290  Baseline Stable Release
10291
10292Release LPRng 3.4.12 Fri May  1 14:39:55 PDT 1998
10293  Legacy support modification:
10294    control file now has printer information in:
10295       controlfile
10296       Ninfo
10297       Uinfo
10298    order.  Some legacy printer spoolers require this order.
10299   (Reported by: Don Badrak <dbadrak@geo.census.gov>)
10300
10301  Minor cleanups of:
10302    Get_printer() calls - some silly comments and orders
10303    common/fileopen.c/Init_tempfile() - clarified the
10304      use of the various directories and defaults.
10305    Force_localhost:  now done in Get_printer(), where it should
10306      have been done in the first place;  LPQ  and LPRM
10307      now send requests to localhost unless explicitly overriden
10308    Force_fqdn will now brutally assume that the domain of the
10309      sender is the one reported by the FQDN of the originator
10310      of the connection.
10311
10312Release LPRng 3.4.11 Thu Apr 30 11:46:25 PDT 1998
10313
10314  Functionality Change:
10315   JABORT and stop_on_abort default value changed
10316   JNOPRINT filter exit status stops printing
10317   JFAILNORETRY filter exit status stops retries
10318
10319  In previous versions,  when a filter exited with unknown or
10320  JABORT status,  the default action was halt processing of
10321  PENDING jobs.  When a new job was sent to the queue,
10322  or a lpc start was performed,  processing was restarted started.
10323  Under heavy load conditions,  the effect of the JABORT was
10324  nullified by the arrival of new jobs.
10325
10326  The LPRng behaviour has now been modified to handle JABORT
10327  conditions in a predictable manner, using the 'stop_on_abort'
10328  flag.
10329
10330  1. The default for 'stop_on_abort' is now FALSE.
10331     This means by default that the JABORT status will simply be
10332     treated as a 'do not retry this job' error status.
10333     If the 'save_on_error' flag is FALSE (default), the job
10334     will be removed from the queue.
10335
10336  2. If 'stop_on_abort' is set to TRUE,  then when a filter
10337     exits with a JABORT on unknown status,  further processing
10338     will stop, and NO pending jobs will be printed.  If the
10339     'save_on_error' flag is FALSE, the job will be removed from
10340     the queue.
10341
10342  3. If 'stop_on_abort' is set to TRUE, the abort condition is
10343     sticky, i.e. - it will persist until
10344     action is taken to clear it.  Any of the LPC commands which
10345     cause printing to be restarted will clear it:
10346       LPC start, up, kill, topq, release, or redo
10347
10348  4. LPQ and LPC will report if there is an aborted job condition.
10349
10350  Note that for most users, the default action is now the desired
10351  action, i.e. - to continue processing jobs.
10352
10353  However,  certain administrators will most likely need to assume
10354  that when a filter exits with JABORT that further printing on this
10355  queue will fail.  The sites should set 'stop_on_abort' to TRUE.
10356
10357  JNOPRINT:
10358
10359  If a filter exits with JNOPRINT,  then printing will be stopped;
10360  this will have the same effect as an LPC stop command.  The job
10361  will NOT be treated as an error job and will remain pending in the
10362  print queue.
10363
10364  This allows filters to detect conditions that would normally cause
10365  printing to fail before a job is started,  and halt printing under
10366  these conditions.
10367
10368  JFAILNORETRY:
10369
10370  Under various arcane conditions,  it is possible for a filter to
10371  determine that a job has failed,  and should not be retried.  Most
10372  filters would return a 'JREMOVE' error code,  but for various arcane
10373  reasons (lots of Arcania here, folks), the 'save_on_error' flag
10374  might be set,  and the adminstrator would like to have the job
10375  marked as erroneous,  but NOT removed.
10376
10377  If the filter exits with JFAILNORETRY,  then the job is treated
10378  as though it had an error, but no retries are performed.
10379
10380  Extended Functionality:  'mail_from' option
10381    Allows specification of the 'From:' user.  If not specified
10382    default is to use the printer name.
10383   (Patch By: Rainer Schoepf <schoepf@uni-mainz.de>)
10384  Portability Extension:
10385   LPD_CONF_PATH compilation option
10386   The location of the LPRng configuration file is specified
10387   by the config_path value in the src/common/vars.c file.
10388   The compilation option -DLPD_CONF_PATH=path can be
10389   used to override the default locations.
10390   Example:  make LPD_CONF_PATH=/usr/local/etc/lpd.conf all
10391  Nit Fix:  spelling errors corrected.
10392   (Reported by: Don Badrak <dbadrak@geo.census.gov>)
10393  Incredible 9 Gigabyte Partition Fix:
10394   (Reported by: Don Badrak <dbadrak@gesg34.geo.census.gov>)
10395   Apparently the common/freespace/plp_fs_free_bytes cannot handle
10396   a >4 gigabyte partition.  The fix was to cast values to a
10397   double - this should be sufficient until we get 10**38 byte file
10398   systems. :-)
10399  Bug Fixes:
10400   LPD usage() had (erroneous) -i option.
10401     (Reported by: wcolburn@nmt.edu (William Colburn (aka Schlake)))
10402   get_max_servers did not get max servers.
10403     (Patch by: Don Badrak <dbadrak@gesg34.geo.census.gov>)
10404
10405
10406Release LPRng 3.4.10 Thu Apr 23 18:01:37 PDT 1998
10407  Added Functionality:
10408   sync_lpr flag- this suppresses the closing of the lpr to lpd
10409   network connection until the LPR job is completely processed
10410   by the LPD server.  This can,  under various arcane and odd
10411   situations,  result in the lpr processes 'hanging' until the
10412   LPD server queries DNS servers, looks up permissions, etc etc.
10413   However,  if users are trying to figure out why LPR has returned
10414   and their job is not in the queue,  or you have some desire to
10415   write shell scripts that create jobs and then remove them
10416   in order to see 'just how fast LPRng is',  this flag will SLOW DOWN
10417   the operation by making it synchronous.  Any little thing
10418   to make folks happy... :-)
10419 Modified Functionality:
10420   The 'force_localhost' flag has now been modified to (literally)
10421   force a connection to one of the 'localhost' addresses returned
10422   by a DNS lookup.  This should have no effect on 'normal' users,
10423   but might have the result that the status returned by LPQ
10424   will now differ a little.  For example, if you have a printcap
10425    pr:lp=pr@host2:force_localhost
10426   you will discover that lpq -Ppr will now print:
10427    Printer: pr@localhost
10428     ... status for localhost queue
10429    Printer: pr@host2
10430     ... status for host2 queue
10431   This is correct and accurate reporting, compared to the previous
10432   lpq format.
10433    (Brought to my attention by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
10434
10435 Bug Fixes:
10436 Job_printable_status() did not report active jobs, so lpq and lpc job count
10437   was off by one.
10438   (Reported by:  Al Marquardt <almar@uiuc.edu>)
10439
10440Release LPRng 3.4.9 Mon Apr 20 12:42:55 PDT 1998
10441  Enhanced Functionality:
10442   For those folks who want to 'masquerade' their servers,
10443   the 'report_server_as=hostname' will now report your printer@server
10444   as 'pr@hostname'.
10445   (Requested by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
10446  EXTA/EXTB:
10447    ifdef'd for folks with REALLY vintage systems...
10448    (Requested by: David Coelho <drc@ppt.com>)
10449  Added debugging code to determine when servers started.
10450  LPD now clears job 'move' indications so that a job can
10451    be saved (save_when_done) and then reprinted with
10452    out being moved to the destination again.
10453  lp -s (Silent) now does not print job id information.
10454    (Noticed by: David Coelho <drc@ppt.com>)
10455  Jobs which do not have print permissions now get removed.
10456    (Reported by: Al Marquardt <almar@uiuc.edu>)
10457  lpq -tN -c now will not core dump.
10458
10459Release LPRng 3.4.8 Sat Apr 18 15:23:22 PDT 1998
10460  Portability Fix:  AIX 4.1.5 has definition conflicts when
10461  doing #include a.out.h.
10462   (Reported and Fix by: Niklas Edmundsson <nikke@ing.umu.se>)
10463  Also, Solaris4.1.4 has conflicts with tgetent() definition.
10464   (Reported by: wcolburn@nmt.edu (William Colburn (aka Schlake)))
10465  Y2K checked - ISO conformant date format is used in log and other
10466   messages.
10467  :force_fqdn_hostname flag causes FQDN host name rather than
10468   short hostname to be put into control file.
10469
10470  Bug Fixes:
10471  Accounting at end was failing do to closing output device
10472   too early in the algorithm.  Device now closed AFTER last
10473   accounting script is called.
10474   (Reported by: Niklas Edmundsson <nikke@ing.umu.se>)
10475  Time_t strikes again.  I just discovered that there were some
10476   places where I was using long instead of time_t for time values.
10477   This has been fixed.  However, there is also now the problem
10478   of snprintf( "%d", time((void*)0)) being used for output and
10479   t = atoi("xxx") for input of time values.  Sigh... will fix
10480   this later.
10481  "lpc lprm pr all" operation now works correctly
10482   (Reported by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
10483
10484Release LPRng 3.4.7 Wed Apr 15 08:40:25 PDT 1998
10485  Bug Fix:
10486    Stupid system implementor used snprintf() instead of
10487    plp_snprintf,  causing headaches for unsuspecting
10488    folks on systems that did not have snprintf().
10489    Better fix is to insist that systems have snprintf() :-)
10490    (Reported by: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>)
10491  Enhancements:
10492    The code for doing 'polling' of spool queues had a very high
10493    overhead in terms of process creation.  This code has been
10494    modified to have a single process run down the queues and
10495    check for work.  There is a bit of overhead,  but much less than
10496    the overhead in creating a large number of processes.
10497  Bug Fix:
10498    when generating banners using :generate_banner,  it did not
10499    work.  System developer forgot to include banner... :-)
10500    (Reported by: Cecil R. Whitaker <cwhitak@nswc.navy.mil>)
10501
10502    Jobs that did not get permission to print and were flagged
10503    with JREMOVE did not get removed.
10504     (Reported by: Al Marquardt <almar@uiuc.edu>)
10505
10506    When putting in a new 'From this host' line in a control file,
10507    did not remove the old one.  Also 'Q' entry as well.
10508     (Reported by: Al Marquardt <almar@uiuc.edu>)
10509
10510    Multi-homed hosts that do not recognize interfaces need
10511    special coddling when trying to connect to them.  Link_support.c
10512    gets yet another special case for connections.
10513     (Patches by: Giray Pultar <pultar@pprd.abbott.com>)
10514
10515    listen(backlog=64) - used to be 10, which caused connections
10516    to be dropped under heavy loads.
10517
10518    checkpc was adding a / to end of file names.
10519    (Noticed and fixed by: Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
10520
10521Release LPRng 3.4.6 Tue Mar 31 18:10:59 PST 1998
10522  Bug Fix or Nit Pick:
10523    When sending a job AND the :qq or :use_queuename flag
10524    is set AND the job arrives without a Q entry THEN
10525    the name of the queue it was spooled to is used.
10526    (Noticed by:Cortney Sampson <sampson@physics.utoronto.ca>)
10527
10528    Missing initialization in src/common/permissions.c
10529    Discoverer got the 'Gold Star with Flashy Sequins' bug hunting
10530    award.
10531    (Found by and Award to: Duncan McEwan <duncan@MCS.VUW.AC.NZ>)
10532
10533  Lpr -Z options now accumulate, rather than overwrite, if the
10534    Allow_duplicate_options flag is not set.  This makes life
10535    easier for the user when specifying multiple -Z options.
10536
10537  Allowed a LPR to LPD job transfer ending in a 'blank line' to be accepted.
10538    This is generated by some oddball LPR programs.
10539    (Reported by:  Patrick Hildenbrand <patrick@emea.ers.ibm.com>)
10540
10541Release LPRng 3.4.5 Sun Mar 29 18:37:09 PST 1998
10542  LPF:
10543    Cleaned up some minor nits with options.
10544    (Noticed by: Patrick Powell <papowell@lprng.com>)
10545
10546  LPRng-HOWTO:
10547    A huge number of corrections from:
10548    (Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu)
10549
10550  Enhancements: max_log_file_size, min_log_file_size
10551
10552    Sometimes it is desireable to run a log file in order to try
10553    to find problems.  But if you do not truncate the log file, it
10554    can grow to enormous lengths.  The max_log_file_size#nnn
10555    (size in Kbytes, default = 0 or unlimited size)
10556    printcap/configuration variable will
10557    cause the LPD server to check for the size of the log file
10558    on opening it and if larger than max_log_file_size K bytes
10559    truncate it to min_log_file_size
10560    (default 0 specifies max_log_file_size/4) Kbytes.  It preserves
10561    the last part of the file.
10562
10563    Note that when the truncation operation occurs and there is
10564    heavy logging activity from multiple processes that the log
10565    file may get jumbled.  Recommended value of max_log_file_size
10566    should be pretty large in order to make the truncation activity
10567    minimal - 10240 (10 Megabytes) is what I have been using with
10568    pretty reasonable success.
10569
10570  Enhancements:
10571    The time of a job error is now logged in the hold file.
10572    This allows the time of the error to be determined.
10573
10574  Bug Fixes:
10575    Modified reporting of subserver processes that have been
10576    killed off or have core dumped.  This solved a problem with
10577    a system that would generate a SIGTERM signal.
10578
10579    UTILS/accounting.pl fixed up. Also, psfilter and hpif now
10580    working correctly with the filter.
10581    (Patches, suggestions, and advice by:
10582      Gordon Haverland <haverlan@agric.gov.ab.ca>)
10583
10584    The LPD/lpd_jobs code for retrying has been redone to make it
10585    more robust when printing fails.  The LPRng system will now
10586    agressively retry sending jobs.  Needless to say,  there are
10587    magic debugging flags to turn this off for testing purposes.
10588      (Noticed by:  Jesse Off <joff@cnde.iastate.edu>)
10589
10590    The bogus 'server starting' and 'server done' messages have
10591    been removed from the status file.
10592
10593    Now send a trace/logging message before the job is finally put
10594    in the spool queue.  Removes disturbing occurrence of 'success'
10595    messages being sent for a job that has not yet arrived according
10596    to log messages.
10597
10598    More informative error messages and logging messages added at
10599    appropriate points.
10600
10601Release LPRng 3.4.4
10602
10603  Bug Fixes:
10604
10605  termclear.c - tgetent() misdefined.
10606     Also,  configure now checks for Solaris systems and tries to
10607     handle their brain damaged colliding definitions in term.h, curses.h,
10608     terminfo.h and termcap.h files.
10609
10610  ignore_name_format_errors is now documented.  Actually, it is really
10611    fix_bad_jobs.
10612    (Pointed out by:  Bruce S. Marshall  bmarsh@wwnet.com)
10613
10614  Fixed a minor but annoying problem with hold files and very fast
10615    system.  Better solution would be to have an indexed database,
10616    but it is almost more trouble than it is worth to implement.
10617
10618  Fixed a problem with 'Destination' being a pointer to dynamically
10619    allocated memory,  which would get deallocated by Set_job_status()
10620    calling Get_job_status().
10621
10622  Fixed a problem with control file names not being formatted correctly.
10623    (Reported by:  John Perkins <john@cs.wisc.edu>)
10624
10625  Fixed up LPRng-HOWTO,  created new version.
10626
10627  snprintf() used instead of plp_snprintf()
10628    (Reported by: lots and lots of folks, including
10629        "Reinhard Zierke" <zierke@informatik.uni-hamburg.de>)
10630
10631Release LPRng 3.4.3
10632  Bug Fixes:
10633    Serial Port Configuration.  Do_stty not called to set up serial
10634      ports.  Reported by LOTs and LOTs of folks.
10635    Fixed the GetMaxServers() code to really find the maximum number
10636      of processes.
10637      (Fixes by: Don Badrak <dbadrak@gesg34.geo.census.gov>)
10638    Memory Leaks From Hell
10639      Found them.  Found the problem.  Decided that fixing the problem
10640      was not worth it.  Found an alternative method to the current one
10641      for starting processes that AVOIDS the memory leaks.
10642
10643      In the new version of code,  the LPD main() process will start
10644      subprocesses only when it needs to.  Periodically,  it will run
10645      down the list of print spools,  starting (forking) a process.
10646
10647      In the previous version,  it would call the Setup_printer() code
10648      which would then in turn all the routines which would allocate
10649      (malloc) memory that would never get deleted.  If there were jobs
10650      to be printed,  the main() process would then fork and create a
10651      server process.
10652
10653      In the current version,  the main() process will create a pipe(),
10654      and then fork the child process,  which will call the *&I*(&()
10655      Setup_printer() code,  and then checks for work.  If there is NO
10656      work,  it exits (exit code 0), and as a side effect, the pipe is closed.
10657      The parent process will read 0 bytes, and say, 'Ah, No work'.  As
10658      a side effect,  it also gets the status.  If there is work,  the
10659      daughter will write a string to the pipe and THEN close the pipe.
10660      The parent will read the data,  and say 'Ah, work to be done'.
10661
10662      There are several elegant little side effects of this method.  Firstly,
10663      the main() process will block until the child decides if there is work
10664      to be done.  In effect,  this will allows the child to proceed ASAP
10665      to the decision point.  Secondly, the parent process has a VERY small
10666      amount of memory allocated,  and does not grow at all large.  This
10667      helps,  as the children,  when created, have very small memory needs
10668      and process creation is sped up tremendously.
10669
10670      I am surprised to find just how much better this is...  I probably
10671      should have done this before,  but I was trying to avoid process creation
10672      problems, and ended up with large memory footprints.
10673
10674      (Proddings, pokings,  help, suggestions, and lots of tracking down by:
10675          Al Marquardt <almar@uiuc.edu> - who found the cause of the memory
10676            leak
10677          Branson Matheson <Branson.Matheson@FergInc.com> - who came up with
10678            another memory leak
10679
10680         If you ever want to debug memory leaks,  please look at the
10681         malloc debugging package by Gary Watson.
10682              http://www.letters.com/dmalloc/
10683       )
10684
10685     lpc move
10686       In the previous versions,  lpc move only worked if the spool
10687       queue was active.  This meant that you could not stop a spool queue and then
10688       move the jobs to a different queue.  Now you can.  However, if you
10689       redirect a queue, then it must be active for jobs to be redirected.
10690       C'est la Vie.
10691       (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
10692
10693     Some logging numbers were not being reported correctly.  They now should be.
10694       (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
10695
10696     The QQ option was not working correctly due to a coding typo.
10697       (Reported by:  Gary Cender <gcender@eng.dowjones.com>, and others)
10698
10699     LPR was doing translate_format, which was wrong.
10700       (Reported by:  Chad Mynhier <mynhier@cs.utk.edu>)
10701
10702     LPR does not use '-' as a flag to read from STDIN.  Documentation changed
10703       to reflect this;  easier than fixing LPRng... :-)
10704       (Reported by: "James P. Dugal" <jpd@usl.edu>)
10705
10706     LPR now allows LOOOONG options to -Z.
10707       (Requested by:  George Lindholm <lindholm@cheshire.ucs.ubc.ca>)
10708
10709     Race condition with job completion and testing for completion once
10710       again explored.  Now err on the side of 'slow but correct' rather than
10711       'fast but sloppy'.  Only happens on FAST servers,  and the alternative
10712       to run LPRng on slow servers was not taken well :-).
10713       (Reported by: Gary Cender <gcender@eng.dowjones.com>)
10714
10715     OS/2 sends very odd control file format - now should parse this format correctly.
10716       (Reported by:   "Patrick Hildenbrand"<patrick@emea.ers.ibm.com>)
10717
10718Release LPRng 3.4.2
10719  Bug Fixes:
10720    Connect_timeout was not used uniformly or documented accurately.
10721    (Fixes by: Heinz-Ado Arnolds <arnolds@ifns.de>)
10722    configure was too agressive in checking for -lresolv.  Now includes
10723     -lresolv only if gethostbyname2 is not found.
10724     (Problem reported by: Uri Blumenthal <uri@ibm.net>)
10725    It was observed that under heavy load conditions that some files
10726      were getting printed twice.  This was due to a race condition.
10727      The race condition has been eliminated by introducing another
10728      field into the job control information specifying the subserver
10729      process id.
10730
10731Release LPRng 3.4.1
10732  New Baseline Release - Stable version
10733
10734  Enhancements:
10735   The configure script now supports setting the installation directories
10736    configure --with-lpddir=DIR --with-admindir=DIR
10737      - sets the install directory for lpd and lpc/checkpc respectively.
10738   (Patches by:  Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
10739   Added a 'retry_etimedout' flag as well to handle connections to devices
10740    that have a very long connection time due to slow network connections
10741    over dialup devices.
10742   The lpq status now will show 'stalled' when 'stalled_time' is non-zero
10743    and the job is active for more than stalled_time seconds.
10744    (Suggested by: lots of folks)
10745   The check_idle=program facility can now be used to check that a printer
10746    is idle before processing jobs.  This is useful when you have multiple
10747    server queues. For example:
10748     lp:sv=lp1,lp2:...
10749     lp1:check_idle=/prog:...
10750     lp2:check_idle=/prog:...
10751    When the lp server starts up,  it will check the lp1 and lp2 queues,
10752     and will only send jobs to the one whose check_idle program reports
10753     an idle condition.
10754
10755  Bug Fixes:
10756    Updated LPRng-HOWTO.
10757    Fixed missing permission check checkpc.
10758    Also (correctly) implemented ${option} expansion in filter commands.
10759     This now gets expanded to the printcap option value,  as documented.
10760    (Made by: Patrick Powell <papowell@lprng.com>
10761
10762Release LPRng 3-3-7
10763
10764 Ports:
10765   Solaris 2.6.  Also update README.install for new startup/shutdown script
10766
10767 New functionality:
10768
10769   reverse_lpq_format : reverse returned lpq status format when from
10770      specified host.
10771
10772    There is a defect in some System V support for RFC1179 printers.
10773    The lpq facility will send a 'SHORT' status request when a 'LONG'
10774    is desired,  and vice versa.  This results in the wrong status format
10775    being returned.
10776
10777    The reverse_lpq_format=(globhost|ip/mask)+ option allows you to specify
10778    that when a request is received from a host whose name or address matches
10779    an entry in the list,  then SHORT/LONG format requests will be reversed.
10780    When the LPD is acting as an intermediate host,  the reversed request
10781    will be sent to the next destination on the list.  For example:
10782      reverse_lpq_format=*.eng.com,130.29.0.0/16
10783    will select hosts whose FQDN ends in eng.com or in subnet 130.29
10784    to have reversed lpq formats.
10785
10786   return_short_status : return limited length status information
10787   short_status_length : number of lines to return
10788
10789    Some users have expressed a desire to have the LPD server return
10790    short (i.e. - limited length) status to the requestor.
10791    The return_short_status=(globhost|ip/mask)+ option allows you to specify
10792    that when a request is received from a host whose name or address matches
10793    an entry in the list,  then only short_status_length (default 3)
10794    Status: and Printer_status: lines returned.
10795
10796   lpc redo command:
10797    this forces a job to be totally reprinted, if it has been held
10798    in the spool queue.  This command has been added in order to allow
10799    the reprinting of jobs that have been printed and held in the spool
10800    queue, i.e. - the save_when_done printcap flag is set.
10801
10802   routing filter 'priority N' output:
10803    the routing filter can set the destination, copies, and now the
10804    priority of jobs.  If the routing filter output is:
10805      dest t1
10806      CB
10807      priority B
10808      copies 2
10809      end
10810    then two copies of the job will be routed to the destination
10811    with priority B, and the C line in the control file will be
10812    set to CB.
10813
10814   safe_chars=nnn  configuration file option.
10815    By default, LPRng detects and optionally eliminates suspicious characters
10816    from the control file;  the fix_bad_job option will enable removal.
10817    The safe_chars=nnn specifies that in addition to the normal safe
10818    characters, the indicated ones can be used as well. For example,
10819    save_chars=#" will allow # and " to be used in the control file.
10820
10821Release LPRng 3-3-6
10822
10823 New functionality:
10824
10825  Timeouts: send_job_rw_timeout, send_query_rw_timeout replace send_timeout
10826
10827    The printcap send_job_rw_timeout and send_query_rw_status options
10828    now set timeouts on read/write operations when printing or sending
10829    jobs to a remote host or doing a status or query operation respectively.
10830    If the value is zero, there is no timeout on the operation.
10831    These timeout values and the associated read/write operations
10832    solve a problem when LPQ or LPR tries to attach to a printer or system
10833    which accepts a connection but then does not reply to the request
10834    in a reasonable amount of time.  Note that the send_job_rw_timeout
10835    should be quite large (6000 or 100 minutes) in order to accommodate
10836    transient problems like paper outages on a printer.
10837    (Suggested by: Brad Rogers <brad@ast.lmco.com> and
10838        Alek Komarnitsky <alek@ast.lmco.com>)
10839
10840  lpc active, lpd, and reread commands
10841    The lpc active command will try to open a connection to the remote
10842    server.  This allows non-LPRng remote servers to be polled to see
10843    if they are active.
10844
10845    All of the active, lpd, and rereads now take a printer[@host] argument,
10846    allowing the specified server for the printer to be queried.
10847    (Deficiency noted by:  James P. Dugal <jpd@usl.edu>)
10848
10849  stop_on_abort printcap flag (default TRUE)
10850    If a filter aborts and this flag is TRUE then all further processing
10851    of the queue stops until restarted by some other action and the job
10852    will not be removed from the queue.
10853
10854  max_connect_interval (default 60)
10855    maximum interval between attempts to send a job to a remote site.
10856
10857  user_lpc configuration option, SERVICE=U, and lpc command
10858    There was a request to allow a selected set of lpc commands
10859    to be performed by users on their individual jobs in a queue.
10860    This has been accommodated using the following method.
10861
10862    1. A new user_lpc=cmd,cmd,... printcap operation enables the
10863       SERVICE=U permissions facility.  The cmd can be:
10864       hold, release, move, topq, kill, and abort.
10865    2. When the lpc command is checked for permissions by the LPD
10866       server,  and the cmd is one of the specified in the user_lpc
10867       printcap,  rejection is delayed until the point where individual
10868       jobs are checked for action.  At this point a check for
10869       SERVICE=U is performed on the permission database.  If,
10870       at this point the action is rejected OR the default action is
10871       to reject,  the action will not be performed.
10872    3. While users can perform a kill or abort operation,  they can
10873       only do this while their job is active or at the top of the queue.
10874
10875Release LPRng 3-3-5
10876  HOWTO and README:
10877   The HOWTO/LPRng-HOWTO has been extensively editted and extended.
10878  This will replace the README.* files in the distribution.
10879
10880  Enhancements:
10881   configuration/printcap flag: force_localhost
10882    force_localhost forces client programs (lpq, lpr, lpc, lprm, etc)
10883    to connect to the server on the local host, as is done on the
10884    BSD LPR system.
10885
10886    This option has an effect ONLY if you use the destination
10887    in the printcap information for the printer.
10888
10889    If you explicitly specify a printer@host as the destination
10890    (-Pprinter@host) then the force_localhost flag is ignored.
10891
10892    The default is force_localhost = TRUE.
10893
10894    Question: why this flag?
10895
10896    Answer: the Most Frequently Asked Question in the LPRng mailing
10897    list is from users asking why lpq/lpr/lprm does not send the
10898    job to the local server, and why they are sending them directly
10899    to the remote printer instead of spooling them.  After having
10900    referenced folks to the documentation multiple times,  I have
10901    thrown in the towel on this one and have put in this flag.
10902
10903    Question: what does this change?
10904    Answer:  If you are running a server on your system,  jobs will be sent
10905    to the server and then spooled.  You may need more spool queue space.
10906
10907    If you want to use the "lpr_bounce" option,  you will need to turn
10908    try_localhost and force_localhost OFF (:try_localhost@:force_localhost@:)
10909    to get the old behaviour and not have the job run through the filters
10910    by both LPR and LPD.
10911
10912    Question: Wouldn't it be easier to ask people to read the documentation?
10913    Answer: No.
10914    I gave up asking.  The LPRng behaviour was too different from the BSD LPD
10915    behaviour and folks who wanted a "rip out and replace" solution were
10916    too frustrated by the different behaviour.
10917
10918   User Requested Status Information:
10919    lpr -mhost%port  now causes LPD to open a UDP (by default)
10920    connection to port on host and send status updates for the job
10921    being processed.  The form host%port,TCP  will open a TCP port
10922    rather than a TCP port.  Users can now use the monitor program
10923    (or a variant) to have job status reporting done.  This has the
10924    side effect that mail addresses of the form host%port will
10925    not get mail sent to them.
10926
10927   Routing Filters:
10928     During job reception,  the :routing_filter: option specifies that the
10929   received job information is to be processed by a routing filter,  which
10930   supplies additional destination information or modifications.
10931     STDIN of the filter is attached to the control file (read/write)
10932   and STDOUT of the filter should be the additional control/routing
10933   information.  Note that routing filters that need to modify the
10934   control file can now do so by using FD 0 and making the modifications
10935   directly to the file.  After processing by the routing filter, the
10936   control file will be re-read by the lpd server, and checked for correctness.
10937   See the HOWTO (/HOWTO/LPRng-HOWTO.html) for more information.
10938     Exit codes for routing filter:
10939      JSUCC (0) - processing continues;
10940      JHOLD     - job will be held
10941      anything else - job will be removed (not accepted for printing)
10942
10943  socket_linger#secs
10944     This option/flag has been added to solve a nasty problem
10945   involving closing network connections and process exit.
10946     When a process exits, the system will attempt to finish IO
10947   operations, flushing pending data to the destination.  However,
10948   It has been observed that when the LPD process which is doing
10949   the actual printing exits, it will sometimes terminate and the
10950   last output is lost.
10951     Experiments have shown that when the SO_LINGER flag is set on these
10952   connections,  the LPD process will not terminate until the last data
10953   has been transferred, which is the desired behavior.
10954     The 'socket_linger#nn' flag can be used to force setting the SO_LINGER
10955   timeout value.  By default,  this is now set to 10 seconds,  which
10956   appears to be compatible with most TCP/IP connections.  Note that the
10957   documentation is very blank on what happens when the connection is still
10958   "active" but no data is being transferred.
10959     If you are having problems with network connections and lost data
10960   at the end of jobs, try using:
10961       :socket_linger#120
10962   in the printcap for the printer.
10963
10964   LPRng executables default to SUID root at installation:
10965       By default, LPRng executables are now installed SUID root.
10966     This will reduce the number of problems encountered by folks who
10967     do not read the README.install instrucutions.
10968     (Noted by: Patrick Powell <papowell@lprng.com>)
10969
10970  :remote_support=RMQVC (default)
10971    R = lpr, M = lprm, Q = lpq, V = verbose lpq, C = lpc : allowed operation
10972    This option specifies the allowed operations to a remote printer.
10973    This solves the problem of printer servers 'hanging on lpq', due
10974    to their inability to handle multiple requests.  Note that the hang
10975    appears to be permanent - i.e. - the printer locks up.  Thus, you
10976    should never do a lprm, lpq, or lpc operation to the printer. The
10977     :remote_support=R: setting will do this.
10978
10979  :rg=group[,group] - allow clients to use printer only if user
10980    is a member of one of the specified groups.
10981    (Requested by: Oved Ben-Aroya <oved@ns.technion.ac.il>)
10982
10983  Bug Fixes:
10984   After a LOOOONG study,  the problem with non-LPRng servers terminating
10985   with 'out of space' error status has been resolved,  and hopefully fixed.
10986   (Noted by: Patrick Powell <papowell@lprng.com>)
10987
10988   Order of variables in sorted list was incorrect.
10989   (Noted by: Patrick Powell <papowell@lprng.com>)
10990
10991   README.pgp_authentication referenced 'client_auth*' names; should be
10992    'user_auth*' names.
10993   (Noted by: Patrick Powell <papowell@lprng.com>)
10994
10995   The print job transfer (LPD/lpd_rcvjob.c) code has been reviewed,  and
10996     the underlying method has been modified to accomodate reception of
10997     multiple jobs in a more consistent manner.
10998     1. On start of job transmission,  a 'lock file' is created.
10999     2. Data and control files are placed in 'temporary files' during transfer.
11000     3. At the end of job transfer,  rename() is used to change temporary
11001        files to permanent ones.
11002     4. The routing filter (if any) is invoked.  Note that the data files
11003        are available for reference during this stage.
11004     5. The control file is renamed to the final version.
11005   (Noted by: Patrick Powell <papowell@lprng.com>)
11006
11007   The plp_waitpid() code has been extensively modified,  together with the
11008     fdfork() code,  the killchildren() support,  and the Print_abort()
11009     code.  Hopefully,  this will now solve the problems of processes
11010     not being terminated and/or zombies accumulating.  This has the
11011     (desirable!) side effect that child exits will not cause system calls
11012     to terminate with EINTR status.
11013   (Noted by: Patrick Powell <papowell@lprng.com>)
11014
11015   By default, LPRng executables are now installed SUID root.
11016     This will reduce the number of problems encountered by folks who
11017   do not read the README.install instrucutions.
11018   (Noted by: Patrick Powell <papowell@lprng.com>)
11019
11020   Race condition with Set_control_info fixed.  Now file locking works
11021     correctly.
11022   (Noted by: Patrick Powell <papowell@lprng.com>)
11023
11024   For HP configurations and no GCC,  added a -Aa flag to CFLAGS
11025     (Suggested by:  Brad Rogers <brad@ast.lmco.com>)
11026
11027   The logger support was flawed somewhat.  Previously, each process
11028     would open a socket (connection) to the logger - this would soon
11029     use up a lot of connections.  Now the LPD server opens a connection
11030     at initialization,  which is then inherited by the various processes.
11031     (Found by: Desmond Macauley <desmondm@eng.dowjones.com>)
11032
11033   By default, LPRng executables are now installed SUID root.
11034     This will reduce the number of problems encountered by folks who
11035   do not read the README.install instrucutions.
11036   (Noted by: Patrick Powell <papowell@lprng.com>)
11037
11038   The SERVER permissions checking did not handle localhost correctly.
11039   (Noted by: Patrick Powell <papowell@lprng.com>)
11040
11041   Passed the PRINTCAP_ENTRY to routing filters and control file filters.
11042    (Patch by: George Lindholm <lindholm@ucs.ubc.ca>)
11043
11044   Only LPD now does killpg() otherwise this effects output from the
11045     lpq, lpc, etc., programs.
11046     (Noted by: Patrick Powell <papowell@lprng.com>)
11047
11048   Jobs were being thrown away with Send_try#0
11049     (Patch by: George Lindholm <lindholm@ucs.ubc.ca>)
11050
11051Release LPRng 3-3-4
11052  Enhancements:
11053    When using routing_filters to cause jobs to be sent to multiple
11054     destinations,  you might want LPQ to report the status of the
11055     destinations as well.  The 'destinations=pr1,pr2,pr3' will now
11056     case LPQ to report the status of destination queues.
11057      (Work, patches, and slugging by: George Lindholm <lindholm@ucs.ubc.ca>)
11058    LPR and LPRM duplicate arguments:
11059      Some users would like LPR's and LPRM's arguments to be 'cumlative', i.e. -
11060        lpr -a x -a y   would be identical to lpr -a
11061      The allow_duplicate_args configuration flag will now enable this behaviour.
11062      Also, by default the class name and the job priority are identical.  The
11063        break_classname_priority_link flag breaks this link, and the class can be
11064        specified separately from the priority.  Also, the maximum classname
11065        size specified by RFC1179 is 32 characters;  the 'classname_length#nnn'
11066        (default 31) allows a longer classname to be used.
11067      (Patches supplied by: George Lindholm <lindholm@ucs.ubc.ca>)
11068
11069  Bug Fixes:
11070    checkpc -p and -c options were not functioning as documented.
11071      (Noted by: Christophe Kalt <kalt@research.bell-labs.com>)
11072    README.bouncequeues indicated that exit status returned by
11073      the control_filter program was used to control job processing.
11074      README and common/fixcontrol.c updated to agree.  When control_
11075      filter exits with: JSUCC (0) - normal processing, JHOLD (37)
11076      job is held, JREMOVE, job removed, etc.
11077      (Noted by:  George Lindholm <lindholm@ucs.ubc.ca>)
11078    Generate_banner did not put banner in correct position.
11079      (Reported by: Jost Krieger <Jost.Krieger@ruhr-uni-bochum.de>)
11080    LPD/lpd_rcvjob.c - control file is now written to a temp file and then
11081      renamed as the control file.  This elminates problems with locks.
11082      (Suggested by:  George Lindholm <lindholm@ucs.ubc.ca>)
11083
11084Release LPRng 3-3-3
11085  Updated the sample lpd.perm, README's to use the 'REMOTEUSER'
11086   rather than USER in the permissions value.
11087   (Spotted by:  Chen Shiyuan <csy@hjc.edu.sg>)
11088  Cleaned up filter and server killing code - added more robust
11089   exit and abort facilities.  This was done in several places
11090   in order to try to make sure that processes created for filters would
11091   be killed off when the server process exited.
11092  Cleaned up logging and some minor error messages.
11093  Removed 'intl/po2tbl.sed' and 'po/POTFILES' from distribution.
11094   (Noted by: George Lindholm <lindholm@ucs.ubc.ca>)
11095
11096Release LPRng 3-3-2
11097  Thu Oct  9 20:03:30 PDT 1997
11098  lpr, lpq,... usage message formats fixed.
11099    (Patches by: Jan Barte <yann@plato.uni-paderborn.de>)
11100  Autohold support was accidentally removed from LPD/lpd_rcvjob.c
11101
11102
11103Release LPRng 3-3-1
11104  New Baseline Tue Oct  7 18:29:55 PDT 1997
11105  Comments:
11106    README.account updated to show how to use psfilter and CTI-hpif
11107    filters and accounting scripts.
11108  Bug Fixes:
11109    Permissions checking patch did not work correctly. Patcher patched
11110     patch to make patchwork code work correctly.
11111    (Originator of patch: Simon Wilkinson <sxw@dcs.ed.ac.uk>)
11112
11113Release LPRng 3-2-12
11114  Bug Fixes:
11115  The sample lpd.conf file had ff=\\f which confused folks.  Now it
11116    has correct syntax.
11117  The end of job and Print_abort code has been clean up and modified
11118    so that exit is now fast and brutal.  When you do LPRM you now GET
11119    LPRM action fast and quick,  and no processes hanging around.
11120  The code for reporting fatal 'filter errors' has been modified to put
11121    the termination conditions into the LPQ status report.  This will
11122    simplify the job of finding out why your job died much easier.
11123  Jobs that now exceed their maximum number of print attempts are deleted
11124    by default instead of being retried indefinately.  This can be be
11125    suppressed by setting retry to 0, as documented.
11126  The above bugs/changes were the result of a long standing report of
11127    the LPD server being slow to respond when printing bad jobs.
11128  (Added by: Patrick Powell <papowell@lprng.com>)
11129
11130Release LPRng 3-2-11
11131  Enhancements:
11132   printcap/configuration 'network_connect_grace#nnn' variable
11133   is similar to the 'connect_grace' variable,  but pauses for
11134   the specified time between connections to LPD or other servers.
11135   Useful when using LPD prototcol to network based printers that
11136   need some recovery time between jobs.
11137   (Suggested by: Christian Illinger <illinger@lepsi.in2p3.fr>)
11138  Bug Fixes:
11139   all:all=p1,p2,p3 did not check correctly for separators.
11140    (Reported by: Bertrand Decouty <Bertrand.Decouty@irisa.fr>)
11141   configure.in - checks for random() defined in stdlib.h
11142    (Suggested by: Bernhard Rosenkraenzer <root@BOL-SubNet.ml.org>)
11143   Logging:  the JOBNUMBER is now reported correctly.
11144    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
11145   LPC move:  the job is deleted from the queue after being moved,
11146    even if save_when_done is set.
11147    (Requested by:  Gary Cender <gcender@eng.dowjones.com>)
11148
11149Release LPRng 3-2-10
11150  Bug Fixes:
11151    In cleaning up the routing support in LPD/lpd_jobs.c and
11152    LPD/lpd_rcv.c,  I cleaned it up so much that only the first
11153    routed job was printed.
11154    (Reported by:  Gary Cender <gcender@eng.dowjones.com>)
11155
11156Release LPRng 3-2-9
11157  Bug Fixes:
11158    Typo in src/common/linksupport.c caused very wierd error messages to be
11159    printed.
11160    (Reported by:  lots and lots of people)
11161
11162
11163Release LPRng 3-2-8
11164  Bug Fixes:
11165   snprintf used instead of plp_snprintf()
11166   (Reported by:  Dirk Wrocklage <dirkw@uni-paderborn.de>
11167     and Helmut Jarausch <jarausch@igpm.rwth-aachen.de>)
11168   Max_servers code did not function correctly - there was a logic error
11169     in the design.  As a result,  it would lock up and refuse incoming
11170     jobs.
11171    (Reported by: Jim Stosick <Jim.Stosick@Forsythe.Stanford.EDU>)
11172   Poll_time:  Under certain very odd conditions,  a spool queue could
11173    have a job in it and the LPD server would not fork a process to
11174    serve the queue.  The poll_time (default 6000 seconds) is a timer
11175    that will scan the print queues for a pending job and no server.
11176    The previous version had a race condition in it that would
11177    periodically spawn too many servers.  The new code not only fixes
11178    this problem,  but also enforces a true idle condition on the
11179    lpd server.  If there is no activity and no jobs,  then the server
11180    will not periodically wake up and check the spool queues.
11181  Force_poll:  Some users have software that places jobs in the
11182    spool queues,  and want LPRng to periodically poll the queues
11183    for these jobs.  The 'force_poll' flag has been added to provide
11184    this functionality.
11185
11186Release LPRng 3-2-7
11187  Major Revisions:
11188
11189  Hold file names and creation:
11190    When the server creates a job in a job queue,  it also creates
11191  a hold file along with the data and control file in the spool
11192  queue directory.  During job processing the hold file is updated
11193  by various processes.  As a result,  this file must be locked
11194  and carefully updated.  The implemented method of locking and
11195  holding locks for jobs was flawed,  resulting in race conditions,
11196  etc.
11197
11198    The routines responsible for reading and writing hold files are
11199  Lock_job_control, Get_job_control and Set_job_control.  These have
11200  been modified as follows.
11201  0. A Lock_job_control() routine now generates and locks a control
11202     file.
11203  1.  The Get_job_control() routine may now open the job file in a LOCKED
11204     or UNLOCKED mode. It will open the file UNLOCKED if not passed
11205     a file descriptor (FD) created by Lock_job_control(),
11206     reads the file and then closes the file if not locked.
11207  2.  The Set_job_control() file now updates the hold file as follows.
11208     a) It creates a temporary file (open, locked).
11209        This file has the name _fAnnn, while the lock file is
11210        cfAnnn.
11211     b) It writes the job file to the temporary file.
11212     c) It RENAMES the temporary file to the hold file.
11213     d) If it has been passed a FD created by Lock_job_control()
11214        it will close the passed FD and return the locked FD;
11215        the effect is to maintain the lock on the control file.
11216     e) if not passed an FD, it simply closes the FD, effectively
11217        releasing the lock.
11218
11219  This functionality guarantees the following:
11220   1. While there might be a race condition in time over a particular
11221      control file,  the Get_job_control() routine will always open
11222      either a 0 length hold file (i.e. - file is in an initial state)
11223      or a VALID COMPLETE non-zero length hold file.
11224   2. Get_job_control() (no lock) will always read correct status information
11225      or NO status information.
11226   3. If a Write operation is needed, Set_job_control() does this correctly
11227     and indivisibly.
11228   4. If a Read/Modify/Write is needed, Get_job_control() is requested to
11229     read and lock the file,  and then Set_job_control is used to modify
11230     the information.
11231
11232   Hold File Name Format:
11233     In order to guarantee that jobs placed into the hold file have unique
11234   job numbers, i.e. - so you can reference them by job number,  the hold
11235   file name format is now hfAnnn.  Note that this means the host name is
11236   now not used.  The Find_unique_job_number() routine will attempt to find
11237   and create a hold file with a unique job number in the queue.
11238
11239   Jobs Placed In Queues Always Get Unique Job Numbers:
11240     In the previous version of LPRng,  when a job was placed in a queue
11241   with an existing job with the same control file name,  the job overwrote
11242   the existing job.  This had some interesting side effects, mostly concerned
11243   with duplicate jobs.  If you have the 'Save Job After Printing' flag
11244   set,  you may run out of job numbers.
11245
11246   Full_time printcap/lpd.conf flag
11247     Specifies that you want to have a full year-mo-dy-hr:... time
11248   format in log and status message.
11249
11250   Binding to random ports
11251     The RFC1179 specifies connections must originate from port 721-731;
11252   most BSD implementations relax this to 512-1023.  There is a problem
11253   when trying to reuse a port and connecting to the same system;
11254   TCP/IP requires about a 10 minute timeout on a IP:port/IP:port pair.
11255   The code that tried to do connections originally tried the ports in
11256   sequential order, leading to long delays.  Now it will try them in
11257   RANDOM order, and will try at most 'connect_try' ports at a time
11258   before admitting failure.
11259
11260  Bug Fixes:
11261    Minor nit with lpc commands fussing about RemotePrinter values.
11262      (Reported and patch by: Martin Pahl <pahl@tnt.uni-hannover.de>)
11263    File descriptors are lost if the remote system that we are trying to send
11264    a job to doesn't like the printer name we are trying to use.
11265      (Reported by: George Lindholm <lindholm@ucs.ubc.ca>)
11266    Permissions checking for PRINTER=host,@netgroup was done incorrectly.
11267      checking now done by match_pr().
11268      (Reported by: Sergio Tessaris <tessaris@ictp.trieste.it>
11269        and Warren Marts <warren@nmt.edu>)
11270    Problems with Get_perms() when rereading the permissions database.
11271      The actual problem was trying to be too tricky and preallocate data
11272      structures.  When this was done incorrectly,  you had some very odd
11273      results when rereading the same database.
11274    LPR: when printing multiple files,  data files were duplicated.
11275      i.e. - dfA..., dfB..., ..., dfZ..., dfA...
11276      Fixed LPR/lpr_cpyjobs.c so that now we have dfA... dfZ, dfa..., dfz
11277      (Reported by: Simon Wilkinson <sxw@dcs.ed.ac.uk>)
11278    User detected a bug where the "-r" option to LPR (LPRng 3.2.6)
11279      actually removes files even if the job was not spooled successfully.
11280      my patch to fix this problem.  Updated LPR man page to reflect the dreaded
11281      -r (remove after printing) option.
11282      (Reported and Fixed by: Garrett D'Amore" <garrett@qualcomm.com>)
11283    Permissions checks for group did not check the group id, just the
11284      user name.
11285      (Reported and Fixed by:  Simon Wilkinson <sxw@dcs.ed.ac.uk>)
11286    Race conditions src/LPD/lpd_jobs.c between printer server
11287      and worker process caused a null pointer reference.
11288      (Reported and Fixed by: George Lindholm <lindholm@ucs.ubc.ca>)
11289    Checkpc did not use correct lockfile format.
11290      (Reported by: Jan Barte <yann@plato.uni-paderborn.de>)
11291    When routing a file,  the route Xnnnn information was not used.
11292      Updated Fix_control to use this information as per documentation.
11293      (Reported by: Patrick Powell <papowell@lprng.com>)
11294    Control file not reparsed after 'control_filter' processing.
11295      It is now reparsed,  and only the new contents are sent
11296      to the destination.  This includes the data files.  The
11297      control file filter MUST remove excess data files.
11298    End of job accounting to a remote server was erroneously expecting
11299      an 'ACCEPT' reply. Fixed.
11300      (Reported by: Markus Fleck <fleck@informatik.uni-bonn.de>)
11301
11302Release LPRng 3-2-6
11303    README.accounting, lpd.8, printcap.5 man pages - accounting file is
11304      documented as not being created.
11305      (Reported by: Christophe Kalt <kalt@research.bell-labs.com>)
11306    LPRM/LPD did not forward remove commands correctly.
11307      (Reported by: Paul Zablosky <zablosky@ucs.ubc.ca>)
11308    Permissions:  PRINTER attribute can now be a netgroup.  This allows
11309      things like:
11310       ACCEPT SERVICE=R,P PRINTER=@PRIP_printers REMOTEGROUP=@PRIP_users
11311       REJECT SERVICE=X,R,P PRINTER=@PRIP_printers
11312      makes management of printers... easier... I suppose.
11313      Updated lpd.perms.5 as well.
11314      (Suggested by: John R Lane <lanejohn@cps.msu.edu>)
11315    Removed mention of "co" flag (obsolete) from lpd.conf man page.
11316      (Reported by Klaus Steinberger <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
11317    HP/UX version 10.x needs to use termiox IOCTL call to set
11318      hardware handshaking on.
11319      (Reported and patches supplied by:
11320        Klaus Steinberger <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
11321    lpc printcap command now only needs STATUS (S) privileges.
11322       New DEFAULTQ protocol message added.  This allows lpc to request
11323       the default queue used by LPD.
11324    fix_bad_job flag now ignores duplicate control lines,  and replaces
11325       bad characters with blanks in control file.
11326
11327Release LPRng 3-2-5
11328    configure:  now checks to see if inet_ntop() is in resolver
11329      library (-lresolv),  and includes it when doing checks for
11330      other functions.
11331    termclear now uses IS_LINUX instead of __linux__
11332      (Reported and fixed by: Horst <horst.fickenscher@it.erlm.siemens.de>)
11333    memory leak fix of 3-2-4 interacted with other code in unexpected
11334      manner - revised memory fix.
11335      (Reported and fixed by:  Patrick Powell <papowell@lprng.com>)
11336    LPD/lpd_status.c - status display line length now controlled by
11337      max_status_line configuration/printcap variable,  which allows
11338      the maximum line length to be exceeded if desired.  Default is
11339      still 79.
11340    src/Makefile.in COMPILATION FLAG: STRICT_RFC1179
11341      default originate_port value is now 512 - 1022,
11342      rather than RFC1179's 721 - 731.  compiling with -DSTRICT_RFC1179
11343      sets the default to 721 - 731.
11344
11345Release LPRng 3-2-4
11346    LPD - pursued and found an extremely minor memory leak that
11347      was exercised only under a very unusual set of conditions.
11348      (Reported and fixed by:  Patrick Powell <papowell@lprng.com>)
11349    Batch of patches and errors: Tom Bertelson <tbert@pamd.cig.mot.com>
11350      include/portable.h - minor changes in SUNOS prototypes
11351      CHECKPC/checkpc_port.c - better check to see if setproctitle worked
11352      PAIR() macro has added guards for _PROTO_ problems
11353      rw_pipe() has a minor portability problem clean up.
11354    LPQ, LPR, LPRM option checks were done incorrectly.
11355      (Reported by: Scott Nelson <nelson@canopus.llnl.gov>)
11356    umask(0177) should really be umask(0077) to allow correct directory
11357      permissions checking.
11358      (Reported and fixed by: Guy Geens <Guy.Geens@elis.rug.ac.be>)
11359    lpd - the lpc reread function sends a signal to the LPD server,
11360      which then calls 'Read_pc' from a signal handler.  This can cause
11361      problems.  In addition, there was a memory leak in the Read_pc()
11362      routine.
11363      (Reported by: Rainer Schoepf <schoepf@uni-mainz.de>)
11364
11365Release LPRng 3-2-3
11366 BUG FIXES:
11367    src/Makefile(Makefile.in), man/Makefile.in did not do 'make install
11368      prefix=/xxxx' operations correctly.
11369      (Reported by: Chris O'Regan <chris@ECE.concordia.CA>)
11370    Get_remote_hostbyaddr() used host_ent when it was undefine/null.
11371      (Reported by: Carson Gaspar <carson@lehman.com>)
11372    Patch for HAVE_SIGLONGJMP did not include common/timeout.c and
11373      include/portable.h.
11374      (Reported and fixed by: Guy Geens <Guy.Geens@elis.rug.ac.be>)
11375
11376Release LPRng 3-2-2
11377 BUG FIXES:
11378    Not freeing memory allocated by Expand_value().
11379    (Reported by: "Todd C. Miller" <Todd.Miller@cs.colorado.edu>)
11380    Added logging for non-job related operations.
11381    Added finer time resolution on job changes
11382      (Requested by: Chao-Wen Young <kiki@eng.dowjones.com>)
11383    Added LPDEST environment variable for  printer as well as PRINTER
11384      and NGPRINTER
11385      (Suggested by: Garrett D'Amore <garrett@qualcomm.com>)
11386    Moved Print_flush() to Print_abort().
11387      (Motivated by: Gerhard Schneider <gs@ilfb.tuwien.ac.at>)
11388    MONITOR/monitor.c had duplicate include references.  This caused some
11389      portability problems with systems that did not have 'guards' in their
11390      include files for multiple inclusion.
11391      (Reported by: John Perkins <john@cs.wisc.edu>)
11392    lpstat format fixes.
11393      (Reported and Fixes: Carson Gaspar <carson@lehman.com>)
11394    common/getqueue() rejects control files with duplicate remove lines -
11395      this is not a big problem,  so added code to ignore them.
11396      (Reported and Fixes: Frank Terhaar-Yonkers <fty@cisco.com>)
11397
11398Release LPRng 3-2-1
11399    Baseline Release
11400
11401Release LPRng 3-1-13
11402    Changed sleep() calls to plp_sleep(), which uses select mechanism,
11403      to avoid interactions with SIGALRM signal handler in Linux.
11404    In the waitchild() code,  the signal(SIGCHLD,SIG_IGN) caused
11405      some systems to automatically perform a 'wait()' on child
11406      processes.  The SIG_DFL only ignored the signal, and the
11407      waitpid() would then succeed.  Note that this action is implied
11408      by the POSIX standard wording for _exit().
11409    The code for job queue scanning will not report 0 length
11410      control files as errors until they are older than an hour.
11411    The LPD/lpq_status() now ignores jobs being transferred,
11412      and does not report their status.
11413    LPD/lpd_rcvjob() now allows multiple jobs to be transferred on a single
11414      connection.  This is a violation of RFC1179 but it is now done.
11415    Expanded \xx entries in Banner line, so that very strange
11416      filters that insisted on these characters would get them.
11417      If a banner line had these characters,  a \n is not appended.
11418    Bounce queue destinations no longer have to be printer@host,
11419      they can just be printer.  The default destination is the
11420      server host.
11421    CHECKPC/checkpc.c - To_root() interferred with Test_code();
11422      reordered code.
11423      (Reported by: Todd Rannow <rannow@msc.edu>)
11424    common/check_remotehost() - added checks for Is_server, moved some
11425      tests into LPD/lpd_status.c, LPD/lpd_remove.c
11426      (Reported by: Damon W Atkins <zdxa21@gascor.vic.gov.au>)
11427    Solaris 2.4 LPD server insists on sending REQ_START messages -
11428      and gets peeved when it gets an error.  Now messages are NOOPs.
11429      (Reported and fix suggested by: Jussi Eloranta <eloranta@voimax.voima.jkl.fi>)
11430    Read_fd_len_timeout() closed fd on timeout - this was not correct behaviour.
11431      (Reported by: Todd Rannow <rannow@msc.edu>)
11432    Clients (LPR, LPQ, LPC) were not expanding printcap %P, %H, etc., entries.
11433      (Reported by: Damon W Atkins <zdxa21@gascor.vic.gov.au>)
11434
11435Release LPRng 3-1-12
11436    Check_remote modifications exposed logic error in various places-
11437      need checks for both RemotePrinter and RemoteHost, not just
11438      RemoteHost.
11439
11440Release LPRng 3-1-11
11441    Missing check for Is_server in Check_remote() caused clients to
11442      not connect to LPD server.
11443
11444Release LPRng 3-1-10
11445    LPR/lpr_cpyfiles() did not handle multiple copies of stdin
11446      correctly.
11447      (Reported and fixed by: Jens Thiel <thielj@uran.informatik.uni-bonn.)
11448    LPR and clients updated hold files.  Added checks for Is_server in the
11449      appropriate places.
11450      (Reported by: Lee Muh Hwa <cceleemh@dolphin.cc.nus.sg>)
11451    Problem with bad printer name detection.
11452      (Reported and fixed by: Martin Pahl <pahl@tnt.uni-hannover.de>)
11453    setstatus() was not sending STATUS information to the logger.
11454      (Reported by: Chao-Wen Young <kiki@eng.dowjones.com>)
11455    Bad non-existent printer,  printcap file misconfiguration code.
11456      (Reported and fixed by: Dirk Nitschke <ms3a512@math.uni-hamburg.de>)
11457    Documentation and man page editting - minor corrections, missing entries.
11458      (Comments and patches by: Florian La Roche <florian@knorke.saar.de>)
11459
11460Release LPRng 3-1-9
11461    lpq -v format modified so Destination was printed correctly.
11462    Remove_job() did not remove all the data files or hold files.
11463    dofork() did not zero Tempfile->pathlen.
11464    LPR/lpr_cpyfiles() did not preallocate the job file array,
11465      leading to problems when realloc() was called.
11466    printcap(5) and lpd.conf(5) man page cleanup.
11467      (Done by: Florian La Roche <florian@knorke.saar.de>)
11468
11469Release LPRng 3-1-8
11470    Print_job() did not use correct queue name.
11471    Man Pages did not get right version number.
11472    force_queuename not in printcap(5) man page.
11473      (Reported by: Guy Geens <guy.geens@elis.rug.ac.be>)
11474    In LPC, Queue_name is not NULL when getprinter() is called.
11475      (Reported by: Jussi Eloranta <eloranta@voimax.voima.jkl.fi>)
11476    The filter environment variable PRINTCAP_ENTRY now holds the
11477      printcap entry for the printer.  In conflict with some filters
11478      using PRINTCAP to hold the pathname of the /etc/printcap file.
11479      (Reported by: Guy Geens <guy.geens@elis.rug.ac.be>)
11480    waitchild() had an alternate wait3 implementation that turns
11481      out to be broken on some systems.  Force use of the waitpid()
11482      version.
11483
11484Release LPRng 3-1-7
11485  New Functionality: poll_time configuration variable
11486    There is a small, but almost impossible to eliminate, race condition
11487    when a job is put into a busy queue.  If the server process checks to
11488    see if there is work to be done, and the job is put into the queue
11489    after that point,  then there is a possiblity that the server may
11490    exit with a job in the queue.  This can be solved by using semaphores,
11491    locks, etc., but is almost impossible to do in a portable and efficient
11492    manner. The 'poll_time#nnn' configuration entry has been added to
11493    allow the administrator to specify an interval at which the queues
11494    can be periodically checked for unprinted jobs.
11495    The default poll_time value is 6000, i.e. - 10 minutes.
11496
11497  Bug Fixes:
11498    printcap.5 documents :mi: (spool directory space needed) as number
11499      but it is a string.  Fixed documentation.
11500      (Reported by: Jeff Bacon <bacon@twinight.org>)
11501    Install.txt, Install.ps - lp=host%port misdocumented.
11502      (Reported by: Jeff Bacon <bacon@twinight.org>)
11503    printjob.c - check to see if there is a filter; if not, shove
11504      file directly out.
11505      (Reported by: Guy Geens <guy@abacus.elis.rug.ac.be>)
11506    src/Makefile - SUID_ROOT_PERMS= 04755 -oroot should be -o root
11507      (Reported by: Dave Goldhammer <Dave.Goldhammer@Colorado.EDU>)
11508    POSIX uses LOGNAME environment variable - check this first, then
11509      USER for user information.
11510      (Suggested by: Todd C. Miller <Todd.Miller@cs.colorado.edu>)
11511    lpc now allows printer@host specification.
11512      (Reported by: Doug White <dwhite@gdi.uoregon.edu>)
11513    printer queue loop detection algorithm modified
11514      The code to detect print queue loops was too agressive, and gave
11515      false warnings about print queue loops. Now only checks for explicit
11516      loops.
11517      (Reported by: Yuji Shinozaki <yuji@cs.duke.edu>)
11518    Start_all() code did not check for a limit on the number of processes
11519      that would be started by the server.
11520
11521Release LPRng 3-1-6
11522  Bug Fixes:
11523    The :direct_read: flag now works for bounce queues.  Tested with aps
11524      filter.  The aps filter distribution of globals/GLOBALS.sh has been
11525      modified to have defaults for various options that allows even a
11526      (possibly) misconfigured filter to produce some sort of output
11527      instead of dying with a strange error message.
11528    setstatus() was not putting \n on end of lines, but only when used
11529      on Solaris 4.1.4 with Sun's ACC compiler.  Compiler bug.  Rather
11530      than fix the compiler,  we (hopefully) modify the code.
11531      (Reported by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
11532    LPSTAT simulation:
11533      Progress reporting too coarse.
11534      lpstat -s too verbose.
11535      lp now reports 'request id is ....'
11536      (Reported by: David Livingstone <davidl@scdes.cn.ca>)
11537
11538Release LPRng 3-1-5
11539
11540  New Functionality: PCNFSD compatibility
11541    PCNFSD - Public Domain version,  from Geoff Arnold (Geoff.Arnold@Sun.COM,
11542      geoff@East.Sun.COM).  Assumes that LPC will return list of
11543      printers,  indented one space.  (Fixed).
11544      Added README.pcnfsd as a guideline for users.
11545    LPRM now says 'dequeueing' (yech!) instead of 'removing' to make it
11546      consistent with lprm and PCNFSD implementations.
11547    PCNFSD distribution put into LPRng collection.
11548
11549  Bug Fixes:
11550    cleanup() was causing early exits due to use of killpg();
11551      commands such as lpq |more would not work correctly.
11552      Fix was to suppress top level process from killing itself.
11553    autoconf bizzarness - src/Makefile.in now has ${prefix} entries
11554      to match the INSTALL documentation.  You can now do
11555      make prefix=xxx and software will be installed in xxx/bin
11556      Default directories made to conform with existing LPRng ones,
11557      not Linux/GNU ones.
11558    LPD/lpd_jobs: when a job is aborted, the return status is
11559      clobbered.  Now it is not clobbered.
11560
11561
11562Release LPRng 3-1-4
11563
11564  New Functionality - :oh: entry does globmatch on FQDN host name.
11565    The :oh=*val*: entry can now be used to do matching on the
11566    FQDN host name.  This allows such things as defining classes
11567    of printers, i.e.:
11568      lp:oh=*lab1*:lp=pr1@server
11569      lp:oh=*lab2*:lp=pr2@server
11570    (Inspired by: Nathan Neulinger <nneul@umr.edu>)
11571
11572  Bug Fixes:
11573    Debugging stuff added to Is_printable();  LPR/lpr.c and company had
11574      the control file generation fixed up so that lpr -K worked correctly
11575      when taking input from stdin; also when using it with lpr_bounce.
11576      (Reported by: Andrew Leahy <A.Leahy@st.nepean.uws.edu.au>)
11577    autoconf Version 2-12 has a bug and was not generating configuration
11578      files correctly;  fixed this and now the --exec_prefix option
11579      appears to work correctly.  To regenerate configure from configure.in,
11580      the following acgeneral.m4 file lines must be changed:
11581          .... original .....
11582          test "x$prefix" = xNONE && prefix=$ac_default_prefix
11583          # Let make expand exec_prefix.
11584          test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11585
11586          .... correct ......
11587          test "x$prefix" = xNONE && prefix=$ac_default_prefix
11588          # Let make expand exec_prefix.
11589          test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
11590    Permissions checking in Is_printable() was erroneous.
11591      (Reported by: Dirk Nitschke <ms3a512@math.uni-hamburg.de>)
11592    Find_non_colliding_job_number() did not check to see if job priority
11593      was available, and was generating bogus hold file names.  This only
11594      occurs when data files are sent first.
11595
11596Release LPRng 3-1-3
11597
11598  New Functionality - Kerberos authentication uses encryption
11599     Send encrypted and authenticated information by default.
11600       (Greateful thanks to: Ken Hornstein <kenh@cmf.nrl.navy.mil>)
11601
11602  Bug Fixes:
11603    Fix_str(): missing null pointer check
11604      (Reported by: Christian Kuehnke" <Christian.Kuehnke@arbi.Informatik.Uni-Oldenburg.DE>)
11605
11606
11607
11608Release LPRng 3-1-2
11609
11610  New Functionality - glob matches for printer names:
11611
11612    At USENIX97,  somebody mentioned that they wanted to have a 'wildcard'
11613    entry that would allow them to 'trap' all sorts of printers, and then
11614    do formatting based on the printer name.  I puzzled over this, until
11615    I realized that the combination of the :qq: (put queue name in job)
11616    and a wildcard match would do exactly what this person wanted.
11617    The more I thought about it,  more functionality seemed to be
11618    provided by this - you could match various arcane printer names
11619    against patterns, etc.
11620
11621    Now when a job arrives and the LPD server is searching for the queue
11622    name, the search is done using a glob match.  Note that you
11623    cannot have a primary printer name with a GLOB character,  but it
11624    is allowed to have an alias with one. For example:
11625
11626        pr1|pr*|all printers which start with pr
11627            :lp=pr1@host
11628            :qq
11629        pr2|*|wildcard match
11630            :lp=pr2@host
11631            :qq
11632
11633  New Functionality - munging control files:
11634
11635    There is now a 'control_filter' option that will cause the control
11636    file to be passed through a filter.  This takes place only when a job
11637    is transferred to a remote printer.  It was intended to be used by
11638    bounce queues whose destination required extremely whacko formats
11639    for their control files.  See README.bouncequeues for details.
11640
11641  New Functionality - generating banner pages for remote printers:
11642    The :generate_banner: printcap option will now generate a banner
11643    page for remote print jobs and/or when using LPR and :lpr_bounce:
11644    is set.  The banner is generated by the banner printer specified
11645    by :bp: or the default banner printer.  If the :hl: (header or
11646    banner last) flag is set, it will be the last part of the job printed.
11647
11648  New Functionality - spreading job numbers to avoid collisions:
11649
11650    Some users have been encountering job number collisions when using the
11651    routing facility and making multiple copies.  The "spread_jobs" printcap
11652    and configuration variable now allows you to spread out job numbers
11653    by the indicated factor.  The job number is based on the process id;
11654        jobnumber = processid * spread_jobs;
11655    Under heavy use,  this value should be set to the expected maximum
11656    number of jobs copies that will be made.
11657
11658  Fixes and Extensions:
11659    fixcontrol.c - badly formatted DEBUG message.
11660        (Reported by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
11661    configure - cray-unicos is now just unicos in the system targets.
11662       In addition, HAVE_SYS_SIGLIST botches have been fixed.
11663    fix_create_dir() segment faulted
11664        (Reported by: Reinhard Zierke <zierke@informatik.uni-hamburg.de>)
11665    LINUX has undocumented (and in my opinion broken) gethostbyname()
11666        and gethostbyaddr() interactions.  The code that does lookup
11667        now performs extremely picky checks, copies, etc., to avoid
11668        problems with this.
11669        (Reported by: just about every LINUX user...)
11670    Makefile: install was missing a value.
11671        (Reported by: Doug White <dwhite@gdi.uoregon.edu>)
11672    :bk: (Backwards compatible) now forces short job names and
11673        short job numbers as well.
11674    LPC - lpq command now takes the last printer specified as its default.
11675        (Suggested by: Jeff Bacon <bacon@twinight.org>)
11676    IRIX and UNICOS compilation mods.
11677        (Suggested by: Paul Burry <rpburry@magi.com>)
11678    Aborted LPR caused 0 length files to be left in spool directory
11679    Multiple copies and routing interact
11680        (Andrew Leahy <A.Leahy@st.nepean.uws.edu.au>)
11681    config.sub now recognizes i686 as a proper machine type.
11682        (Reported by: Michel Robitaille <robitail@IRO.UMontreal.CA>)
11683
11684Release LPRng 3-1-1
11685
11686  New Functionality:
11687
11688    Support for client to server and server to server authentication.
11689    See README.authentication and lpd(8) man page, as well as
11690    README.pgp_authentication.  Currently, pgp is supported for
11691    client to server and server to server authentication; Kerberos
11692    is supported for client to server authentication.
11693
11694    Printcap entries can contain the following:
11695       %a  - architecture
11696       %H  - fully qualified domain name of host
11697       %h  - shost host name
11698       %P  - printer (when in printcap entry)
11699       %R  - remote printer (when in printcap entry)
11700       %M  - remote host (when in printcap entry)
11701    This is the same as for the configuration information.  Note
11702    that these keys are marked by %; keys marked with $ such as $P
11703    are expanded only when used by filters.  Currently only the
11704    :sd: (spool directory),  :server_user:,  and :remote_user: (for
11705    authentication) are expanded.
11706
11707    Support for lp(1) simulation (Solaris SystemV R4) print facilities
11708    now built in.  This is done by checking the name that the program
11709    is invoked with:
11710      lpr invoked as lp - simulates lp operation
11711      lpq invoked as lpstat - simulates lpstat operation
11712      lprm invoked as cancel - simulates cancel operation
11713    Note that this is not full functionality,  but it will provide
11714    a usable interface for programs that need lp, lpstat, and clean.
11715
11716    man pages updated and rewritten to reflect latest changes.
11717
11718    IPV6 awareness is being planned for.  The permissions checking is
11719    now done assuming that information returned by gethostbyname()
11720    and/or gethostbyaddr() may be for IPV6.  Host names checking
11721    is done not only on the cannonical (main) host name, but also
11722    for aliases;  the IFIP permissions check has been added to allow
11723    access to the IP address reported by the accept() system call
11724    that reported a connection.  See README.lpd.perms for details.
11725
11726    A new printcap flag, :direct_write: now passes a file descriptor
11727    to print filters.  This is backwards compatible with the old BSD
11728    filters,  but you lose the ability to monitor the printing
11729    process.  In addition,  you are stuck with 'send_timeout'
11730    seconds for printing a job,  which may not be suitable if a job
11731    hangs up on a printer.
11732
11733    Makefiles compatible with the BSD make are now provided;  these
11734    are generated from the basic Makefiles using a simple conversion
11735    script.  Of course, the Makefiles were redone in order to make this
11736    feasible...
11737
11738    LPR now can do filtering if the :lpr_bounce: flag is set.
11739
11740  LPR Protocol Extensions:
11741
11742    REQ_SECURE: an authenticated transfer of job and control information.
11743     See the details in the README.authenticate and lpd.8 man page.
11744
11745    REQ_VERBOSE: provides a hideously detailed set of information about
11746     the print queues and their status.  This is of interest to persons
11747     who are trying to provide tracking for jobs and other information
11748     and need more than the status provided by the high level LPQ
11749     dumps.  The LPQ -v format now will generate this.
11750
11751  LPQ and Status Generation
11752     LPQ now prints each queue status once.  In addition,  when getting
11753     status, LPD makes a valiant effort to avoid forking and creating
11754     processes.  This makes things much more easy on the system load.
11755
11756  Source Code Reorganization:
11757    A major source code reorganization was done in order to support
11758    configuration management tools in a more effective way.
11759
11760  System configuration and printcap initialization is now done by
11761    the values in the lpd.conf file,  which can contain printcap
11762    flags as well as configuration information.  This allows
11763    defaults to be set in a much simpler manner.
11764
11765  Beta Testers:
11766    Pseudo Anonymous, <pseudo@erehwon.org>
11767    Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>
11768    Dirk Nitschke <nitschke@math.uni-hamburg.de>
11769    Paul Burry <rpburry@magi.com>
11770    Thierry.Besancon@lps.ens.fr (Thierry BESANCON)
11771
11772  Fixes and Extensions:
11773    configure and Makefile support for CRAY (by Paul Burry <rpburry@magi.com>)
11774    using the lpc class facilities now prevents held class jobs from being
11775      printed.
11776      (Reported by: Chao-Wen Young <kiki@eng.dowjones.com>)
11777    gethostbyname() has a possible problem.  Added checks for
11778      parameters.
11779      (Reported by: Jens Thiel <thielj@uran.informatik.uni-bonn.de>)
11780    printcap '@' operator did not set clear entries.
11781      (Reported by: Park Jae-hyon <jhpark@entropy.kaist.ac.kr>)
11782    filter error code 'JFAIL' now causes job removal.
11783      (Reported by: Norman R. McBride <N.R.McBride@city.ac.uk)
11784    SAMEUSER permission check was not working correctly.
11785      (Reported by: Carsten Benecke <benecke@informatik.uni-hamburg.de>)
11786    LPD now checks for the number of servers it has active;  Max_servers_active
11787      configuration variable sets this.  In addition,  uses the getrlimit()
11788      to determine real value if available.  This should throttle back
11789      problems when a lot of LPR connections are being made and the server
11790      proceeds to die or lose jobs.
11791    getconnection() now tries to open a connection with different
11792      originating ports.  This solves a problem with some systems that
11793      did not like LPRng originating connections from the same reserved
11794      ports.  Users encountering this difficulty might have to use
11795      a wider port range;  this can be done now by modifying the printcap
11796      entry for the printer.
11797    checkpc now has Is_server set to 1, so it should do the full
11798      server compatibility checks.
11799    Queuename not being set correctly.
11800      (Reported by: Thierry.Besancon <Thierry.Besancon@lps.ens.fr>)
11801    LPC now calls 'lpq' via a bombproofed system() call
11802      (Suggested by Paul Burry <rpburry@magi.com>).
11803    LPR now generates correct job names for more than 26 files.
11804      (Reported by: Guy Geens <ggeens@elis.rug.ac.be>)
11805
11806Release LPRng 2-4-3
11807  New Functionality:
11808    Printcap Files
11809      The printcap reading and configuration file reading code
11810      now supports the following:
11811      1. you can have multiple :tc=name: references.
11812      2. printcap entries whose main name starts with a punctuation character
11813          is not used as a printer.  However,  it can be referenced by
11814          :tc=: entries.  For example,  the following shows how to
11815          use this facility.
11816
11817      @filter:if=/bin/whatever:of=/bin/whatever
11818      @banner:sh:sb
11819      @spool:sd=/var/spool/%P
11820      p1:tc=@filter:tc=@banner:@spool
11821
11822      In addition,  the following printcap entries have %P (printer),
11823      %h (short host name), and %H (Fully qualfied domain name of
11824      host) replaced by the current values before jobs are processed;
11825      other values are ignored and replaced by which space.  A %% is
11826      replaced by a single '%'.  The variables which are expanded are
11827      controlled by the flags value of the src/printcap.c/Pc_var_list[]
11828      array;  currently the following are expanded:
11829        :sd=: (spool directory)
11830    Device Locking:
11831      This code was originally put in place for systems where you might
11832      have multiple people trying to use a printing device.  The 'lk'
11833      flag now controls if you want to lock the IO device.  Default
11834      is no locking.
11835
11836  Portability Fixes:
11837    Quicksort is not a stable sorting algorithm - if two entries are
11838    identical, then their position can be reversed.  The order of entries
11839    is important and needs to be preserved when reading information,
11840    so mergesort() is now used.
11841
11842    The organization of the include files was causing problems with
11843    testing packages.  There is now one include file for each major
11844    functional component.  Global variables are now in a single file,
11845    and are the same for all packages.  The difference in size of
11846    the executables was minor.
11847
11848  Bug Fixes:
11849    Printcap reading code: now handles forward references correctly.
11850     (Reported by:
11851       Klaus Steinberger <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
11852    Ruthless purging of metacharacters passed to filters.  This includes
11853      quotes, backslashes,  and all other even vaugely funny characters.
11854      (Reported by:Bertrand Decouty-INRIA Rennes-France
11855        <Bertrand.Decouty@irisa.fr>)
11856
11857Release LPRng 2-4-2
11858    Missing REMOTEGROUP check in permissions.c
11859      (Reported: Michel Robitaille <robitail@IRO.UMontreal.CA>)
11860    configure.in: Added more robust check for undefined functions
11861      on various systems,  added checks in source code for various
11862      variants: termclear.c, gethostinfo.c
11863      (Reported by: Doug White <dwhite@gdi.uoregon.edu>,
11864        Sven Rudolph <sr1@inf.tu-dresden.de>)
11865    LPQ: status line now too long, truncated it to 79 chars.
11866    LPD: time of day format changed to YY/MM/DD/HH:MM:SS
11867    LPC: autohold and noautohold command changed to 'holdall'
11868      and 'noholdall';  LPQ: autohold and holdall status reporting
11869      added.
11870    lockfile.c: Added #if !defined(LOCKDEV) code to not do locking
11871      on serial devices.
11872      (Reported by: bennett@nomolog.nagoya-u.ac.jp (Bennett))
11873    Printcap printer names: primary printer names starting with
11874      punctuation are now treated as simply entries and not valid names.
11875      This means that they can be referenced as tc=@name, i.e.
11876        @name:if=/whatever
11877        prname:tc=@name
11878    Multiple Server Queues: ss/sv code reworked again - got rid of several
11879      race conditions,  lost files.
11880    Routing filters: added code to handle dropped jobs better.
11881
11882Release LPRng 2-4-1
11883  minor problems with Makefiles, portability fixes.
11884   (Reported by: Michel Robitaille <robitail@IRO.UMontreal.CA>)
11885  malloclist.c error message format wrong.
11886   (Reported by: Jens Thiel <thielj@uran.informatik.uni-bonn.de>)
11887
11888Release LPRng 2-3-14
11889  New Functionality:
11890    Jobs are now sorted by priority.
11891      (Reported by: syl@ecmwf.int (Lennart Sorth))
11892    LPC CLASS option added.  Classes of jobs can now be held and/or
11893      released.  lpc class printer A,B,C would release jobs with
11894      classes A,B,C; lpc class printer J=*form1*  would release jobs
11895      whose job name contained the form1 string.
11896      (Requested by: garyc@eng.dowjones.com (Gary Cender))
11897    Printcap and Configuration :send_failure_action:
11898      when a job fails to be printed or transferred, it is automatically
11899      retried :rt: (:send_try: or configuration send_try) times. A 0
11900      :rt: means infinite retries.  It may be desirable under various
11901      circumstances to have a method of dynmaically deciding if an error
11902      threshold is exceeded or some other action is needed.  The
11903      :send_failure_action: printcap and/or configuration variable specifies
11904      the default action when :rt: is exceeded.  It can have the following
11905      form:
11906        1. The string "success", "abort", "retry", "ignore", "hold"
11907           which will cause the job/spooler to treat as successful,
11908           abort, retry, ignore, or hold the job respectively.
11909        2. A filter of the form: |/filtername.  The filter is executed
11910           with the default set of filter options,  and the number of attempts
11911           is printed to its standard input.  It can print error messages
11912           to standard error, which are placed in the spool error log.
11913           The exit codes JSUCC (0), JFAIL (1 or 32), JABORT (2 or 33),
11914           and JREMOVE (3 or 34), JIGNORE (5 or 36), etc. will force
11915           removal as if successful, retry, etc. as for the text form.
11916    README.nis: new script for creating NIS (YP) databases.
11917      (Contributed by: Sven Rudolph <sr1@inf.tu-dresden.de>)
11918    LPF: modified the -T option, added -D (debug level option)
11919      (Contributed by: Sven Rudolph <sr1@inf.tu-dresden.de>)
11920    LPD cannot be started from inetd.  This functionality
11921      puts a very heavy load on the system and trying to make
11922      it function correctly was very difficult.
11923    Makefile: PREFIX variable defined, to allow overriding default
11924      prefix value.
11925      (Suggested by: Sven Rudolph <sr1@inf.tu-dresden.de>)
11926  Major Fixes:
11927    File Locking:
11928      The code for dealing with file locking and job name collision was not
11929      sufficient to handle the case where multiple jobs were being submitted
11930      simultaneously.  The new code uses the hold file for locking jobs,
11931      in addition to locking the control file.  When a job is submitted via
11932      LPR or forwarding,  the hold file is created, written with the
11933      receiving process PID,  and is then released.  When other processes
11934      try to submit a job,  they will lock the hold file, check for the running
11935      process, and then try anther job if the process is still delivering
11936      the job files.  When all of the job files are delivered,  the process
11937      will then write the hold file with -1, i.e. - a signal that all files
11938      have been delivered.  If a job is submitted by other means, i.e.-
11939      copied directly to the spool directory,  there is no guarantee that
11940      collisions can be avoided.  Note that sometimes hold files will
11941      be left in the spool queue, but these can be clean up periodically
11942      by using checkpc for example.
11943  Bug Fixes and/or Deficiencies:
11944    Added Hold_all variable that is controlled by LPC command -
11945      :ah: printcap entry cannot be overridden now.
11946      (Reported by: garyc@eng.dowjones.com (Gary Cender))
11947    LPD/lpd_control.c: STOP was killing off server;  now it prevents
11948      next job from being started.
11949    common/printjob.c/Fix_string() - missing check for 0 length string.
11950      (Zygo Blaxell <zblaxell@myrus.com>)
11951    Printing filter exit codes 1->5 are translated to JFAIL->JABORT
11952      This makes vintage filters compatible with LPRng.
11953    Find_key() can return a 0 value under extreme circumstances - 0 check
11954      added. (Reported by: Ron Roskens <roskens@cs.umn.edu>)
11955    lpr -l or lpr -b did not get IF filter invoked with -c option.
11956      (Reported by:Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
11957    trailers are not sent to printers; caused by premature close of output.
11958      (Reported and Fix by: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>)
11959    permissions checking once again has a problem - if no match is found
11960      incorrect use of defaults.
11961      (Reported by: QingLong <qinglong@Bolizm.ihep.su>)
11962    LPQ: queue status not reported correctly.  Caused by a memory leak,
11963      and also incorrect buffer length specified to allocation routine.
11964      (Reported by: Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
11965
11966Release LPRng 2-3-13
11967    Linux has inconsistent ncurses (curses.h) and termlib (termlib.h)
11968     definitions for tgetent().  Use only one.
11969      (Reported by Elliot Lee <sopwith@cuc.edu>)
11970    The 'printed 10% of 1000 bytes" message gets scambled when
11971      processed by other systems where the % is interpreted as a
11972      format character by printf.  Changed to 'percent' instead.
11973      (From: Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
11974
11975Release LPRng 2-3-12
11976    waitchild.c does not enable the SIGCHLD signal.  This was causing
11977      problems when a child would die during a read/write operation and
11978      interrupt the read/write operation.
11979    checkpc - now checks to see if the LPD lockfile directory exists,
11980      and creates it if necessary.
11981    getopt.c - strdup() changed.
11982      (Reported by  Brad Greer <brad@cac.washington.edu>)
11983    src/Makefile.in - LOCK_DEV_CFLAGS -> LOCK_DEVS_CFLAGS
11984      (Reported by Klaus Guntermann
11985        <guntermann@iti.informatik.th-darmstadt.de>)
11986    LPD, lpr -p and :pr: filtering.  Documentation claims that LPD will
11987      filter 'p' format jobs through :pr: filter and :if: filter.  It was
11988      not doing it,  and now does.  However, when using a bounce queue,
11989      it will not filter :pr: formats unless a :pf: filter is present.
11990      (Reported by Scott Sutherland <scott@math.sunysb.edu>)
11991    :translate_format: printcap variable, and functionality added for
11992      bounce queues.  A bounce queue can now also modify the job file format
11993      using the :translate_format: printcap entry. For example,
11994      :translate_format=mfpl: would change m to f and p to l format
11995      job files.
11996
11997Release LPRng 2-3-11
11998    MAJOR ADDITIONAL FUNCTIONALITY:
11999    Logger: filter error output is now written to the logger as well as
12000      status information.
12001
12002    lpr -p and LPD: the pr filter support was not updated.  It now invokes the
12003      traditional 'pr' program correctly.
12004      (Reported by: K.D. Meyer" <meyer@uni-trier.de)
12005    LPD/lpd_control.c - reporting duplicate status line information.
12006      (Carl Hilton <chilton@dns2.sac.usace.army.mil>)
12007    LPR: exits with a nonzero error when 0 length job or invalid queue.
12008      (Paul Haldane)
12009    lpbanner.1 and lpraccnt.1 man pages created.
12010      (Carl Hilton <chilton@dns2.sac.usace.army.mil>)
12011    lpq -Pall - sendstatus() returned wrong status.
12012
12013Release LPRng 2-3-10
12014    MAJOR ADDITIONAL FUNCTIONALITY:
12015    routing to multiple destinations, multiple copies, via a bounce queue
12016        A bounce queue can now route jobs to multiple destinations
12017        and/or make multiple copies of a job.  This action is controlled
12018        by the printcap/configuration variable router=filter.
12019        See README.routing and the LPD.8 manual page for details.
12020
12021    Identifiers:
12022        The 'A' control file line is now used to store a 'unique' job
12023            identifier.  This follows a job through the system, and is
12024            used to identify a job.  It can also be used in LPRM and
12025            LPC messages.
12026        The :use_identifier: printcap and configuration variable controls
12027        the addition of this information to the control file.
12028    Job ID Wildcards:
12029        LPRM, LPC now take wildcard entries as well use job numbers and
12030        user IDs for jobs. (Updated LPRM, LPC man pages).
12031    Logger:
12032        Added code to record the actions of jobs passing through the
12033        system.  SetStatus messages now sent to a logger process as
12034        well as recorded in a status file. Added:
12035        printcap/configuration:
12036            logger_destination = host[%port][,(TCP|UDP)]
12037                host%port is destination host%port combination.
12038        configuration:
12039            default_logger_port = 560  - default port for logging
12040            default_logger_protocol = UPD  - default protocol for logging
12041
12042    lpd_rcvjob.c - error message has a missing '%s' entry.
12043        (Brad Greer <brad@cac.washington.edu>)
12044    Link_read() in link_support.c - minor error - zero length read
12045      reported as error, not EOF condition.
12046    lpd: multiple copies (lpr -K option) were causing malformed job control
12047      files to be generated by LPD when it checked them.  Off by one problem
12048      with pointers fixed.
12049      (Reported by: Andrew Leahy <A.Leahy@st.nepean.uws.edu.au>,
12050        details of problem by Dirk Wrocklage <dirkw@uni-paderborn.de>)
12051    cleanup() - exited with erroneous error code when NOT sent a signal.
12052      (Reported by Ed Santiago <esm@lanl.gov>
12053        and Sven Rudolph <sr1@os.inf.tu-dresden.de>)
12054    HOST and REMOTEHOST permissions now can be netgroups, i.e. -
12055      HOST=@netgroup or REMOTEHOST=@netgroup will check to see
12056      if a host in in the netgroup.
12057    permissions.c - Mods by Geoff Ballinger <geoff@chemeng.ed.ac.uk>
12058      These modifications fixed a problem with checking for user
12059      permissions,  and now the permissions 'user' or 'remoteuser'
12060      is checked according to documentation.
12061    REMOTEUSER, REMOTEGROUP added to permissions checking.  Permissions
12062      checking now done in much more rigorous way.
12063    LPD/lpd_rcvjob.c - fixed up hold file removal on bad job submission.
12064    Setup_waitchild() - moved to Initialize(), done for all programs
12065
12066
12067Release LPRng 2-3-9
12068    killchild.c - minor bug on cleanup.  If cleanup called with 0
12069      argument, never killed off children.  Under very rare circumstances,
12070      this resulted in a OF filter process hanging up,  and never exiting.
12071    LPR: the -s option is now silently ignored.
12072      (Jon E. Ferguson" <jon@media.mit.edu>)
12073    ULTRIX has a sys/syslog.h and a syslog.h file, need to use sys/syslog.h
12074      (Per Foreby <perf@efd.lth.se>)
12075    Accounting Filters: the :as: (accounting start) filter returning JREMOVE
12076      did not cause the job to be removed. Fixed.
12077      (Reported by Panos Dimakopoulos <dimakop@cti.gr>)
12078
12079Release LPRng 2-3-8
12080    lpr_makejob.c - not handling -w and -0 (font options) correctly.
12081      (Reported by Jens Thiel <thielj@athene.informatik.uni-bonn.de>)
12082    Comments in sendjob.c updated to reflect reality.
12083      (George Lindholm <lindholm@ucs.ubc.ca>)
12084
12085Release LPRng 2-3-7
12086    lpd.conf default file - updated example configuration values
12087    Documentation miswordings, downright errors, and missing information
12088      corrections and comments added.
12089      (Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
12090    struct fd_set declarations changed to fd_set to make it compatible
12091      with POSIX.
12092      (Reported by Alan Shutko <ats@shep1.wustl.edu>)
12093    use_shorthost flag not working - fixed.
12094      (Bertrand Decouty-INRIA Rennes-France <Bertrand.Decouty@irisa.fr>)
12095    setup_filter.c - %h in an option string is now expanded to the short
12096      form of the host name.
12097    ROOT perms for filters - added the ROOT_PERMS_TO_FILTER_SECURITY_LOOPHOLE
12098      definition to the src/Makefile, modified common/setup_filter.c.
12099      Added comments to man/lpd.8. Comments by Patrick Powell, mods by
12100      (Jens Thiel <thielj@uran.informatik.uni-bonn.de>)
12101
12102Release LPRng 2-3-6
12103    LPR/lpd_rcvjob.c - snprint() replaced by plp_snprintf()
12104    src/common/defaults.c - erroneous LD_LIBRARY_PATH= and PATH= values in
12105      configuration variables.
12106      (Reported by Jens Thiel <thielj@athene.informatik.uni-bonn.de>)
12107
12108 LPRng 2-3-5
12109    printcap.c - when lpd-perms array gets longer than 40kB or so,
12110      lpd crashes with an segmentation fault when it's getting started.
12111      fixed by: Dirk Wrocklage <dirkw@uni-paderborn.de>
12112    permissions.c, globmatch.c - updated error reporting, and added
12113      check for user's default group when checking GROUP permissions.
12114      (Stefan Monnier" <stefan.monnier@lia.di.epfl.ch> and
12115      Ron Roskens <roskens@cs.umn.edu>) Also, changed strcmp to strcasecmp
12116      to make comparisons case insensitive.
12117    LPD/lpd_control.c - modified error message to better indicate failure.
12118
12119    long job numbers - lpd_rcvjobs.c, cleantext.c, lpr_makejob.c, printcap.c
12120      added the capability to have long (6 digit) job numbers.  This is done
12121      by reformatting the job control file and the job file names.
12122      printcap :longnumber: and configuration longnumber=yes enables this.
12123      Note that :bk: (Backwards compatibility) overrides long numbers.
12124      If a queue is marked :bk: then it will attempt to shorten long numbers
12125      to produce a short number file.  This can be used with a bounce queue
12126      to produce files compatible with the older vintage systems.
12127      As a side effect, tightened up format checking of unlink entries,
12128      and other issues reported by the following folks.
12129      (Lennart.Sorth@ecmwf.int, Desmond Macauley <desmondm@eng.dowjones.com>)
12130
12131    lprm - fixed the removal algorithm so that multiple tags select multiple
12132      jobs.  i.e. - lprm 1 2 3 removes jobs with numbers 1, 2, and 3.
12133      If you do lprm user, all jobs with the tag 'user' are deleted.
12134      This allows much easier job purging,  which is usually why you
12135      are using lprm...
12136
12137    use_info_cache flag - printcap.c(Free_pc()) routine brutally wipes
12138      out all data now.  This will either force the reread or crash the
12139      process.
12140      (reported by Dirk Wrocklage <dirkw@uni-paderborn.de>)
12141
12142    configuration variables: added default_format, default_priority
12143      to configuration as well as printcap variables. lpd.conf.5 and
12144      printcap.5 man pages have been updated.  Apparently they were never
12145      documented in man pages.
12146      (reported by Stefan Monnier <stefan.monnier@lia.di.epfl.ch>)
12147
12148    common/sendjob.c:  error reporting for DATAFILE was incorrect.
12149      (reported Brad Greer <brad@cac.washington.edu>)
12150
12151    :send_data_first: printcap and configuration variable added.
12152      causes data files to be sent to the destination first, before
12153      control files.  (Supports horrible spoolers that violates RFC1179)
12154      (suggested Brad Greer <brad@cac.washington.edu>)
12155
12156    :connect_grace#nn: printcap and configuration variable added.
12157      Klaus Steingerger reports that some printers require a grace
12158      period between connection attempts.  This variable provides
12159      a suitable delay.  Also, the Clear_timeout() routine now
12160      restores the ORIGINAL signal handler.  This means you can
12161      only have one timeout pending at a time - which makes sense
12162      in this implementation.
12163      (reported and mods by Klaus Steinberger
12164       <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
12165
12166    globmatch.c - a bug with checking for upper and lower case chars.
12167      (reported by Per Foreby <perf@efd.lth.se>)
12168
12169Release LPRng 2-3-4
12170    typos in the documentation - fixed
12171
12172Release LPRng 2-3-3
12173    getcfng.c - "use_info_cache" entry out of order.
12174     (Alan F Lundin <aflundi@sandia.gov>)
12175
12176Release LPRng 2-3-3
12177    LPR and :qq: printcap entry,  use_queuename configuration information
12178    Added 'use_queuename = no' to the common/default.c file - the
12179    use_queuename will force control files to have the 'Qqueuename' entry
12180    placed into them.  The :bk: (backwards compatible) entry can be used
12181    to override this when sending to non-LPRng systems.  When receiving
12182    a job and use_queuename is TRUE,  then LPD will add the name of the
12183    spool queue to the control file.
12184
12185Release LPRng 2-3-2
12186    common/defaults.c - removed :xt: from the printcap defaults.
12187    common/getcnfinfo.c - added "true", "all", "false" keywords for flags.
12188    common/termclear.c - for LINUX, added include <termios.h>
12189      (Avery Earle <ae@play.psych.mun.ca>)
12190
12191Release LPRng 2-3-1
12192    printcap.5 :xt: entry updated
12193    bk, qq, and bounce queue filter interaction: printjob.c modified to
12194        add Queuename information for filters if :qq: option or Q entry
12195        in job file.
12196
12197Release LPRng 2-3-0
12198    Minor rewording on printcap.5 man page.
12199    common/termclear.c - defined(solaris) changed to defined(SOLARIS)
12200        (Andrew Richards <physajr@phys.canterbury.ac.nz>)
12201    common/printcap.c, CHECKPC/checkpc.c - subtle bug when reading
12202        printcap information from a filter AND the 'oh=host' specified
12203        AND the host is not the current host.  Fixed.  In addition,
12204        checkpc will not create queue entries for queues not used/defined
12205        on the current host.
12206        (Dirk Wrocklage <dirkw@uni-paderborn.de>)
12207
12208Release LPRng 2-2-9
12209    printcap.c - malformatted printcap entries ending with a \
12210    at the end of the file are now accepted.
12211
12212Release LPRng 2-2-8
12213    LPR now uses a reasonable size buffer when copying files.
12214
12215Release LPRng 2-2-7
12216    lpq:  back to the previous format!
12217      lpq -s - does the very short format
12218      lpq    - prints short form of detailed information
12219      lpq -llll... - each l doubles status information
12220    lpq.1 - man page updated.
12221    printcap, lpd.conf: send_failure_action - added a 'hold'
12222      keyword that will hold the job on error rather than deleting it.
12223      updated printcap.5, lpd.conf.5 man pages
12224    lpd_jobs.c - added checks for filter non-zero status exit.
12225    configure.in - printf("%s",sys_siglist[0]) added
12226      (<harlan.stenn@pfcs.com>)
12227
12228Release LPRng 2-2-7
12229    lpq:  by default, a very very short format-  pr@host:(status stuff) NN jobs
12230        lpq -l  -  short, verbose format
12231        lpq -l -l or lpq -ll - longer format
12232    lprm: was not removing all jobs when 'lprm all' specified.
12233    lpr.1 man page: priority of jobs is A (highest) to Z (lowest)
12234
12235Release LPRng 2-2-6
12236    lpr: -K option did not have ':' in getopt options string.
12237      (Klaus Steinberger <Klaus.Steinberger@Physik.Uni-Muenchen.DE>)
12238    lpr: -# has been readded, in spite of my better judgement, to be
12239        compatible with antique LPR systems.
12240    lpd: 'sending job to...' message error
12241      (Dwaine C. Gonyier <virtual@panthra.catt.ncsu.edu>)
12242    printcap.c, getcnfginfo.c - ordering of parameters not alphabetical.
12243      (Ron Roskens <roskens@cs.umn.edu>)
12244    lpr, configuration - check_for_nonprintable code got mushed,  fixed
12245      now; the :xt: (check text) printcap flag added as well. man page fixed.
12246      (Ole Benner <olb@kom.auc.dk>)
12247    configure.in- library check fixed, added additional library check
12248      (Harlan.Stenn@pfcs.com)
12249    lpc - the 'lpc lpd xx' operation set the current printer to xx. Fixed.
12250      (Jos Backus <jos@oce.nl>)
12251
12252Release LPRng 2-2-5
12253    ** changed the bqfilter flag to bq=destination_queue
12254        This now forces all input to be passed through the filter.
12255        Changes in the bq filter information as well.
12256    Bounce_filter: removes temporary bounce queue file on exit unless
12257        debugging is high level.  bounce queue file name is bfAnnnHost,
12258        i.e.- has same format as a job file.  This makes job related
12259        processing easier to debug.
12260    lpc - Updated queue status display
12261      lpc status now shows autohold status
12262      lpc noautohold now restarts printer on 'NOAUTOHOLD' command
12263    lprm with no options removes first removable job in queue
12264      This is compatible with BSD lprm functionality
12265    configure - GCC version checks moved to start of configuration
12266        added checks for sys/utsname.h, utsname.h
12267    common/gethostinfo.c - uses sys/utsname.h
12268        configure.in has check added for utsname.h
12269    lpd - printjob now checks for exit status of filters - should
12270        terminate now if filter has bad exit status.
12271        (Note: this may not be bombproof in all situations.)
12272    printcap and configuration - connect_retry was defined as connect_try
12273        documentation fixed as well.
12274    CHECKPC- checkpc -r -A nD now removes all job related files older than
12275          n Days.  This can be put into crontab and run periodically.
12276    printcap :ah: (autohold) now operational.  Note that LPC will
12277        override printcap default.  lpc status now indicates if autohold
12278        is on.
12279
12280Release LPRng 2-2-4
12281    :bk: (backwards compatible) flag now causes removal of non-BSD compatible
12282        control file entries as well as modifying the order.
12283    :qq: (Queuename in control file) flag is now  overridden by :bk: flag.
12284        This will now generate Berkeley compatible job files.
12285    lpr - improved 'connnection failed' message format.
12286    accounting_server and accounting_check added for accounting.
12287        printcap.5, README.accounting,  and other documentation updated.
12288
12289Release LPRng 2-2-3
12290    Once more the portability/bugfix Gods need yet another sacrifice.
12291        BSDI V2.1 setreuid() returns erroneous error codes - setuid.c
12292        fixed yet again...  I suspect other BSD derivatives to have same
12293        problem.  Sigh...
12294    cleanup() now unblocks signals before exiting.
12295    Print_open() - better status messages on open failure.
12296
12297Release LPRng 2-2-2
12298    TESTSUPPORT: removed lpf generation
12299    Perms_check(): missing ntohl(HostIP), needed for host order of addresses.
12300    Lock_fd(): - saves errno error codes and returns them correctly
12301    Prefix_line in malloclist(): - copy now done in correct order
12302        fixes print queue bug.
12303    Accounting Filters:
12304        1. the filter command is not passed as an argument to the accounting
12305           filter.  This solves some problems with shell script filters,
12306           as the last filter command would have the form:
12307             filter -H... -a|filter |filter
12308        2. Accounting information now logged at start and end of job.
12309    GROUP Permissions: permissions.c now checks to see if a specified
12310        group exists first, using getgrnam(), then tries wildcard
12311        search next.
12312    Permissions: IP=host/netmask format updated- allow /n to be n bit mask
12313        i.e. - 130.191.163.12/16 -> 130.191.163.12/255.255.0.0
12314
12315Release LPRng 2-2-1
12316    LPF filter: added source code to the LPRng main distribution.
12317        This provides a passthrough filter for most applications.
12318    README.printcap: updated to reflect use of lpf filter and
12319        banner printing
12320    LPRM/LPD: lpd restarts printing if the active job is removed.
12321    LPQ: more robust handling of bad printcap entries
12322    LPD: attempt to solve problems of filters which print to
12323        serial devices hanging because the device has pending
12324        output, has been sent a ^Q to stop output,  and has not
12325        received a ^S to restart.  Uses tcflush() to flush serial devices.
12326    LPR: added a 'use_shorthost' configuration and printcap variable
12327        to force the use of short host names for print job control and data
12328        files.  The code was present in LPR,  but not enabled.
12329        Update lpd.conf.5 and printcap.5 man pages.
12330    Debugging Flags: added keyword and flag capability.  For example:
12331        -Dthis,that@  can be used to set the 'this' flag and clear the
12332        that flag.  see common/parsedebug.c for details.
12333    NGPRINTER environment variable added. Used to override PRINTER environment
12334        variable.  Allows one format for PLP/LPR/Solaris, one for LPRng.
12335        (marty leisner@sdsp.mc.xerox.com)
12336    LPC: command of form 'status printer@host' was not formatted correctly.
12337        (Jarrod Douglas <jarrod@cs.curtin.edu.au>)
12338    man/printcat.5 - added a functional listing as well as alphabetical.
12339        (Sherwood Botsford <sherwood@space.ualberta.ca>)
12340    LPD, LPQ: added termination error messages to status output.
12341        Details for job failure now available.
12342    printcap :qq: and lpr -Q option now fully operational.
12343         lpr -Q or :qq: printcap field sets Qqueuename in job file;
12344         lpd bounce queue will add Qqueuename line to the control file.
12345
12346Release LPRng 2-2-0
12347    Updated README files.
12348        README.1st     - overview
12349        README.install - much more complete
12350        README.lpd.conf - explains lpd.conf
12351        README.lpd.perms - lpd permissions structure listed
12352    man/lpr.1 - missing -k information added.
12353    man/lprm.1 - fixed typos
12354    man/lpd.perms.5 - lpd.conf documented
12355    DOC/Tutorial - added additional information
12356    DOC/Install - extended to include more testing and installation
12357        details.
12358    strdup() changed to plp_strdup() to avoid problems with C library.
12359    configure.in - check for sys_siglist[] improved.
12360    src/commmon/decodestatus.c - fixed problem with Solaris 2.5
12361        and sys_siglist[]
12362    Makefile - added default target to install default lpd.conf and
12363        lpd.perms files;  prototype files added as well.
12364    man/lpd.conf.5 man page added
12365    src/common/permission.c: added a SERVER key, to allow restriction
12366        to users on the server.
12367    checkpc - truncation now done on log, accounting, and status files.
12368    LP_SIMULATION - SVR4 simulation with lp.sh and lpstat.pl scripts
12369
12370Release LPRng 2-1-3
12371    waitchild.c - race condition with malloc() in the SIGCHLD handler
12372      would result in rare, very very rare problems.  Data structures
12373      are now pre-allocated.
12374    LPD/lpd_jobs.c - WIFSTOPPED and WIFSIGNAL checks done improperly.
12375      Shows up in OSF1 based systems.  The test is now done correctly.
12376    AIX portability - added sys/select.h to include list
12377    LPQ status display modified to be consistent-
12378      Filter status:  -> Filter_status:
12379      Now all the comment and information lines have a : at the end
12380      of the first field.  This makes parsing by perl/awk, etc. simple
12381      Note that the Rank Owner ... line still does not have a colon
12382    joost@cadlab.de - minor fixes for Apollo DN4500 and portability
12383      TESTSUPPORT/Makefile.in, as well as minor fixes in portable.h
12384
12385
12386Release LPRng 2-1-2
12387    STATVFS typeo corrected in in configure.in, portable.h, freespace.c
12388      (curt@ltpmail.gsfc.nasa.gov (Curt Tilmes))
12389    Missing VARARGS declaration for setstatus() in lp.h
12390      (Marc Baudoin <Marc.Baudoin@hsc.fr.net>)
12391    Makefile.in (in general) - fixed realclean mostlyclean targets
12392      (Paul Eggert <eggert@twinsun.com>)
12393    setproctitle() - check made in configure, and if not present
12394      the proctitle.c code is used. (Marc Baudoin <Marc.Baudoin@hsc.fr.net>)
12395    Makefiles - realclean and distclean targets did not remove Makefile
12396        (Paul Eggert <eggert@twinsun.com>)
12397    Missing read permissions on various files
12398        (Paul Eggert <eggert@twinsun.com>)
12399    configure.in (CFLAGS): Use a more accurate test to decide
12400      whether we are using GCC version 2.4.5 or earlier.  The old
12401      test didn't handle GCC snapshots correctly.
12402      (Paul Eggert <eggert@twinsun.com>)
12403
12404
12405Release LPRng 2-1-1
12406    CHECKPC- added test for the printcap 'ps' - printer status file
12407      - fixed up test for printer device, now ignores remote and filters
12408      - added 'checkpc -s' option to not create/check printer status file
12409    common/sendjob.c - Bounce Queue Filters are only invoked by the server;
12410        added a check for Interactive and printcap :bqfilter: flag BOTH
12411        set before invoking filter.  This prevents clients from invoking
12412        filters.
12413
12414Release LPRng 2-1-0
12415    Added 'rs' (time between spool queue rescans) printcap entry
12416    Added 'oh' (option for host) printcap entry
12417    Added check for NULL printcap pointers.  Printcap files entirely
12418        consisting of comments and empty lines are now handled
12419        correctly.
12420    Added ntohl() and htonl() calls to fix IP addresses for permissions
12421        checking.  This showed up on X86 systems.
12422
12423Release LPRng 2-0-9
12424    Patch to make sigsetjmp() work correctly on Solaris.  Sigh...
12425
12426Release LPRng 2-0-8
12427    Solaris 2.5 requires sigsetjmp() and siglongjmp() for alarms and
12428        timeouts to work reliably.  Note that GCC now does not put out
12429        warnings about 'variables may not be restored after longjmp'
12430        C'est la vie, c`est le guerre...
12431    Documented getting permission database with a filters, allowing
12432        dynamic checking of a database.
12433
12434
12435Release LPRng 2-0-7
12436    Fixed up the setuid() code yet again - portablility issues on
12437        BSDI and FreeBSD - need to do a setuid() operation first.
12438
12439Release LPRng 2-0-6
12440    Removed default non-blocking open() operations;
12441        added printcap 'nb' (Nonblocking_open) variable to allow
12442        nonblocking open for specific devices
12443    Updated man pages and DOC files to reflect new open() capabilities
12444
12445Release LPRng 2-0-5
12446    getuserinfo() was not using the original RUID value.
12447    Fixed device locking again,  this time to do a fallback to
12448        fcntl() based locking if TIOCEXCL is not functioning
12449    Removed MFLAGS from Makefiles, also put in cleaner test for GNU Make
12450    The sleep() implementation on linux is defective; replaced
12451        by a plp_sleep() using select().
12452
12453Release LPRng 2-0-4
12454    src/cleantext.c - Check_format() was too strict in checking
12455        hostnames - now allow '-' as well as . and _ in name.
12456    configure.in - SGI IRIX configuration needs SVR4 definition forced.
12457    added more specifics for solaris
12458
12459Release LPRng 2-0-3
12460    - mostly portability fixes
12461    man/Makefile.in - removed $(FILES) targets
12462        did updates in a 'sane' manner
12463    Fixed missing declarations of functions for fussy compilers.
12464    Fixed CHECKPC/checkpc_port.c - SunOS4.1.4 has two versions of
12465        stty - /bin/stty and /usr/5bin/stty
12466        forced use of /bin/stty
12467    configure.in - added gcc version check,  fixed up CFLAGS
12468    HPUX portability kludges -
12469        1. O_NDELAY and O_NONBLOCK interact - removed one of them
12470        2. Need to use fcntl() after open to fix the non-blocking
12471            read operation.
12472    device locking now works on Solaris 5.4
12473    checkpc- added a couple of sanity check functions for internal
12474        tables - Check_pc_list() and Check_config_list()
12475        discovered a couple of entries in wrong order (bp was one)
12476        that prevented use of banner printing.
12477
12478Release LPRng 2-0-2
12479    Modified configure to use config.guess; fixed config.guess as well.
12480        - config.guess did not recognized BSDI systems,  and exited
12481            with an error.
12482    Fixed configure.in to force library order if necessary.
12483    Ripped out several SVR4 dependencies; src/killchild.c
12484    Filters + Bounce Queues - added filtering capability
12485     printcap variables - bqfilter (flag)
12486     If a bounce queue (one that sends files to a remote printer/host)
12487     has filters speicified, and the :pqfilter: printcap flag is set,
12488     the data files will be passed through a filter,  if there is a
12489     filter for that format.  Updated printcap.5, lpd.8 documentation,
12490     as well as DOC/Intro.
12491
12492Release LPRng 2-0-1
12493    configure.in -
12494        WARNING ** gcc version 2.4.5 and below
12495        The -O option produces erroneous code several places.
12496        configure.in has been modified to remove the -O option.
12497    configure.in - added explicit check for elf.h - now defines
12498        SVR4 if the file is present (see autoconf documentation
12499        for test).  Compatibilty check.  Updated CFLAGS with define
12500        for HPUX and uses the @CFLAGS@ edit in Makefiles.  This
12501        solves a problem when configure sets CFLAGS and the
12502        default GNU Make .o.c rule set needs to be used.
12503    LPRM: If a user has LPC CONTROL permissions, he can now remove
12504        jobs from a queue.
12505    Makefile.in, Makefile - Added various GNU compatible targets
12506        such as clean, dist, reallyclean, etc.
12507    Fixed the man/Makefile to better update the man pages when
12508        installing them.
12509    checkpc -T line : fixed up the STTY reporting to be more robust
12510        should work with SVR4 better.
12511    LPR: added locale initialization; printable checks now use
12512        8 bit characters if the locale has been enabled.
12513    O_NONBLOCK|O_NBLOCK - these both must be set on a SVR4 system to
12514        do a non-blocking open.  This might be considered a documentation
12515        feature in some circles.
12516    FreeBSD defines: various files have had #ifdefs for FreeBSD added.
12517    Accounting: modified the default accounting string to add the
12518        control file name;  allowed the accounting filter to exit
12519        with error status and write an error message.
12520
12521Release LPRng 2-0-0
12522    Baseline Release Version
12523
12524Release LPRng 1-2-6
12525    PERMISSIONS: permissions checking was defective- correct values now
12526     used.
12527    LPC: usage message updated
12528    Error reporting: connection permission errors reported to connecting
12529     system now.
12530    LPR: now reports server error msgs to user on STDERR.
12531
12532Release LPRng 1-2-5
12533    PERMISSIONS: lpc operations split, 'C' are control, 'S' are status
12534     this allows 'lpc status' command to be used by non-privileged users
12535     Updated documentation to reflect this change as well.
12536    Updated lpq, lpc, lprm -V option to be less verbose
12537     by default;  -V -V will show copyright information.
12538     ("Marty Leisner" <leisner@sdsp.mc.xerox.com>)
12539    Control file format: allowed first 'N' line to appear before
12540     data file information, and stuck in middle of control file.
12541     This makes it compatible with other LPR implementations.  Sigh.
12542    If a filter is not available,  this is logged in status and the
12543     job is discarded.  This prevents a job with bad format information
12544     locking up the printer queue.
12545    Filter program lookup in printcap entry has been fixed to be a little
12546     more effective.
12547    Fixed checkpc and setproctitle() to work with FreeBSD
12548     (Richard Letts  R.J.Letts@salford.ac.uk University of Salford)
12549
12550Release LPRng 1-2-4
12551    Harlan Stenn <Harlan.Stenn@pfcs.com>
12552    termclear.c - there is an interesting problem with termcap.h, curses.h,
12553      terminfo.h.  On some systems you do not want to include curses.h,
12554      but not terminfo.h and termcap.h.  I recommend putting guards in the
12555      terminfo.h include file so you can include it multiple times without
12556      redefinition problems.
12557    curt@ltpmail.gsfc.nasa.gov (Curt Tilmes)
12558      - removed O_NDELAY from various open statements
12559    Makefile.in - removed ${SRC}/src, etc. to allow compilation
12560      in separate directories.
12561
12562Release LPRng 1-2-3
12563    Fixed lprm -a flag;  documentation error as well
12564    common/jobcontrol.c - erroneous error field update
12565    miscellaneous errors reported by users.
12566    SVR4 - added sys/systeminfo.h, sysinfo() call replace gethostinfo()
12567    printcap - added 'qq' (save queue name in job file)
12568
12569Release LPRng 1-2-2
12570    This sounds ridiculous,  but there is yet ANOTHER problem with
12571    implementing portable file locking.  It turns out that some systems
12572    allow file locking only if the files are opened R/W, no APPEND.
12573    This is only a problem in pr_support.c;  the permutations and
12574    combinations of files, devices, etc., are too much to deal with
12575    algorithmically.  An new printcap flag 'lk' (lock LP device) is
12576    introduced to handle this.  By default, no file or device locking
12577    is done.
12578
12579Release LPRng 1-2-1
12580    Martin Forssen: maf@dtek.chalmers.se or maf@math.chalmers.se
12581     - fixed an erroneous test in checkremote.c - missing data
12582     initialization in LPD/lpd_jobs.c, LPD/lpd_status.c
12583     - common/getqueue.c off by one error - LPD/lpd_remove.c - cfpp
12584     uninitialized in Get_queue_remove()
12585    hagberg@mail.med.cornell.edu (Eric Hagberg) A/UX portability
12586     fixes in portable.h Fixed lpr, lprm MAN pages;  fixed usage
12587    messages.  Added CONTROL permission checking for LPRM operation;
12588    i.e. - if you have CONTROL permission you also can remove files.
12589
12590Release LPRng 1-2-0
12591    Documentation - DOC/Intro and DOC/Install
12592    Filters: CTI-ifhp-1.1.1 lp-pipe-1.0.0  lp-support-1.0.0 psfilter-1.0.2
12593    Fixed a minor bug in LPD/lpd.c - geteuid() missing
12594
12595
12596Release LPRng 1-1-2
12597
12598    Documentation (Introduction, and Installation) added
12599    psfilter-1.0.1 added to FILTERS
12600    Added test for signal.h to configure.in.
12601    reported by Martin Forssen <maf@math.chalmers.se>
12602      fixed missing bounds check in common/printcap.c,  put install-sh in
12603      directories needed (autoconf does not fix up $(INSTALL) correctly)
12604      lookup loop for remote hosts in common/checkremote.c
12605      Link_listened(void) missing in include/lp.h
12606
12607Release LPRng 1-1-1
12608
12609    Added lp,lpsched, lp-pipes support
12610    Fixed a bug in the job renumbering code in lpd_rcvjob.c; always started
12611    with 0, instead of next job in sequence.
12612    Fixed a bug in lpd_rcvjob.c, additional 0 ACKS being sent.
12613    Fixed a bug with the filter options;  added $0, $-, $'
12614    Fixed the default filter parameter list - accounting file at end
12615
12616Release LPRng 1-1-0
12617
12618    Cleaned up all sorts of minor problems with duplicate variables
12619        being declared in two places.
12620    Hopefully cleaned up the problems with Errormsg() not getting
12621     sys_nerr; sigh.
12622    Fixed accounting. Again. Sigh.
12623    Added (fixed) support for host%port
12624    Added install/test documentation.
12625
12626    Added even more portability tests to checkpc. - device locking,
12627        stty, file locking.
12628
12629Release LPRng 1Alpha9
12630
12631    Accounting has been added.
12632
12633    Fixed up a very very very rare problem with file locking by
12634    redoing some tests.
12635
12636    Added the checkpc -T serial_line option
12637    This performs a whole series of portability tests, all of which
12638    need to pass.
12639
12640    Include file problems strick again: fixed up the right set.
12641
12642Release LPRng 1Alpha8
12643
12644    Sun Aug  6 11:07:51 PDT 1995 Patrick Powell
12645
12646    Renamed files with pathnames greater than 14 chars to shorter ones;
12647    Antique file systems strike again.
12648
12649    Added 'form' and 'hold queue' capability; modified the control and
12650    job files; Renamed the release name to be consistent with GNU standards.
12651    Fixed problem with compatibility between SUN and other systems.
12652    Added LPR -Q flag, LPR -k flag to make it work.
12653
12654    Sun Jul 30 09:09:49 PDT 1995 Patrick Powell
12655
12656    Discovered some problems with the job printing code in LPD/lpd_jobs.c,
12657    re-editted it and put in some stronger checks.
12658
12659    Modified the spool control file format slightly.
12660    This did not work as well as I thought it would in the overall design;
12661    now the spool control file can have any number of different types
12662    of entries for future expansion, i.e.
12663    printing_disabled   1
12664    redirect            printer@host
12665
12666    Several rather silly coding errors in various places that turned up
12667    when a code checkout program was run: if/then not being executed,
12668    etc. etc.
12669
12670    Fixed up the configure.in file to use the old dnl, socket, etc. libraries.
12671
12672    man/Makefile and src/Makefile modified to use INCLUDE=.. so that configure
12673    can be run from another directory.  This is very very strange autoconf
12674    dependency,  but who cares, as long as it works.
12675
12676    Fixed up a whole minor mess of writes and timeout interactions.  Who would
12677    have guessed at this interaction?  Created a couple of utility functions
12678    (Write_fd_str(), Write_fd_len()),  and timeout (Set_timeout(), Clear_timeout())
12679    routines.  These assume that writes will be done with timeouts;  all places
12680    where writes are done have been surrounded by Set_timeout, Clear_timeout.
12681
12682Release LPRng 1Alpha7
12683Mon Jul 24 09:29:15 PDT 1995 Patrick Powell
12684
12685    Changed the Makefile 'TARGET' name to avoid conflicts with other
12686    Makefiles... sigh...
12687
12688    In link_support.c/Link_send(),  the original code was using
12689    several writes to send a line;  this has been modified to use
12690    a single write where possible.  Apparently some implementations
12691    of LPD code expect the command lines to be sent as a single
12692    TCP write operation, and do not look for the \n terminator.
12693
12694    Removed the 'lorder/tsort' from Makefile, and hardcoded the
12695    library file order.  This provides a simple form of portability,
12696    but will require updates to the Makefile if a new library file
12697    is added.
12698
12699    Added better tests for sys_errlist and sys_siglist definitions.
12700
12701    Moved all of the configuration information to the root level;
12702    this fixes a bug with the autoconf code that cannot handle
12703    more than one level of directory structure.  You can now
12704    compile the LPRng software in another directory by using:
12705    cd LPRng.<version>; SRC=`pwd`; \
12706    cp configure $DEST; cd $DEST; configure --srcdir=$SRC; \
12707    make all
12708
12709    Modified the top level Makefile to use the GNU Make -C directory
12710    capability.
12711
12712    Fixed Send_job() to make it more robust in the face of protocol
12713    errors.  The numbers of times a job is retried is set by the
12714    Connection_retry value.
12715
12716    Modified the LPC status reporting to make it clearer.
12717    Removed a redundant error message.
12718
12719Release LPRng 1Alpha6
12720Thu Jul 20 19:23:03 PDT 1995 Patrick Powell
12721
12722    Reorganized the auto configuration code so that it is at the top
12723    level of the distribution.  Added top level MAKEFILE with directory
12724    recursion.
12725
12726    Separated out default printcap and configuration initialization,
12727    put them in src/default.c
12728
12729    Fixed up some minor 'lint' level errors.
12730
12731    Update man pages.  Fix up installation so that VERSION information
12732      is put in the MAN page source.
12733    Editted MAN pages heavily in light of comments from people.
12734
12735    Clean up some code in printcap.h, printcap.c, lp_config.h, getconfig.c
12736
12737    Fixed a missing check for null string with STRCMP in src/getqueue.c.
12738    Considered using safestrcmp() for this reason; checked most places;
12739    safe or appear to be safe.
12740
12741    Modified the format for LPQ status information,  added more detail
12742    about the printer status.
12743
12744    Added -Pprinter option to LPD to simply start and run a spool queue
12745    server.  This allows debugging of filters much easier.
12746
12747    Added bk-of-filter-options and bk-filter-options to provide compatibility
12748    with old style filters.
12749
12750    Fixed up a lot of minor portability issues with Solaris2.4, using the
12751    SUN Soft C compiler.  Fixed fumble in gethostinfo.c - will die if
12752    it cannot find the local host name; this is very bad and should be
12753    immediately fatal instead of dying later.
12754
12755    Fixup the the TESTSUPPORT/Makefile to be a little more intelligent.
12756    Also, put in guards to make sure that you have GNU Make.  This appears
12757    to be essential for sanity reasons alone.
12758
12759Release LPRng 1Alpha5
12760Mon Jul 17 10:57:49 PDT 1995 Patrick Powell
12761
12762    ********* BSDI *************
12763    Literally hundreds of questionable items were reviewed, fixed
12764    or modified.  The 'snprintf' function was renamed to 'plp_snprintf'
12765