From d2e6e70179cea1b96dd4b357e9697512e61698b2 Mon Sep 17 00:00:00 2001 From: andreas Date: Wed, 1 Nov 2000 13:30:24 +0000 Subject: fixes: a) the configured default printer entry might turn out to become a security hole Although lpd isn't enabled by default in FreeBSD 4 and later versions bad things might happen because of a simple copy and paste failure: - fill up root-fs, if /dev/lpt0 doesn't exist - fill up the spool dir (either root-fs or var-fs) if machine hadn't been designed as print server Therefore best decision: if people want printing, then configure both 1. /etc/rc.conf 2. /etc/printcap the default entry wouldn't have served well all tastes and needs anyway... design of most of our config files is, to have commented out suggestions if a service is not active. b) [Garance] fix old and wrong documentation: input filters are possible even if you print to a remote printer this makes FreeBSDs implementation of lpd currently the best without having to switch to port monster LPRng ... c) fix pointer to wrong handbook section for a longer time .. so I doesn't fix the number I'm only referring to the printing section, otherwise this would have to be fixed several times, if the chapters should be reordered again ... d) typo: chose -> choose Submitted by: me and some suggestions by Garance Approved by: Eivind and Garance A Drosihn in private e-mail --- etc/printcap | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'etc') diff --git a/etc/printcap b/etc/printcap index 81c3a5e..b492863 100644 --- a/etc/printcap +++ b/etc/printcap @@ -3,38 +3,48 @@ # # This enables a simple local "raw" printer, hooked up to the first -# parallel port. No kind of filtering is done, so everything you -# pass to the "lpr" command will be printed unmodified. +# parallel port. No kind of filtering is done, so everything you pass +# to the "lpr" command will be printed unmodified. # -# Remember, for further print queues you're going to add, you have to -# chose different spool directories (the "sd" capability below), +# Remember, for further print queues you're going to add, you have +# to choose different spool directories (the "sd" capability below), # otherwise you will greatly confuse lpd. # # For some advanced printing, have a look at the "apsfilter" package. # It plugs into the lpd system, allowing you to print a variety of # different file types by converting everything to PostScript(tm) -# format. If you don't have a PostScript(tm) printer, don't panic, -# but do also install the "ghostscript" package. +# format. For more information about apsfilter visit # -# Do also refer to section 7 (Printing) of the handbook. A local copy -# can be found under /usr/share/doc/handbook/handbook.{html,latin1}. +# http://www.apsfilter.org/ # -# Banner pages are now suppressed by default. Remove the :sh: -# capability to turn them back on. +# If you don't have a PostScript(tm) printer, don't panic, but do +# also install the latest "ghostscript" package for best printer support. # -lp|local line printer:\ - :sh:\ - :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: +# Do also refer to the "printing" section of the handbook. +# +# http://www.freebsd.org/handbook/printing.html +# +# A local copy can be found under +# +# /usr/share/doc/handbook/handbook.{html,latin1}. +# +# Banner pages are now suppressed by default. Remove the :sh: capability +# to turn them back on. +# +#lp|local line printer:\ +# :sh:\ +# :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: # # Sample remote printer. The physical printer is on machine "lphost". -# NB: you cannot perform any kind of local filtering directly. If -# you need local filters (e.g. LF -> CR-LF conversion for HP printers), -# create a filter script that recursively calls lpd with another -P -# argument after filtering. +# You can perform any kind of local filtering directly. If you need +# local filters (e.g. LF -> CR-LF conversion for HP printers), create +# a filter script that sends the proper escape sequence to the printer +# and then concatenates stdin to stdout. # #remote|sample remote printer:\ # :sh:\ -# :rm=lphost:sd=/var/spool/output/lphost:lf=/var/log/lpd-errs: +# :rm=lphost:sd=/var/spool/output/lphost:lf=/var/log/lpd-errs:\ +# :if=/usr/local/libexec/if-script: # # Simple Russian printer with hardware CP866 character set, output filter # used for KOI8-R -> CP866 conversion -- cgit v1.1