Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2001 01:25:56 +0200
From:      Anton Berezin <tobez@FreeBSD.org>
To:        audit@FreeBSD.ORG
Subject:   restore(8) segfault patch
Message-ID:  <20011015012556.A49087@heechee.tobez.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011015012556.A49087>