From owner-freebsd-hackers Mon Dec 11 05:15:17 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA02496 for hackers-outgoing; Mon, 11 Dec 1995 05:15:17 -0800 (PST) Received: from critter.tfs.com ([140.145.230.252]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id FAA02485 for ; Mon, 11 Dec 1995 05:15:14 -0800 (PST) Received: from localhost.tfs.com (localhost.tfs.com [127.0.0.1]) by critter.tfs.com (8.6.12/8.6.12) with SMTP id OAA04750; Mon, 11 Dec 1995 14:14:11 +0100 X-Authentication-Warning: critter.tfs.com: Host localhost.tfs.com didn't use HELO protocol To: "Jordan K. Hubbard" cc: hackers@freebsd.org Subject: Re: sysinstall considered harmful! In-reply-to: Your message of "Mon, 11 Dec 1995 04:50:24 PST." <14676.818686224@time.cdrom.com> Date: Mon, 11 Dec 1995 14:14:11 +0100 Message-ID: <4748.818687651@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-hackers@freebsd.org Precedence: bulk > Since you're the only human alive (or dead) who understands libdisk, > could you possibly take a look at it? I'd like to have a new version > of sysinstall available that 2.1 users can whap over their existing > one if at all possible given that this is a _really bad_ bug! > % grep open write_disk.c fd = open(device,O_RDWR); warn("open(%s) failed",device); The next thing: that piece of code looks like this: int Write_Disk(struct disk *d1) { int fd,i,j; struct disk *old = 0; struct chunk *c1; int ret = 0; char device[64]; u_char *mbr; struct dos_partition *dp,work[NDOSPART]; int s[4]; strcpy(device,"/dev/r"); strcat(device,d1->name); fd = open(device,O_RDWR); if (fd < 0) { warn("open(%s) failed",device); return 1; } [...] what can I say ? I've never seen it in the standalone tst01.c version which I have used for this purpose a lot of times... I guess we need some 3rd party code review... -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so.