From owner-cvs-sys Tue Sep 16 03:16:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA15835 for cvs-sys-outgoing; Tue, 16 Sep 1997 03:16:15 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA15790; Tue, 16 Sep 1997 03:15:30 -0700 (PDT) From: Bruce Evans Received: (from bde@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id DAA17076; Tue, 16 Sep 1997 03:11:54 -0700 (PDT) Date: Tue, 16 Sep 1997 03:11:54 -0700 (PDT) Message-Id: <199709161011.DAA17076@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: cvs commit: src/sys/kern subr_diskslice.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 1997/09/16 03:11:54 PDT Modified files: sys/kern subr_diskslice.c Log: Reject attempts to set an in-core label which says that the "disk" or a partition is larger than the slice. Now `disklabel -Brw sdX auto' should fail properly on sliced disks without partition of type 165, e.g., on zip disks with the factory default formatting. Previously it set a bogus in-core label for the compatibility slice and used this to corrupt the MBR (the slice has offset 0 and size 0, but setting the label in effect corrupted its size to nonzero). `disklabel -Brw sdX auto' already failed properly on normally (not dangerously dedicated) sliced disks _with_ partition of type 165, because the compatibility slice has a nonzero offset so the MBR remained inaccessible when the size was corrupted. This bug only affected in-core labels. On-disk labels are checked carefully when they read and written. Revision Changes Path 1.38 +10 -4 src/sys/kern/subr_diskslice.c