Only accept a rawoffset if it is identical to the mbroffset.

This commit is contained in:
Poul-Henning Kamp 2003-05-04 19:26:31 +00:00
parent 7f9e81b703
commit b624374de8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114672

View File

@ -131,6 +131,10 @@ g_bsd_modify(struct g_geom *gp, u_char *label)
/* Historical braindamage... */
rawoffset = (off_t)dl.d_partitions[RAW_PART].p_offset * dl.d_secsize;
if ((off_t)rawoffset * secsize != ms->mbroffset)
rawoffset = 0;
for (i = 0; i < dl.d_npartitions; i++) {
ppp = &dl.d_partitions[i];
if (ppp->p_size == 0)