From owner-freebsd-stable Fri Aug 14 11:08:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA10227 for freebsd-stable-outgoing; Fri, 14 Aug 1998 11:08:02 -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 LAA10171 for ; Fri, 14 Aug 1998 11:07:58 -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 UAA26626 for ; Fri, 14 Aug 1998 20:07:32 +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 UAA01666 for ; Fri, 14 Aug 1998 20:07:30 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.8.8/8.8.8) id UAA14015 for ; Fri, 14 Aug 1998 20:07:26 +0200 (CEST) From: Andre Albsmeier Message-Id: <199808141807.UAA13224@internal> Subject: Found reason why lpr -r -s doesn't work as expected To: freebsd-questions@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Date: Fri, 14 Aug 1998 20:07:22 +0200 (CEST) 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 While trying to find out why the temporay files made by samba for printing aren't removed, I found that this is due to the following code in usr.sbin/lpr/lpd/printjob.c: case 'U': if (strchr(line+1, '/')) continue; (void) unlink(line+1); and fseek(cfp, 0L, 0); while (getline(cfp)) if (line[0] == 'U' && !strchr(line+1, '/')) (void) unlink(line+1); This disables the removement of files starting with '/'. This was introduced in version 1.14 according to the CVS log. However, I didn't find an explanation why this change was made. Is it a security hole? If this behaviour is considered, maybe we should not in the manual page that 'lpr -s -r' only removes the symlink and is equal to 'lpr -s'... What do you think? Thanks, -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message