Bug 2837 - unable to use remote printer-queue because of bug in lpd
Summary: unable to use remote printer-queue because of bug in lpd
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: lpr (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-05-15 09:05 UTC by e.mergl
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-05-17 14:40:49 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description e.mergl 1999-05-15 09:05:01 UTC
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 20:17:59 UTC
This looks like it might be fixed. Bill?

Comment 2 Bill Nottingham 1999-05-17 14:40:59 UTC
already fixed in lpr-0.36.


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