OSDN Git Service

gpt: "read-only" operation could clobber the pMBR in another way
authorJim Meyering <meyering@redhat.com>
Wed, 10 Feb 2010 16:11:25 +0000 (17:11 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 10 Feb 2010 16:42:51 +0000 (17:42 +0100)
commit432a33115c50005bbe96a09d55edc7d034715ec8
tree19db64cac43053d4cceed1b8a4c55a1c1ef82b86
parent7a06dae72e336b16e6a412ddebe72fe03be2a3a9
gpt: "read-only" operation could clobber the pMBR in another way

A read-only operation like "parted $dev print" would overwrite $dev's
pMBR when exactly one of the primary and backup tables was corrupt.
* libparted/labels/gpt.c (gpt_read): Clear "write_back" in those
two cases.  Hans De Goede spotted this bug by inspection.
* NEWS (Bug fixes): Mention it.
* tests/t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh: New test.
* tests/Makefile.am (TESTS): Add
t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh.
NEWS
libparted/labels/gpt.c
tests/Makefile.am
tests/t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh [new file with mode: 0755]