Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 252210
Collapse All | Expand All

(-)a/NEWS (+5 lines)
Lines 1-3 Link Here
1
Changes in 2.0.5
2
================
3
4
* FIX: papd: Remove variable expansion for BSD printers. Fixes CVE-2008-5718.
5
1
Changes in 2.0.4
6
Changes in 2.0.4
2
================
7
================
3
8
(-)a/VERSION (-1 / +1 lines)
Line 1 Link Here
1
2.0.4
1
2.0.5dev
(-)a/etc/papd/lp.c (-3 / +3 lines)
Lines 1-5 Link Here
1
/*
1
/*
2
 * $Id: lp.c,v 1.14.8.4.2.8 2009/02/04 22:33:11 didg Exp $
2
 * $Id: lp.c,v 1.14.8.4.2.9 2009/07/20 09:03:54 franklahm Exp $
3
 *
3
 *
4
 * Copyright (c) 1990,1994 Regents of The University of Michigan.
4
 * Copyright (c) 1990,1994 Regents of The University of Michigan.
5
 * All Rights Reserved.  See COPYRIGHT.
5
 * All Rights Reserved.  See COPYRIGHT.
Lines 586-594 int lp_open( out, sat ) Link Here
586
	}
586
	}
587
587
588
	lp_setup_comments(CH_UNIX);
588
	lp_setup_comments(CH_UNIX);
589
	pipe_cmd = pipexlate(printer->p_printer);
589
	pipe_cmd = printer->p_printer;
590
	if (!pipe_cmd) {
590
	if (!pipe_cmd) {
591
	    LOG(log_error, logtype_papd, "lp_open: can't generate pipe cmd" );
591
	    LOG(log_error, logtype_papd, "lp_open: no pipe cmd" );
592
	    spoolerror( out, NULL );
592
	    spoolerror( out, NULL );
593
	    return( -1 );
593
	    return( -1 );
594
	}
594
	}
(-)a/man/man5/papd.conf.5.tmpl (-20 / +6 lines)
Lines 43-49 printername may be just a name (\fBPrinter 1\fR), or it may be a full name in nb Link Here
43
Systems using a BSD printing system should make use of a pipe to the printing command in question within the
43
Systems using a BSD printing system should make use of a pipe to the printing command in question within the
44
\fBpr\fR
44
\fBpr\fR
45
option (eg\&.
45
option (eg\&.
46
\fBpr=|/usr/bin/lpr \-J%J \-u%U\fR)\&. Note: When printing using a pipe, papd recognizes several wildcards: %F will be replaced by the name present in the "%%For:" comment in the PostScript stream, same with %J for the "%%Title:" comment\&. %U will be substituted with the login name (the latter applies only when authenticated printing is in effect)\&.
46
\fBpr=|/usr/bin/lpr)\&.
47
.PP
47
.PP
48
When CUPS support is compiled in, then
48
When CUPS support is compiled in, then
49
\fBcupsautoadd \fR
49
\fBcupsautoadd \fR
Lines 148-186 HP Printer:\e Link Here
148
.\}
148
.\}
149
149
150
.PP
150
.PP
151
An alternative to the technique outlined above is to direct papd\'s output via a pipe into another program\&. Using this mechanism almost all printing systems can be driven\&. Netatalk supplies three "wildcards" that get substituted with values of the already printed job:
151
An alternative to the technique outlined above is to direct papd\'s output via a pipe into another program\&. Using this mechanism almost all printing systems can be driven\&.
152
\fB%F\fR,
153
\fB%U\fR
154
and
155
\fB%J\fR\&. Using these wildcards, one can pass those parameters directly to programs or implement small wrapper scripts to call the printing system in question\&.
156
.PP
152
.PP
157
\fBExample.\ \&papd.conf examples using pipes\fR
153
\fBExample.\ \&papd.conf examples using pipes\fR
158
.PP
154
.PP
159
The first spooler is known as HP 8100\&. It pipes the print job to
155
The first spooler is known as HP 8100\&. It pipes the print job to
160
\fB/usr/bin/lpr\fR
156
\fB/usr/bin/lpr\fR
161
for printing using the value of the
157
for printing.
162
\fI%%Title: \fR
158
PSSP authenticated printing is enabled, as is CAP\-style authenticated printing\&. Both methods support guest and cleartext authentication as specified by the \'\fBam\fR\' option\&. The PPD used is
163
comment as job name\&. PSSP authenticated printing is enabled, as is CAP\-style authenticated printing\&. Both methods support guest and cleartext authentication as specified by the \'\fBam\fR\' option\&. The PPD used is
159
/etc/atalk/ppds/hp8100\&.ppd\&.
164
/etc/atalk/ppds/hp8100\&.ppd\&. The second spooler is called "Dump PostScript" and uses a pipe to
165
\fBcat\fR
166
to send the raw PostScript code into the user\'s home directory into a file called like the printjob\&.
167
.sp
160
.sp
168
.if n \{\
161
.if n \{\
169
.RS 4
162
.RS 4
170
.\}
163
.\}
171
.nf
164
.nf
172
HP 8100:\e
165
HP 8100:\e
173
   :pr=|/usr/bin/lpr \-Plp \-J"%J":\e
166
   :pr=|/usr/bin/lpr \-Plp:\e
174
   :sp:\e
167
   :sp:\e
175
   :ca=/tmp/print:\e
168
   :ca=/tmp/print:\e
176
   :am=uams_guest\&.so,uams_pam\&.so:\e
169
   :am=uams_guest\&.so,uams_pam\&.so:\e
177
   :pd=/etc/atalk/ppds/hp8100\&.ppd:
170
   :pd=/etc/atalk/ppds/hp8100\&.ppd:
178
179
Dump PostScript:LaserWriter@Server:\e
180
   :pr=|cat >/home/%U/%J\-prn\&.out:\e
181
   :pd=/usr/share/lib/ppd/mooralana\&.ppd:\e
182
   :sp:au:op=lp:\e
183
   :am=uams_clrtxt\&.so:
184
.fi
171
.fi
185
.if n \{\
172
.if n \{\
186
.RE
173
.RE
187
- 

Return to bug 252210