From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 7 23:50:17 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCCD916A4E7 for ; Fri, 7 Jul 2006 23:50:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD9B943D4C for ; Fri, 7 Jul 2006 23:50:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k67NoGU5024860 for ; Fri, 7 Jul 2006 23:50:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k67NoGDM024859; Fri, 7 Jul 2006 23:50:16 GMT (envelope-from gnats) Resent-Date: Fri, 7 Jul 2006 23:50:16 GMT Resent-Message-Id: <200607072350.k67NoGDM024859@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, George Mitchell Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 052A016A4DD for ; Fri, 7 Jul 2006 23:45:20 +0000 (UTC) (envelope-from george@m5p.com) Received: from mailhost.m5p.com (209-162-215-52.dq1sn.easystreet.com [209.162.215.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8243643D46 for ; Fri, 7 Jul 2006 23:45:19 +0000 (GMT) (envelope-from george@m5p.com) Received: from m5p.com (home.m5p.com [IPv6:2001:418:3fd::f4]) by mailhost.m5p.com (8.13.7/8.13.7) with ESMTP id k67NjFEZ090788 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Jul 2006 16:45:15 -0700 (PDT) Received: (from george@localhost) by m5p.com (8.13.7/8.13.7/Submit) id k67NjE6P080398; Fri, 7 Jul 2006 16:45:14 -0700 (PDT) Message-Id: <200607072345.k67NjE6P080398@m5p.com> Date: Fri, 7 Jul 2006 16:45:14 -0700 (PDT) From: George Mitchell To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/99896: lpr -r flag has no effect X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: George Mitchell List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 23:50:17 -0000 >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 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: