Subject: bin/36381: No accounting in lpd(8) for remote printing
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Hauke Fath <hf@spg.tu-darmstadt.de>
List: netbsd-bugs
Date: 05/23/2007 16:55:00
>Number: 36381
>Category: bin
>Synopsis: No accounting in lpd(8) for remote printing
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 23 16:55:00 +0000 2007
>Originator: Hauke Fath <hf@spg.tu-darmstadt.de>
>Release: NetBSD 3.1_STABLE
>Organization:
>Environment:
System: NetBSD Hochstuhl 3.1_STABLE NetBSD 3.1_STABLE (HOCHSTUHL) #0: Thu Mar 1 20:15:48 CET 2007 hf@Hochstuhl:/var/obj/netbsd-builds/3/i386/sys/arch/i386/compile/HOCHSTUHL i386
Architecture: i386
Machine: i386
>Description:
Some time ago, lpd(8) learned to optionally run filters for
remote (networked) printers, as well. Unfortunately, this
support doesn't go all the way, and filters are not provided
with the data in the printjob description - you cannot do
accounting. The fact is undocumented, which is why I file this
as a software bug.
Looking through usr.sbin/lpr/lpd/printjob.c, we see that
the job description is parsed in printit(), which is only
called for locally attached printers, whereas sendit() is used
for remote printers.
>How-To-Repeat:
Set up a printcap entry with accounting for a networked
printer. Find that /usr/libexec/lpr/lpf as well as any
homebaked filter scripts are not provided with any user
information.
>Fix:
Factor out the jobfile parser. Have sendit() call it as well,
and set the static variables that print() later feeds to the
filters.
>Unformatted: