-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCHANGES
6980 lines (5948 loc) · 320 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This file documents the history of the original LPRng from Patrick Powell.
While this version of lprng was originally based uppon 3.8.28, most of the
changes in 3.8.32 are included. (3.8.29, 3.8.30 and 3.8.31 were never
publically released up to the time of this writing to all of my knowledge,
so things may be attributed to .32 that were actually earlier in other parts
of the documentation). Things documented here but not included in this version
is the support as CUPS-backend server and the corresponding PDEs for that
and changes to the build or install scripts (as those are replaced anyway).
Additional changes not done by Patrick Powell can be found in the ChangeLog
and NEWS files.
Version LPRng-3.8.32 - Thu Sep 6 15:07:19 PDT 2007
added: discard_zero_length_jobs flag
zero length jobs are now discarded rather than trying
to be printed. However, sometimes zero length jobs are
actually MEANT to be printed as the various filters will
expand the zero length job into content. This is the way
to put the name of a file you want printed from an archive
into an option line/flag and then have the back end print
it. Ugly, but it works.
Version LPRng-3.8.31 - Fri Feb 16 17:33:35 PST 2007
postinstall.freebsd: /etc/rc.conf is not truncated
Version LPRng-3.8.30 - Thu Sep 21 11:53:39 PDT 2006
Fixed: If job was forwarded to queue, or redirected to queue, then queue
would not start printing.
Fixed: If job with multiple copies (lpr -Kxxx) was forwarded to queue or redirected to queue,
then forwarded then only a single file copy was printed.
Fixed: If the 'router' or 'chooser' was used, then only 1 copy of file was sent
to destination queue, and job may unexpected die.
Version LPRng-3.8.29 - Fri Jan 28 11:05:58 PST 2005
ATHENTICATION: added k5conn (kerberos 5) method.
This is identical to the kerberos method, but does not do encrypted data transfer.
BUG FIXES:
The authentication information is now saved in the control file.
The status of incoming jobs is now displayed with the LPQ command. Unfortunately,
the incoming job size is displayed as 0 until the entire job file arrives.
The file locking strategy has been modified once more, due to dealing with problems
of HUGE incoming jobs that would cause all the LPD/LPRM/... facilities to lock.
This required the 'Get_hold_file_info' and 'Set_hold_file_info' usage to change.
- job reception: the hold file is created and then modified when all
of the job files have been received.
- job deletion - you can remove an incoming job. The incoming process
is killed as well. If you have 'multiple retries' enabled for job transfer,
then the job will be sent again. Such is life.
- job printing - the job file remains locked until the 'lpd' server
decides what to do with it. This is usually a VERY short period,
but if a process needs to be run to determine the destination of the
job, it may remain locked until the process has completed.
Apple OS-X - LPR+kerberos as backend for CUPS server
Added support for the using LPR+kerberos authentication with CUPS
backend on Apple OS X. See the README.kprPDE file for the gory details.
Basically, OS-X has a 'Printer Driver' set up that specifies the capabilties
of a printer as well as the 'driver' or 'transport program' which will handle
the transfer of the print job to the remote printer. If compiled with the
correct flags, when lpr is invoked as 'klpr', it will assume that it is
being used by OS-X as a 'transport program' and take the necessary steps
to obtain the user Kerberos credentials and then forward the print job
to the LPD server.
Note that much of this code is totally dependent on the OS-X system,
and I (Patrick Powell) do not have access to details of how it is supported
or implemented. The code was supplied by Rich Cochran of Cornell,
and has been added to the LPRng system at his and others request.
If the PDE support changes on OS-X, then it will be necessary to
redo this support. Note that the PDE files are BINARY, and contain
compiled and executable code.
Kerberos, Red Hat Enterprise Linux
The 'com_err.h' file has been removed from some versions
of RHEL. Configure now checks to see if it is found.
This may break if com_err.h is not in one of the 'standard'
locations, or is in a subdirectory such as /usr/kerberos/include,
or some other permutation.
Updated preinstall, postinstall, preremove, postremove, to be more
compatible with package systems such as the FreeBSD 'ports' and
rpms.
Major Installation Change: If you want to have the LPRng install
run a script that stops your current LPD installation, or your
current CUPS installation, you will need to use:
make STARTSERVER=YES install
New Directory:
The /usr/local/share/LPRng/ or ($datadir)/LPRng directory will
now be used for holding sample versions of configuration files.
During the install process these will then be moved to the
appropriate destinations by the 'postinstall' scripts. By doing
this, you can now generate FreeBSD ports/packages that will
have a 'constant' set of locations for files, but then can
move them or copy them to system specific destinations. This
solves a nasty set of problems with FreeBSD ports/packages,
which have a 'fixed' pkg-plist file, but also allows you to
specify the destinations of printcap, lpd.conf, and do forth.
Files:
printcap.sample lpd.conf.sample lpd.perms.sample lprng.sh.sample
(startup script), postinstall
New Installation Assistance File:
/usr/local/share/LPRng/postinstall
This can be used to set the sample versions of configuration
files to their destinations. In addition, you can also
run a set of commands that will attempt to replace your
current LPD system with the LPRng system:
Bourne/bash shells:
STARTSERVER=YES postinstall
Others:
env STARTSERVER=YES postinstall
If you are building a package for mass distribution, then
after installing the package on a host you can run this script:
pkg_add LPRng-<version>.tar
env STARTSERVER=yes /usr/local/share/LPRng/postinstall
Version LPRng-3.8.28 - Fri Jul 23 09:01:55 PDT 2004
MAJOR CHANGES:
The 'hold file' is now referred to as the 'job ticket' file.
This is really what it is. Reference manual, Cookbook, etc.,
will be modified to reflect this change.
incoming_control_filter:
The input to this filter now has the format:
X=option (from original control file)
key=option (options for job)
Output for changes should have the format:
X= (for option deletion)
key= (for option deletion)
X=newvalue (for option modification)
key=newvalue (for option modification)
The following environment variables are also passed, and have
slightly different formats than before.
CONTROL - image of the control file. Note that the
data file entries have the form.
f/path/to/temporary/file
DATAFILES - space separted list of data files. These
are in the format /path/to/temporary/file.
Added translations for German.
(Translations by: Walter Harms <[email protected]>)
Fixed yet another silly problem with moving jobs from a queue
while the queue is busy. Now the main server will NOT start
another process to move the job if it can do the work itself.
Added a counter to make sure that if a job is moved more than
a specified number of times, that we catch this and stop moving
the job. This code now works (ahem).
Version LPRng-3.8.27 - Wed Apr 21 11:32:41 PDT 2004
Fixed: 'Missing HOLD_FILE' logic error fixed in lpd_rcvjob.c
(Noted by: Mark Tamisiea <[email protected]>)
(And another suggestion by: Christian Reiber <[email protected]>)
Fixed: configure with-initpath
--with-initpath=PATH now works correctly
(Reported by: Jeff Bastian <[email protected]>)
Fixed (well, clarified):
Errormsg() now checks for a 'null' error string and provides
a printable version of errno for logging.
Edited the Scan_queue() function to print error message and removed
some dead code.
(Inspired by comments from: Russell Adams <[email protected]>)
lpc MOVE could result in endless loop.
(Problem reported by: Wichert Akkerman <[email protected]> to
Debian bug list, forwarded by: Craig Small <csmall at : enc.com.au>)
lpc MOVE will now start printing job in destination, rather than just copying
and preserving status of last operation.
Added detailed error message for connection failure.
(Inspired by comments by: Russell Adams <[email protected]>)
Found a really small (1 byte) memory leak in LPD. Solves the mystery of
the server dying with malloc failed messages.
(Information supplied by: Russell Adams <[email protected]>)
Version LPRng-3.8.26 - Tue Feb 3 16:58:00 PST 2004
ADDITION to UTILS:
VeryFlexibleChooser.pl script uses SNMP to get printer
status and selects printer.
(Contributed by: Henrik Edlund <[email protected]>)
Fixed:
--disable-werror configuration option not set correctly.
(Noticed and patched by: Gabriele Balducci <[email protected]>)
IPP listening enabled by default. Should not be enabled by default.
(ipp_listen_port=0)
Version LPRng-3.8.25 - Wed Jan 7 04:46:12 PST 2004
MAJOR CHANGE in internals:
The legacy 'control file' has been removed from the spool
queue as all of the information is duplicated in the hold
file. The various LPRng documents will be updated to reflect
this. Users who access the control file information external
to LPRng should be warned that this is not a good idea due
to file locking, etc.
MAJOR CHANGE in 'move' operation:
The 'lpc move' is now 'nonblocking'. If you request
a job to be moved, the LPD server will start a process to
(almost) immediately move the job. Until this job is moved,
no other job processing for the queue will be done.
If the move is to a local queue on the same host, then the
job will be copied via a file copy. This action is identical
to the action for sending a job to a 'load balance' queue,
with the difference that the job is immediately marked as done
rather than after the load balance queue has printed it.
Note: if you enter a non-existent remote queue, then the
LPD subserver process trying to move the job will/may sit
in an endless loop trying to move the job.
Added: discard_large_jobs option
discard_large_jobs - if this option is set, large jobs are
accepted and then discarded.
Fixed: Priority and Class
For incoming jobs, the first letter of the C (class) field
in the control file is used to set the priority.
This action is modified by the:
# ignore requested user priority
ignore_requested_user_priority=0
# do not set priority from class name
break_classname_priority_link=0
If not present or the break_classname_priority_link,
the default priority value is used to set the priority.
(C=) and class (class=) values in the control file.
This deals with several lpd print clients that appear to
to assign random control file names and do not have a
C field in the control file. Not to mention users
who try to manipulate queue priorities.
Modified: incoming_control_filter action
This filter is applied to the incoming job control file.
and is used to modify the actions of the LPD server.
options. The output can be in the form:
Xoption X (no option)
Xoption
...
<blank line>
key=value
key=value
The Xoption is equivalent to X=option. The key=value
set of options is separated from the first by a blank line.
If an option is not specified, it is not modified. The
X (no option) or X= (no option) form will remove the
option from the control file. It is dangerous to try to
modify the A (identifier) option unless the user has intimate
knowledge of the LPRng lpd server operation.
Modified: filter environment variables
Filters are now invoked with the HF environment variable
set to the hold file contents. This assists with the
incoming_control_filter and control_filter actions.
Fixed:
The 'Remove_done_jobs' code now removes done and error jobs.
This makes the 'done_jobs' and 'done_jobs_max_age' actions
symmetrical.
Documented: added more details to the -D flags.
debug flag format: num | flag[+num] | flag=str
flag names: print[+N], lpr[+N], lpc[+N], lprm[+N],
lpq[+N], network[+N], database[+N], log[+N],
test=num
use on command line, or in printcap :db=... entry
for server:
print: show queue (printing) actions,
larger number, more information
NUMBER same as print+NUMBER
lpr: show servicing lpr actions
lpq: show servicing lpq actions
lprm: show servicing lprm actions
network: show low level network actions
database: show low level database actions
log: Testing. Don't use this unless you read the code.
test: Testing. don't use this unless you read the code.
for clients (lpr, lpq, etc):
print: show client actions, larger number, more information
NUMBER same as print+NUMBER
network: show low level network actions.
database: show low level database actions.
Modified:
The lpq display now shows Pr/Class (Priority/Class)
information if the priority is different than the
class information. This better shows information on
the class/priority relationshiop.
The Class information is in the 'class=' field in the
control file and the Priority information is in the
priority field.
The 'nonexistent printer message' has been modified to be a little
more helpful, or at least more verbose:
Status Information, attempt 1 of 3:
sending job 'papowell@h110+563' to xx@localhost
connecting to 'localhost', attempt 1
connected to 'localhost'
requesting printer xx@localhost
job 'papowell@h110+563' transfer to xx@localhost failed
error 'NONZERO RFC1179 ERROR CODE FROM SERVER' with ack 'ACK_FAIL'
sending str '^Bxx' to xx@localhost
error msg: 'spool queue for 'xx' does not exist on server h110.private'
error msg: 'check for correct printer name or you may need to run'
error msg: ''checkpc -f' to create queue'
Waiting 10 seconds before retry
Version LPRng-3.8.24 - Fri Dec 12 15:03:02 PST 2003
Small bugfixes
Cygwin patch applied.
(From "Luke Bakken"<[email protected]>
Comment:
I thought I'd check LPRng to make sure that the latest version still
works OK with Cygwin. Everything seems OK except for the checkpc.c
"root" user warning. Will this patch be OK for that file?
GCC 3.xx giveth, GCC 2.95 taketh a hard line.
Patch for - t = 0; char buffer[128]; in user_auth.c
(From: "Marcus Overhagen" <[email protected]> and
Jeff Chua <[email protected]>)
Version LPRng-3.8.23 - Wed Nov 12 13:32:02 PST 2003
I did not document that the default locations of the lpd.conf and lpd.perms
file are now /etc/lpd/lpd.conf and /etc/lpd/lpd.perms
This change puts all of the lpd files, except /etc/printcap, whose location
is hardwired into too many places, in the /etc/lpd directory. You can
change this:
configure --help
--with-config_subdir=CONFIG_SUBDIR configuration subdirectory (default 'lpd')
--with-lpddir=DIR lpd executable directory (default \${sbindir})
--with-lpd_conf_path=PATH path of lpd.conf (default: \${sysconfdir}/${CONFIG_SUBDIR}/lpd.conf)
--with-lpd_perms_path=PATH path of lpd.perms (default: \${sysconfdir}/${CONFIG_SUBDIR}/lpd/lpd.perms)
--with-printcap_path=PATH path of printcap (default \${sysconfdir}/printcap)
--with-lpd_printcap_path=PATH path of lpd_printcap (default \${sysconfdir}/${CONFIG_SUBDIR}/lpd_printcap)
--with-initpath=PATH path of lpd startup file (default /usr/local/etc/rc.d/lprng.sh)
Also, the postinstall will now copy the old files to the new locations and
issue a warning message.
Fixed up a very subtle problem with 'chooser' functionality.
we now have to find out if we really need to call the chooser
if we are working and have a single queue, then we do not need to call the chooser
if :sv= p1,p2 but none are available then we do not need to call the chooser
if :sv == "" - then we do need to call the chooser
if :sv == p1,p2 and at least one is available - then we do need to call the chooser
Added the 'chooser_scan_queue' flag. If the flag is 1, then we
check all the jobs in the spool queue to see if any can be sent to
any destination. If the flag is 0 (default), then only the first printable
job in the queue is checked. This causes only the first job in the queue
to be tested, which is probably the appropriate behaviour for the majority
of situations.
Determined that it was possible to do a denial of service attack on the LPRng system.
Added a zillion timeouts for reads/writes to socket/pipe connections.
- for 'non-printing' actions, used Send_query_rw_timeout
- for 'printing' actions, used Send_job_rw_timeout
- on initial connections, use Send_job_rw_timeout, then Connect_timeout,
and finally fall back to 10 seconds.
While this does not totally eliminate the attack, it does try to make the LPD
server responsive after the timeout periods. This is better than nothing.
Note that there is a problem when you use these timeouts AND you are connecting
to a slow printer.
This solves the mystery of the 'hanging lpr processes' on some systems where a
connection is made to the lpd server and then nothing is sent so there is no
way to timeout things.
Added a further fallback for missing filters:
job format X - filter is :Xf=/filter if present, else
filter is :filter=/filter if present, else
filter is :if=/filter if present.
Added --with-config_subdir (=lpd) to allow the $sysconfig/$subdir
to be the directory for lpd.conf and lpd.perms files, also SSL
files.
The :ppd=file option now specifies the location of a PPD file. This
is used by foomatic-rip (http://www.linuxprinting.org) to specify
options and by ifhp.
- checkpc -f checks to see if the file is present and readable
- lpc ppd will return the PPD file contents
We can now integrate lrpng into KDE in a straight forward
manner, as the ppd file should be standard. Also, you can specify
a default PPD file in /etc/lpd.conf. This will be added to the
printcap entries shown by lpc printcap and passed to the filters.
Added a 'pc_entries_required' option that will force the specified
printcap entries to be put into the PRINTCAP_ENTRY information if they
have a defined value and are not in the printcap entry. The
current (only) value is ppd, but I suspect others might be nice.
Fixed a bug in the way that the PGP security was implemented.
- removed the PGP* environment variables from the default pass
list for clients
- did sanity checks for PGPPASS, PGPPASSFILE, and PGPPASSFD,
and passed only the correct ones. Also opened the PGPPASSFILE
and passed the file descriptor.
- made sure that the file descriptor specified in PGPPASSFD was
actually connected to the open file.
- only passed PGPPASS if running as a client.
- on clients, passing the PGPPATH environment value, on server
using printcap :pgp_server_pgppath value (if specified).
- updated the Reference (AKA LPRng-HOWTO) manual to reflect these
changes.
In summary, we now use:
lp:
:pgp_path - path of the PGP program
:pgp_id - id for clients to use when sending to server
- id used by server for decoding client requests
:pgp_server_pgppath - PGPPATH environment variable for server
:pgp_server_passphrasefile - file containing passphrase
(must be absolute path name or is relative
to the spool directory)
:pgp_forward_id - for server to server communications
id of the remote server
:pgp_passphrasefile - default client passphrase file
For clients, the following environment variables are used:
PGPPATH - location of PGP configuration and key files
PGPPASS - password
PGPPASSFD - file descriptor to file with password
PGPPASSFILE - file with password
If PGPASSFD and PGPPASSFILE not defined, then
- if PGPPATH defined, look for $PGPPATH/$passphrasefile
- if $HOME defined, look in $HOME/.pgp/$passphrasefile
Error in SSL Support discovered by Geoff Greene and patch
supplied.
(Patch and hard work by: Geoff Greene <[email protected]>)
Amazing speed of some systems is so fast that jobs complete
in less than the resolution of the system clock. This,
needless to say, has some interesting problems with job
order. Added some sequence numbers as well as time to
various places.
Screwed up the patch sent by Henrik Edlund <[email protected]>. It should
have been:
> for(i = 0; i < listv.count; ++i ){
> s = listv.list[i];
> - if( (t = safestrpbrk(s,File_sep)) ) *t++ = 0;
> + if( (t = safestrpbrk(s,Value_sep)) ) *t++ = 0;
> Free_line_list(&l);
> - Split(&l,t,Value_sep,0,0,0,0,0,0);
> + Split(&l,t,File_sep,0,0,0,0,0,0);
> DEBUGF(DLPQ1)("Job_status: Force_lpq_status '%s'='%s'", s,t);
(Correction by: Henrik Edlund <[email protected]>)
Misimplemented Hendriks accounting fixes.
- if( Match_ipaddr_value(&l,&RemoteHost_IP) ){
+ if( Match_ipaddr_value(&l,&RemoteHost_IP) == 0 ){
Oooops.
(Correction by: Henrik Edlund <[email protected]>)
utiltities.c: modified the 'Find_{str,flag,decimal}_value
routines so that they did not take a separator option. This
appears to be an oversite due to the importation from another
set of code. Apparently I wanted to used non-printable characters
as separators, but this turned out to be too hard to debug,
so I used '=', '#', and '@' instead.
Modified the init.freebsd.sh, postinstall.freebsd.sh, and preremove.freebsd.sh
files to be a bit more 'ports' friendly. Updated the STANDARD_install
to be more in line with FreeBSD/NetBSD.
Documented the max_accounting_file_size and min_accounting_file_size option
and changed the lpd.conf comment to indicate a 0 value disables truncation.
(Lack of documentation pointed out by: Jim Trocki <[email protected]>)
Fixed typos in INSTALL document.
(Pointed out by: Daniel E Singer <[email protected]>)
Version LPRng-3.8.22 - Fri Sep 5 08:45:33 PDT 2003
Updated the LPRng, IFHP, and LPRngTool LICENSE with the new
Artistic License from the www.opensource.org web site.
Updated the DISTRIBUTIONS/FreeBSD port information to meet the current
(new) port format.
Renamed LPRng HOWTO to LPRng Reference Manual. Added notes to the
Printing Cookbook.
lpf.c - removed log() and fatal().
(Suggested by: Torsten Rohlfing <[email protected]>)
Filter command line options now allows ${X} to reference a control file
option. You can now use:
$X with -X<value> (if present)
$0X with -X <value> (adds space)
$'X with -X'<value>' (adds quotes)
$-X with <value> (drops key)
$0-X with <value> (same as $-X)
$'-X with '<value>' (adds quotes)
${ss} with value of printcap option ss
$'{ss} with quoted value of printcap option ss or job control file option
Example: filter=ifhp -Z '${S},${O}'
This will get the O and S options from the job control file. Note that
$S is the 'printer comment name' and '$P' is the 'actual printer name'.
(prompted by a question from: Paul Armstrong <[email protected]>)
Fixed vars.c 'fifo' option -
-{ "fifo", 0, STRING_K, &Fifo_DYN,0,0,0},
+{ "fifo", 0, FLAG_K, &Fifo_DYN,0,0,0},
(Thanks to the Debian folks - especially Craig Small <[email protected]>)
Fixed up printer@remotehost%port parsing so you can do:
localhost:lp=pr@%P and it gets expanded to:
localhost:lp=pr@localhost
This is pretty far down the extrema of wierd... But somebody
came up with a use for it. Sigh...
(Lots of head scratching caused by: Michael J. Carter <[email protected]>)
Filters no longer have file descriptor 3 connected to the 'accounting
file'. Since the '-a accounting_file' option provides the name of the
file and this should be used instead.
plp_snprintf now handles '*' in floating precision correctly.
(Patch by: Henrik Edlund <[email protected]>)
if( Run_OF_filter(), Status_file_DYN ) problem found.
(Thanks to the Debian List: Sam Lown <[email protected]>
and Craig Small <[email protected]>)
If you want to use force_lpq_status according to the docs (HOWTO), the
following patch has to be applied. Otherwise it doesn't work when you have
several ip netmasks listed as in the example:
force_lpq_status=s=pc*.eng.com,130.192.12.0/24,l=sun*.eng.com
Change is:
- Split(&l,t,Value_sep,0,0,0,0,0,0);
Value_sep DEFINE( = " \t=#@" );
+ Split(&l,t,File_sep,0,0,0,0,0,0);
File_sep DEFINE( = " \t,;:" );
(Pointed out to me by: Henrik Edlund <[email protected]>)
Updated the configure and src/krb5_auth.c to be consistent with latest Kerberos
releases.
Added 'accounting_namefixup' option as suggested by Henrik Edlund <[email protected]>
accounting_namefixup=list[,list]*
where list is: host(,host*)[=user(,user*)]
The incoming job is check to see if the originating host (RemoteHost_IP)
is in the list of hosts; the first matching one found is used.
Each host list has the format: host,host... where host has the
same format used for the 'oh' and other host name matching
options. You can use '!host' to invert matching. For example:
host1,127.*,!somehost
When a host match is found, the name to be used for the user
is determined from the user list; if none is specified then no
changes are made. Each entry in the user list has the format
${option} or 'name'; the ${option} values are extracted from
the control file (capital letters) or printcap/configuration
information (lower case letters/names). The first non-empty
value found is used.
For example: ${R},${L},${accounting_name},default
If the control file 'R' option is present, the R option value is used
else if the control file 'L' option is present, the L option value is used,
else if the printcap/config option 'accounting_name' is not empty then
it is used, otherwise the 'default' value is used.
(Original suggestion and patches by: Henrik Edlund <[email protected]>)
Fought with the various Kerberos distributions and appear to
have a new version that compiles with the Kerberos 1.3.1 release
and with other legacy releases.
Added the "# REJECT NOT SERVER" comment to the lpd.perms file to cause
LPRng to reject all jobs/connections from external (non-localhost)
clients
Version LPRng-3.8.21 - Mon Mar 17 07:06:57 PST 2003
The LPQ 'stalled' indication is now based on status information updates,
rather than the job run time. If there has been no status update for the
specified stall time, i.e. - log file (lf=...) or status file (ps=...) then
the stalled indication will be displayed.
Karol Lewandowski discovered that psbanner, a printer filter that
creates a PostScript format banner and is part of LPRng, insecurely
creates a temporary file for debugging purpose when it is configured
as filter. The program does not check whether this file already
exists or is linked to another place writes its current environment
and called arguments to the file unconditionally with the user
id daemon.
-- reported by security.debian.org
-- Debian Security Advisory DSA 285-1
Fixed.
Version LPRng-3.8.20 - Tue Jan 7 09:18:15 PST 2003
The lpd.conf now uses (EMPTY STRING) for defaults which are
empty strings... Before it was '0'. Oops. Patrick
At the request of Karl Kopper <[email protected]> I reviewed the issues
of queue starting, polling the queues for done jobs, and other
issues. A small side effect of this is that the LPD server process
now starts printing processes. This is actually beneficial as it can
now limit the total number of printing processes and allow some
LPQ/LPC/LPR etc actions. Here is a summary of the current operation
and the options that control it:
Options:
lpd_force_poll - forces a check of the spool queues, even when there
is most likely no reason to. Used when you have some REALLY odd
programs running that will directly manipulate the LPD spool queues
and you do not want to have to connect to the server.
(default is OFF).
lpd_poll_time - interval in secs between checking queues for work.
Done if there is some reason to suspect that some spool queue
had problems and might need to be restarted. This also handles a
race condition where a job arrives just as the process servicing
the spool queue exits.
(default is 5 minutes or 600 seconds)
lpd_poll_start_interval - if there are spool queues which need service,
fork up to 'lpd_poll_servers_started' processes at a time and then
wait for lpd_poll_start_interval seconds before forking more.
This prevents the deadly situation where the LPD server is started
and in turn starts a gizillion process; the rc starupt scripts
may fail because there are no free processes (I kid you not on this
one, it drove me nuts trying to find out why the system would crash
ONLY when LPD ran with NO debugging - the IO caused it to slow down
enough so that the other scripts could run).
(default now 1 second)
lpd_poll_servers_started - maximum number of processs to fork to be
spool queue servers at a time. this prevents the massive forking a huge
number of processes at once.
(default now 3)
max_servers_active - the maximum number of children of LPD that are handling
spool queues. Since each spool queue process may have up to 5 children,
and these in turn make fork other ones, you should make sure that the
limits for the LPD server are set as high as possible, or use this
value to throttle activity. The actual limit used by LDP value
is the minimum of max_servers_active value and
maximum children processes per process/2
as determined by the getrlimit(), sysconf(), or other appropriate system
calls. Most problems reported by systems with heavy load are caused by
restrictive process limits. Run 'lpd -F -D1 | grep Get_max_servers'
(as an ordinary user) and see the limits for processes and file
descriptors.
Summary:
lpd_force_poll=0
lpd_poll_time=600 (5 minutes)
lpd_poll_start_interval=1 (1 second)
lpd_poll_servers_started=3 (3 per start interval)
max_servers_active=1024
Experiments with heavily loaded systems (FreeBSD 4.7, Solaris
2.8, Linux RedHat 7.3, and Mandrake 8) indicate that these
values should not cause system trauma. Your milage may vary;
if the load average goes up very high, then set lpd_poll_start_interval
to a larger value and/or decrease the lpd_poll_servers_started
value. Both is best. The amount of free memory seems to be
the limiting factor on the system loading.
When you send a job via LPR, the LPD server forks a 'service socket'
process to handle job reception; in previous versions after receiving
the job the process would then call Do_queue_jobs() to take on the
duties of the 'handle the jobs in the spool queue' process. In
this version the 'service socket' process sends a 'start queue'
request to the LPD server and then exits. The LPD service will
then fork a process to become the 'handle the jobs' process.
Similarly, when an lpc operation needs to start a 'handle the jobs'
process, a message is sent to the LPD server to start the process.
While there is no real difference in performance on lightly loaded
systems, there is a big difference on heavily loaded systems. Now
the LPD server can control the total number of active spool queues
much easier, and the system does not get overloaded as easily.
Also, the LPRng server does not clobber the system at startup
time as badly now.
By the way, queues which are started or have jobs put in them
by LPC or LPR have priority over queues that are started by the
LPD process looking for work, and the LPD server will brutally
try to start as many as possible. Thus, if you do an 'lpc start all'
you can bring the system to its knees for a short time until
all of the forking and file reading activity is completed.
Since only the administrator can do an 'lpc start' command,
this should not be an issue...
Keith ("HP Printer Dies Horrible Death") Rinaldo
<[email protected]> has reported that some HP printers lock
up and do not report status, etc., and display a nasty low level
error message on the printer console such as 7900FE. The IFHP
filter or LPD would sit there waiting for a response. The 'keepalive'
TCP/IP facility does not solve this problem, as sometimes the
TCP/IP stack is OK but the job handling code (i.e. - print engine)
is non-functional. You need to try to get a response from the
printer, which is what the IFHP filter does.
NOTE: send_job_rw_timeout default value is now 0 (no timeout).
In order to not surprise new users, the default value for
send_job_rw_timeout is now 0, i.e.- no timeout. Details below.
The send_job_rw_timeout is now used to set a maximum time that
the printer (network, parallel port or serial port) connection
will be 'inactive', i.e. - no data input and not available for
data output, OR, starting with this release, that the various
filter processes do not update the status file (by default,
${spooldir}/status.printer). When the timeout expires the job
will terminate with a JTIMEOUT status, which will be treated
as a JFAIL status.
/* LPRng internal process exit status */
#define JTIMEOUT 43 /* 12 timeout */
The IFHP filter (ifhp-3.5.11) now has a similar 'send_job_rw_timeout'
option that has the same effect as the LPD 'send_job_rw_timeout'.
If the file descriptor used to communicate with the printer is
inactive for this period of time, then the IFHP filter will
exit with a JTIMEOUT error code, which will be treated as a
JFAIL status.
This will only work if the printer goes totally catatonic and
does not reply with status, or the print filter goes catatonic
and does not update the status file. This situation, unfortunately,
can happen when the printer is taken offline in the middle of
a job in order to put paper in the paper tray. You can't win
them all... but if the time taken to put the paper in the tray
is less than the send_job_rw_timeout then you should be OK.
Version LPRng-3.8.19 - Thu Dec 5 12:34:45 PST 2002
Check_for_missing_files was not writing control file.
(Spotted by Keith ("Wanna bet on that?") Rinaldo <[email protected]>
Version LPRng-3.8.18 - Mon Dec 2 12:08:34 PST 2002
Added the 'fifo' option - this now makes LPRng handle
one incoming job at a time in FIFO order. If you send
jobs A B C then they get delivered in order A B C.
For users who MUST have sequential delivery of jobs.
Some Linux distributions set 'unlimited' resources for all
parameters, such as user processes. Added limit of 1024
processes for such cases as the system will die a horrible
death at startup.
Version LPRng-3.8.17 - Sat Oct 26 20:11:28 PDT 2002
Found a race condition between LPD printing, LPRM, and LPC actions
that would cause LPD to stop printing if you removed or did
an LPC action on a job. After a bit of thought, decided that
the job would get moved or removed anyways. Sigh...
But you might get a bogus error message about 'cannot
find id' as the job hold file has been removed.
Version LPRng-3.8.16 - Mon Aug 12 15:26:05 PDT 2002
lpr now honors :mx=xx values so you can check job size
before you send it.
(Suggested by: Rick Cochran <[email protected]>)
configure --disable-werror removes the -Werror option from CFLAGS.
(From the wish list of: Rick Cochran <[email protected]>)
Bad incoming jobs are removed. You do not get the jobs
left in the queue as errors. Note - spoolers will
keep trying to send jobs even when they get error and
sit in an endless loop. No solution for this one except
to get a better print spooler or whatever...
Version LPRng-3.8.15 - Sun Aug 11 13:11:48 PDT 2002
Remove_done_jobs
- checks to see if the INCOMING flag is set BEFORE
it checks to see if there is an error and only checks
for the data files if the ERROR or DONE flags are set.
This removes a race condition. It was bloody obvious
when I looked at it... I wonder why I did not see it
before?
Version LPRng-3.8.14 - Tue Aug 6 09:14:06 PDT 2002
man page fixes.
(Spotted by the eagle eyes of: Eric S. Raymond <[email protected]>)
Based on third hand reports, some installations of GNU compilers
on HPUX and other systems now have 'fd_set' data types.
I have modified configure so that it checks for 'fd_set' being
present. I wish there was a way to read the man pages and
find out if this was the real case.
The configure 'enable-ssl/disable-ssl/' option was not working.
Once again beating on autoconf 1.53 ... It now understands
'enable-OPTION' and 'disable-OPTION'.
The Samba examples in the LPRNG-Howto were not consistent.
changed
queuepause command = /usr/sbin/lpc -P%p stop
queueresume command = /usr/sbin/lpc -P%p start
to
queuepause command = /usr/local/sbin/lpc stop %p
queueresume command = /usr/local/sbin/lpc start %p
(Suggested by: Jim Van Sickler <[email protected]>)
Version LPRng-3.8.13 - Mon Jul 22 09:07:57 PDT 2002
Major Enhancement In Printcap and Configuration Functionality
After much consideration, added the 'client.xxx' and 'server.xxx'
facility. Briefly, if you have a printcap entry of the form
client.xxx or server.xxx then this can be used to set the corresponding
xxx variable when the printcap entry is used by the lpd server
or the LPRng client programs lpr, lpq, lprm, checkpc, etc.
Entry Program Type Sets
server.xxx = vvv lpd (server) xxx = vvv
client.xxx = vvv lpr,lpq... (client) xxx = vvv
The purpose of this enhancement is to allow a single printcap
entry to be used for both client and server operation, especially
in situations where the lpd server is forwarding or sending jobs
to another lpd queue.
Example of use:
lp:
# used by clients, forcess them to send to
# specified server
:lp=%[email protected]:force_localhost@
# used by lpd server
# the server will now send jobs to the
# specified destination
:server.lp=%P@destination
This is equivalent to and replaces the :client and :server
printcap flags, as shown below:
lp:client
:lp=%[email protected]:force_localhost@
lp:server
:lp=%P@destination
This selection operation also works with values in the
lpd.conf file, allowing global overrides for clients and
servers. (I can't imagine a use for this, but it is there
if somebody wants to use it.)
The lpc client and lpc server commands will display the
selected client.xxx and server.xxx values. They are also
propagated to the PRINTCAP_ENTRY environment variables
for filters.
Typo's in documentation corrected.
(Patch by: Stepan Kasal <[email protected]>)
lpr Kerberos authentication failures were not being reported.
(Problem noticed by: Rick Cochran <[email protected]>)
Added SSL authentication. See the README.SSL.SECURITY file for
the truly complicated details. Note that testing with certificates
signed by non-root CA indicates that the client is not sending
a certificate, even though one has been requested and the
certificates and signing certs are in the right places.
lpd.conf did not have 'include' functionality working.
(Patch by: Stepan Kasal <[email protected]>)
Added Yet Another LPRng Option: user_is_authuser
user_is_authuser:
if( header_info && User_is_authuser_DYN
&& (s = Find_str_value(header_info,AUTHUSER,Value_sep)) ){
Set_str_value(&job->info,LOGNAME,s);
DEBUG1("Check_for_missing_files: authuser '%s'", s );
}
printcap:
lp:auth=kerberos5:user_is_authuser:...
Causes the principle name to be used as the user name.
lpq_in_perl was screwed up
(Patches by: Anthony Thyssen <[email protected]>)
generate_banner core dumped. Turned out not to be setting
banner format ("f") when generating entry, so that control
file generation core dumped when generating new control file.
(Problem reported by: "Keith Rinaldo" <[email protected]>)
Updated Remove_done_jobs to sort jobs by completion time.
Added 'Set_nz_flag_value' function to stop the ERROR_TIME value
from being gratuitously updated by various routines.
Found possible cause of 'job data files not removed' problem
in the Remove_done_jobs() code. There is a possibility of a
data file being orphaned if a 'done job' is removed by the
spooler at the same time that another processes such as lpq
information gathering examines the print job. Rare, but possible.
Put warnings in the LPRng-HOWTO section on Samba about the
done_jobs option and interaction with SAMBA job status.
(Suggested by: Marcus Manske <[email protected]>)
Added yet another wakeup and kick to the master server process
so that printer pools will respond faster. Sigh...
Version LPRng-3.8.12 - Mon May 6 08:21:49 PDT 2002
patch for TCPWRAPPERS added a gratuitous -lwrap to the src/Makefile.
(Spotted by: Rabellino Sergio <[email protected]>)
Version LPRng-3.8.11 - Thu Apr 4 07:49:30 PST 2002
Subtle problem when a filter fails and produces zero
length file. This is now treated as a JABORT level
error. The problem is that RFC1179 treats a file
length as 0 as a 'read until end of file on socket'.
This means that folks who have filters that WILL produce
zero length files need to do something to produce at
least one byte of 'dummy' output.
(Brought to my attention by:
Sergij Kovalenko <[email protected]>)
Fixed up a portability issue for Solaris 2.6, in linksupport.c.
Need to do an unsigned long cast to do comparison of INADDR_NONE.
(Original patch from: Dr Andreas F Muller <[email protected]>)
Added patches to support TCP wrappers. Use:
configure --enable-tcpwrappers
(Patch by: Tobias Burnus <[email protected]>)
Added a 'Linux Standards Base' (LSB) style startup script
for Linux systems.
(Provided by: Tobias Burnus <[email protected]>)
Missing initialization for statb
(Patch by: Rob Joyce <[email protected]>)
Clobbering Logfile_LPD in common/lpd.c
(Patch by: Hugh McDonald <[email protected]>)
Added a call to 'Remove_done_jobs()' in lpd_status.c;
then modified Remove_done_jobs to return indication that
a job was removed so that lpd_status.c would RESCAN
queue... Sigh... OK, but it now works 'right'.
(Stale jobs not getting removed noted by:
Richard Ems <[email protected]>)
The problem of saturating a server when checking for work was
re-examined. The new approach is:
a) if some work was done, then check for success at
lpd_poll_time intervals. If there remains work to
be done and there is no process actively doing the
work, mark the queue as needing service.
b) for the marked queues, start at most 'lpd_poll_servers_started'
queues at once, and start these at intervales of
'lpd_poll_start_interval' seconds.
The effect of this will be to limit the number of processes
that LPD will start at a time.
(Pushed to look at the problem by: Johan Bengtsson <[email protected]>)
Found a very odd bug... the escape code for '\:' in printcap entries
appears to be broken. The fix was to assume that the only places where
it would be used was in 'filter' or other options where the 'expand
escape sequences' code would be called and would take care of replacing
"\:" by a ":".
.
The 'Printer_device()' routine, when opening a filter as an output
device, did not provide 'stdout' for the filter. Some filters such
as pap from Appletalk seem to need this as they produce messages
on STDOUT (fd 2) as well as STDERR (fd 3).
Version LPRng-3.8.10 - Sun Mar 31 11:31:19 PST 2002