From owner-freebsd-current Wed Aug 26 15:54:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA09022 for freebsd-current-outgoing; Wed, 26 Aug 1998 15:54:52 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mail.camalott.com (mail.camalott.com [208.203.140.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA09016 for ; Wed, 26 Aug 1998 15:54:49 -0700 (PDT) (envelope-from joelh@gnu.org) Received: from detlev.UUCP (tex-110.camalott.com [208.229.74.110]) by mail.camalott.com (8.8.7/8.8.5) with ESMTP id RAA28950; Wed, 26 Aug 1998 17:55:15 -0500 Received: (from joelh@localhost) by detlev.UUCP (8.9.1/8.9.1) id RAA03247; Wed, 26 Aug 1998 17:53:23 -0500 (CDT) (envelope-from joelh) Date: Wed, 26 Aug 1998 17:53:23 -0500 (CDT) Message-Id: <199808262253.RAA03247@detlev.UUCP> To: thyerm@camtech.net.au CC: wosch@panke.de.freebsd.org, current@FreeBSD.ORG In-reply-to: <35E40C49.C673670C@camtech.net.au> (message from Matthew Thyer on Wed, 26 Aug 1998 22:53:21 +0930) Subject: Re: file segment sizes of a core dump From: Joel Ray Holveck Reply-to: joelh@gnu.org References: <199808231906.VAA04727@campa.panke.de> <35E18FF5.B7FADA7B@camtech.net.au> <19980824193728.B4111@panke.de> <199808251931.OAA00986@detlev.UUCP> <35E40C49.C673670C@camtech.net.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>> How do you know that the file is a FreeBSD core file and not garbage? >>> file(1) has a gross hack to identify core files, see /usr/share/misc/magic. >> Why would you run size on garbage? > Good point. > Maybe a hybrid check which includes the /usr/share/misc/magic test > and a check for the existance of the segments could be used. > I dont know what segments are mandatory in a core file and it could > be a truncated file so maybe this is not a good idea. > Assuming the user knows what they are doing along with the magic > test should be enough. I accept GIGO as a fact of life. I would vote against needing the switch. That's all I have to say on the topic. Any thoughts on examining the corefile for truncated segments, etc. are beyond what I feel like contemplating today. I will also add that I think this is a neat hack, and I am anxious to see it. Best, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message