From owner-freebsd-bugs Fri Sep 15 07:52:05 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id HAA08650 for bugs-outgoing; Fri, 15 Sep 1995 07:52:05 -0700 Received: from disperse.demon.co.uk (disperse.demon.co.uk [158.152.1.77]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id HAA08639 for ; Fri, 15 Sep 1995 07:51:56 -0700 Received: from post.demon.co.uk by disperse.demon.co.uk id ac00669; 15 Sep 95 13:39 +0100 Received: from gnome.demon.co.uk by post.demon.co.uk id aa22387; 15 Sep 95 12:36 +0100 Received: (from jacs@localhost) by hawk.gnome.co.uk (8.6.12/8.6.9) id MAA02344; Fri, 15 Sep 1995 12:37:58 +0100 Date: Fri, 15 Sep 1995 12:37:58 +0100 Subject: lpr bug in FreeBSD-stable + Fix To: freebsd-bugs@freebsd.org From: Chris Stenton Message-Id: Sender: owner-bugs@freebsd.org Precedence: bulk Picked up a copy of FreeBSD-stable yesterday; there is a bug in that lpr -r does not work here is the patch to make it work *** lpr.c.orig Fri Sep 15 11:29:16 1995 --- lpr.c Fri Sep 15 12:20:08 1995 *************** *** 600,609 **** if (cp == file) { fd = checkwriteperm(file,"/"); } else { ! strcpy(path,file); *cp = '\0'; fd = checkwriteperm(path,file); *cp = '/'; } if (fd == 0) return(1); --- 600,611 ---- if (cp == file) { fd = checkwriteperm(file,"/"); } else { ! path = malloc(strlen(file)+1 ); ! strcpy (path, file); *cp = '\0'; fd = checkwriteperm(path,file); *cp = '/'; + free(path); } if (fd == 0) return(1); ------------------------------------------------------------------------------- Dr Chris Stenton chris@gnome.co.uk Gnome Computers Ltd Tel/Fax: 44 (0)1480 406164 25A Huntingdon St, St Neots, Cambridgeshire, PE19 1BG ------------------------------------------------------------------------------