Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: lpr
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
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:
Clone Of:
Environment:
Last Closed: 1999-05-17 14:40:49 UTC


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.