Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site thunder.UUCP Path: utzoo!watmath!thunder!gamiddleton From: gamiddleton@thunder.UUCP (Guy Middleton) Newsgroups: net.bugs.4bsd Subject: Lprm seg-faults when printer is offline. Message-ID: <192@thunder.UUCP> Date: Fri, 15-Feb-85 17:15:33 EST Article-I.D.: thunder.192 Posted: Fri Feb 15 17:15:33 1985 Date-Received: Sat, 16-Feb-85 07:06:33 EST Reply-To: gamiddleton@thunder.UUCP (Guy Middleton) Organization: Lakehead U; Thunder Bay, Ontario Lines: 25 If the printer is offline, lprm tries to get the name of the control file of the file being printed. It opens it successfully (since a null file name in BSD is a synonym for the current working directory), and reads garbage. Following is the fix, in function chk() in file rmjob.c: *** /tmp/,RCSt1022475 Fri Feb 15 17:10:45 1985 --- rmjob.c Fri Feb 15 17:06:13 1985 *************** *** 173,178 if (all && (from == host || !strcmp(from, file+6))) return(1); /* * get the owner's name from the control file. --- 173,180 ----- if (all && (from == host || !strcmp(from, file+6))) return(1); + if (strlen(file) == 0) + return(1); /* * get the owner's name from the control file.