diff options
author | 2009-05-03 06:45:58 +0000 | |
---|---|---|
committer | 2009-05-03 06:45:58 +0000 | |
commit | 1707c27124d4ab6c3352c92d708cf5702f711482 (patch) | |
tree | c2771e0710e7174cc45a29a1ba1b67263dfa0521 /sys/kern/subr_disk.c | |
parent | Use the new ftplist backend which tries to intelligently provide you with (diff) | |
download | wireguard-openbsd-1707c27124d4ab6c3352c92d708cf5702f711482.tar.xz wireguard-openbsd-1707c27124d4ab6c3352c92d708cf5702f711482.zip |
Discovering an extended MBR partition and setting 'wander' to 1
should not stop the spoofing process. Setting 'wander' means when
we are done with this MBR, read the next one.
Problem noted and fix tested by Nick Guenther.
ok weingart@ (I think), deraadt@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 5d1c8b1b629..4711e347551 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.85 2009/03/28 14:58:10 dlg Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.86 2009/05/03 06:45:58 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -495,6 +495,7 @@ donot: part_blkno = 0; } wander = 1; + continue; break; default: fstype = FS_OTHER; @@ -503,11 +504,11 @@ donot: } /* - * Don't set fstype/offset/size when wandering or just - * looking for the offset of the OpenBSD partition. It - * would invalidate the disklabel checksum! + * Don't set fstype/offset/size when just looking for + * the offset of the OpenBSD partition. It would + * invalidate the disklabel checksum! */ - if (wander || partoffp) + if (partoffp) continue; pp->p_fstype = fstype; |