From: utzoo!decvax!cca!smk@MITRE-BEDFORD@sri-unix
Newsgroups: net.unix-wizards
Title: dangerous bug in lprm
Article-I.D.: sri-unix.2300
Posted: Wed Jul 28 20:15:54 1982
Received: Thu Jul 29 06:05:00 1982

Date: Fri Jun 25 21:41:07 1982
When possible, lpr will link the file to be printed to the lf* file in
/usr/spool/lpd.  This cuts down costs of copying the file.  (This usually only
happens for files in /usr tree hierarchy on generic systems.)

BUT --
	For some odd reason, lprm will 'clean' out the file before removing.
(It does a close(creat(file, 0666)) and then unlink(file).)  Thus, for linked
files, it will wipe them out.
	To remove the bug, simply comment out the close(creat()) line in the
drop routine of /usr/src/cmd/lpr/lprm.c.  Otherwise, be prepared to zero out
files in the /usr file system!!

	Steve Kramer
	MITRE Corp.