Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2006 16:45:14 -0700 (PDT)
From:      George Mitchell <george@m5p.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/99896: lpr -r flag has no effect
Message-ID:  <200607072345.k67NjE6P080398@m5p.com>
Resent-Message-ID: <200607072350.k67NoGDM024859@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607072345.k67NjE6P080398>