From owner-freebsd-audit Sun Oct 14 16:26: 7 2001 Delivered-To: freebsd-audit@freebsd.org Received: from heechee.tobez.org (254.adsl0.ryv.worldonline.dk [213.237.10.254]) by hub.freebsd.org (Postfix) with ESMTP id 37E2337B40E for ; Sun, 14 Oct 2001 16:26:04 -0700 (PDT) Received: by heechee.tobez.org (Postfix, from userid 1001) id 343765411; Mon, 15 Oct 2001 01:25:56 +0200 (CEST) Date: Mon, 15 Oct 2001 01:25:56 +0200 From: Anton Berezin To: audit@FreeBSD.ORG Subject: restore(8) segfault patch Message-ID: <20011015012556.A49087@heechee.tobez.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, restore(8) segfaults when -y is specified `restoring' on a read-only FS. This tiny patch fixes it: cvs diff: Diffing . Index: symtab.c =================================================================== RCS file: /home/ncvs/src/sbin/restore/symtab.c,v retrieving revision 1.7 diff -u -r1.7 symtab.c --- symtab.c 28 Aug 1999 00:14:08 -0000 1.7 +++ symtab.c 14 Oct 2001 23:17:22 -0000 @@ -471,6 +471,7 @@ fprintf(stderr, "fopen: %s\n", strerror(errno)); panic("cannot create save file %s for symbol table\n", filename); + done(1); } clearerr(fd); /* =Anton. -- | Anton Berezin | FreeBSD: The power to serve | | catpipe Systems ApS _ _ |_ | http://www.FreeBSD.org | | tobez@catpipe.net (_(_|| | tobez@FreeBSD.org | | +45 7021 0050 | Private: tobez@tobez.org | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message