Bug 2745
| Summary: | "hack" support of IF in lpd breaks remote printing | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | timw |
| Component: | lpr | Assignee: | David Lawrence <dkl> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 1999-05-12 14:59:59 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Try lpr-0.36-3; it's available at http://charlotte.redhat.com/~notting/ftp/lpr/, and will be in the next Raw Hide relase. Your print server wouldn't happen to be HP-UX, would it? fixed in lpr-0.36-3 |
The code in printjob.c with the comment starting /* msf - here is where we hack in IF support */ causes mismatched data and control file names. The print server here barfs when fed a non-matching control file name. The following diff fixes the problem (and hopefully doesn't break anything else :-) *** printjob.c Tue Feb 16 12:01:45 1999 --- /usr/src/redhat/BUILD/lpr-0.35/lpd/printjob.c Tue May 11 12:14:09 1999*************** *** 749,754 **** --- 749,755 ---- char *dup_cfpname = NULL; char *final_cfp; FILE *dup_cfp = NULL; + char new_suffix[6]; int ifi, fi; int ifchild, pid; *************** *** 771,776 **** --- 772,778 ---- dup_cfpname = strdup(file); memcpy((dup_cfpname+7), "XXXXXX", 6); mktemp(dup_cfpname); + memcpy(new_suffix, (dup_cfpname+7), 6); tmpmask = umask(007); dup_cfp=fopen(dup_cfpname, "w"); umask(tmpmask); *************** *** 859,867 **** char tmpfile[20]; memcpy(tmpfile, last+1, 7); ! memcpy(tmpfile+7, "XXXXXX", 6); tmpfile[13]='\000'; - mktemp(tmpfile); /* we make a new f and U entry for remote cfp */ fprintf(dup_cfp, "f%s\n",tmpfile); --- 861,868 ---- char tmpfile[20]; memcpy(tmpfile, last+1, 7); ! memcpy(tmpfile+7, new_suffix, 6); tmpfile[13]='\000'; /* we make a new f and U entry for remote cfp */ fprintf(dup_cfp, "f%s\n",tmpfile);