From blaz@amis.net  Thu Nov 13 03:02:58 1997
Received: from server.amis.net (server.amis.net [193.77.234.34])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA04504
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Nov 1997 03:02:45 -0800 (PST)
          (envelope-from blaz@amis.net)
Received: (from blaz@localhost)
	by server.amis.net (8.8.7/8.8.7) id MAA19663;
	Thu, 13 Nov 1997 12:02:18 +0100 (CET)
Message-Id: <199711131102.MAA19663@server.amis.net>
Date: Thu, 13 Nov 1997 12:02:18 +0100 (CET)
From: blaz@amis.net
Reply-To: blaz@amis.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: lpr not removing files with -s -r
X-Send-Pr-Version: 3.2

>Number:         5031
>Category:       bin
>Synopsis:       lpr(1) does not remove original file if -s is used
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gad
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 13 03:10:01 PST 1997
>Closed-Date:    
>Last-Modified:  Sun Feb 20 04:53:52 UTC 2011
>Originator:     Blaz Zupan
>Release:        FreeBSD 2.2-STABLE i386
>Organization:
Medinet 
>Environment:

	FreeBSD-STABLE (a few weeks old, but I have recompiled lpr from
	the latest sources and it exhibits the same problems).
	

>Description:

	I use lpr from samba and and I don't want the files to be
	spooled twice, taking twice as much disk space, so I use option
	"-s" to lpr so that it symlinks the file instead of copying it.
	I also have "-r" so that lpr should remove the temporary files
	after printing. But it does not remove the files. If I remove "-s"
	the print files are removed.

	This bug was NOT present in an earlier 2.2-STABLE release
	(a few months old, can't tell the date, sorry).
	

>How-To-Repeat:

	Try to print a file with "lpr -s -r" and notice that it is not
	removed after printing.
	

>Fix:
	Check what was changed lately in lpr and find the breakage? :)
	

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: max 
Responsible-Changed-When: Thu Nov 13 04:39:25 PST 1997 
Responsible-Changed-Why:  
Misfiled PR. 

From: Garance A Drosihn <drosih@rpi.edu>
To: freebsd-gnats-submit@FreeBSD.org, blaz@amis.net
Cc:  
Subject: Re: bin/5031: lpr does not remove original file if -s is used
Date: Tue, 15 Aug 2000 18:01:39 -0400

 For what it's worth, the behavior of 'lpr -s -r' stopped
 working due to an important security-related change which
 was made to lpd at the time.  That was a quick fix, but
 an important one.
 
 Sometime soon I hope to write a better fix, and when I do
 then I should be able to get 'lpr -s -r' correctly remove
 the file once again.
 
 In the meantime, recent changes to lpr might be of some
 use to you.  If you do 'lpr -r' (no -s), and IF the file
 you are printing is on the same disk partition as the
 spool directory for the printer you are printing to, then
 lpr will move the file instead of copying it.  Thus, you
 can now get the effect you wanted by having your samba
 spooling directory be the same as your printer's spool
 directory.
 
 ---
 Garance Alistair Drosehn           =   gad@eclipse.acs.rpi.edu
 Senior Systems Programmer          or  drosih@rpi.edu
 Rensselaer Polytechnic Institute
 

From: Garance A Drosihn <drosih@rpi.edu>
To: freebsd-gnats-submit@FreeBSD.org, blaz@amis.net
Cc:  
Subject: Re: bin/5031: lpr does not remove original file if -s is used
Date: Wed, 16 Aug 2000 12:05:56 -0400

 Earlier, I wrote:
 > In the meantime, recent changes to lpr might be of some
 > use to you.  If you do 'lpr -r' (no -s), and IF the file
 > you are printing is on the same disk partition as the
 > spool directory for the printer you are printing to, then
 > lpr will move the file instead of copying it.
 
 Ahem.  It seems I've mixed up different PR's that I had
 filed for lpr earlier this year.  The update mentioned here
 isn't actually installed yet.
 
 Sorry about the excitement.
 
 ---
 Garance Alistair Drosehn           =   gad@eclipse.acs.rpi.edu
 Senior Systems Programmer          or  drosih@rpi.edu
 Rensselaer Polytechnic Institute
 
Responsible-Changed-From-To: freebsd-bugs->gad-bugs 
Responsible-Changed-By: gad 
Responsible-Changed-When: Wed Dec 27 09:38:56 PST 2000 
Responsible-Changed-Why:  
I hope to write a fix to this situation in the near future. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=5031 
Responsible-Changed-From-To: gad-bugs->gad 
Responsible-Changed-By: gad 
Responsible-Changed-When: Wed Dec 27 09:47:18 PST 2000 
Responsible-Changed-Why:  
I hope to write a fix to this situation in the near future. 
I also hope to learn how to type my own name... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=5031 
>Unformatted:
