Bug 2837 - unable to use remote printer-queue because of bug in lpd
unable to use remote printer-queue because of bug in lpd
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: lpr (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-05-15 05:05 EDT by e.mergl
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-05-17 10:40:49 EDT
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 e.mergl 1999-05-15 05:05:01 EDT
trying to use a remote printer-queue, the lpd wrote the
following messages to syslog:

Can't create temp cfp file
lp: can't scan /var/spool/lpd/LJIIISi

investigating the source showed the follwing bug: in
printjob.c the function mktemp is called with an invalid
template (the LAST 6 chars have to be XXXXXX !). The patch
below fixes the problem:

*** lpr-0.35/lpd/printjob.c.orig        Sat May 15 12:45:14
1999
--- lpr-0.35/lpd/printjob.c     Sat May 15 12:45:57 1999
***************
*** 769,775 ****
        if (IF != NULL)
          {
            dup_cfpname = strdup(file);
!           memcpy((dup_cfpname+7), "XXXXXX", 6);
            mktemp(dup_cfpname);
            tmpmask = umask(007);
            dup_cfp=fopen(dup_cfpname, "w");
--- 769,775 ----
        if (IF != NULL)
          {
            dup_cfpname = strdup(file);
!           memcpy((dup_cfpname+strlen(file)-6), "XXXXXX",
6);
            mktemp(dup_cfpname);
            tmpmask = umask(007);
            dup_cfp=fopen(dup_cfpname, "w");
Comment 1 Jeff Johnson 1999-05-15 16:17:59 EDT
This looks like it might be fixed. Bill?
Comment 2 Bill Nottingham 1999-05-17 10:40:59 EDT
already fixed in lpr-0.36.

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