Bug 237 - lpd won't print if user is not local
lpd won't print if user is not local
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: lpr (Show other bugs)
5.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1998-11-30 13:39 EST by rrd
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-02-17 12:07:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description rrd 1998-11-30 13:39:09 EST
lpd does not print job if user is not local.

Symptom:  user on remote machine (irix6.5, but it doesn't
seem to matter.  I have similar failures from other OS's),
who does not have an account on printserver, attempts to
print to my printer.  I have lpd run with -l so it logs as
much as it will.  I get:

  Nov 30 11:50:41 admin7 lpd[13032]: us: job could not be
printed (cfA141iris20.amherst.com)

in syslog.

In fixing it for my installation, I believe the problem is
that elsewhere in printit() in $lprsrc/lpd/printjob.c, a
non-null value is assumed for getpwnam(logname), and when
this fails it gives the above error message.

I am not a C programmer - this fix may be the wrong way to
do this, and may break other functionality.  It should point
out what the cause of the problem is, though.

My patch follows:
[aerie:lpd/]$ diff printjob.c printjob.c.new
369a370,382
>                       /*
>                        * added 19981130: rrd to allow
printing from remote
>                        * hosts without requiring local
username.  Not sure
>                        * it's the *right thing* to do
>                        */
>                       else {
>                               if (getpwnam(logname) ==
NULL) {
>
strcpy(logname,"daemon");
>                               }
>                       }
>                       /*
>                        * end additions
>                        */
Comment 1 David Lawrence 1998-11-30 14:42:59 EST
This has been verified and has been this way since 5.0. It has been
assigned to a developer.
Comment 2 Bill Nottingham 1999-02-17 12:07:59 EST
fixed in lpr-0.34-1

Note You need to log in before you can comment on or make changes to this bug.