From owner-freebsd-stable Wed Aug 19 21:45:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA14422 for freebsd-stable-outgoing; Wed, 19 Aug 1998 21:45:58 -0700 (PDT) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA14409 for ; Wed, 19 Aug 1998 21:45:47 -0700 (PDT) (envelope-from andre.albsmeier@mchp.siemens.de) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer david.siemens.de) Received: from mail.siemens.de (salomon.siemens.de [139.23.33.13]) by david.siemens.de (8.9.1/8.9.1) with ESMTP id GAA00211 for ; Thu, 20 Aug 1998 06:44:58 +0200 (MET DST) Received: from curry.mchp.siemens.de (daemon@curry.mchp.siemens.de [146.180.31.23]) by mail.siemens.de (8.9.1/8.9.1) with ESMTP id GAA15809 for ; Thu, 20 Aug 1998 06:44:57 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.8.8/8.8.8) id GAA27433 for ; Thu, 20 Aug 1998 06:44:54 +0200 (CEST) From: Andre Albsmeier Message-Id: <199808200444.GAA13907@internal> Subject: Re: Found reason why lpr -r -s doesn't work as expected In-Reply-To: from Eric Siegerman at "Aug 19, 98 09:58:58 pm" To: erics@now.com (Eric Siegerman) Date: Thu, 20 Aug 1998 06:44:51 +0200 (CEST) Cc: andre.albsmeier@mchp.siemens.de, freebsd-stable@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Andre Albsmeier wrote: > > I have now changed printjob.c so that removing > > files containing '/' still is forbidden except when it starts with > > '/var/spool/samba/'. It's ugly but works. But, I think this behaviuor > > should be stated in the manual page of lpr. Now it says: > > > > -r Remove the file upon completion of spooling or upon completion of > > printing (with the -s option). > > > > -s Use symbolic links. Usually files are copied to the spool direc- > > tory. The -s option will use symlink(2) to link data files > > rather than trying to copy them so large files can be printed. > > Why not instead make "lpr -r" (without -s) act like mv(1): try > to rename the file into /var/spool/output, and only > copy-and-unlink if the rename fails? If you have > /var/spool/samba and /var/spool/output on the same filesystem, > you'd avoid the extra file copy, without introducing either new > security holes or the ugly special case. Yes, I have thought of this as well. Anyone who wants to implement this :-) Would it have a chance to go into the src trees? If it is undesired to use -r, maybe we could make a new option... -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message