bin/99896: lpr -r flag has no effect
George Mitchell
george at m5p.com
Fri Jul 7 23:50:17 UTC 2006
>Number: 99896
>Category: bin
>Synopsis: lpr -r flag has no effect
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jul 07 23:50:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: George Mitchell
>Release: FreeBSD 5.3-RELEASE i386
>Organization:
Mitchell Voting Products, Inc.
>Environment:
All versions of FreeBSD, 4.0 through 6.1
System: FreeBSD parkstreet.m5p.com 5.3-RELEASE FreeBSD 5.3-RELEASE #2: Fri Jul 15 22:25:47 PDT 2005 george at parkstreet.m5p.com:/ad0/usr/src/sys/i386/compile/PARKSTREET i386
>Description:
The -r flag (remove file after printing) of lpr has no effect.
>How-To-Repeat:
cp <existing text file> foo.txt
lpr foo.txt
After file prints, observe that foo.txt still exists.
>Fix:
Apply the following patch:
--- usr.sbin/lpr/lpd/printjob.c.orig Wed Aug 20 20:43:48 2003
+++ usr.sbin/lpr/lpd/printjob.c Fri Jul 7 16:31:47 2006
@@ -583,8 +583,11 @@
continue;
case 'U':
+#if 0
if (strchr(line+1, '/'))
continue;
+/* This code negates the -r flag! */
+#endif
(void) unlink(line+1);
}
/*
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list