]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: enable bootbits protection
authorKarel Zak <kzak@redhat.com>
Mon, 13 Apr 2015 11:41:10 +0000 (13:41 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 13 Apr 2015 11:41:10 +0000 (13:41 +0200)
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1210428
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/sfdisk.c

index ee55feae4e549c94e026545e41b4068e4968f350..6645f5a39b24015b24d205da6fdaa996d77460de 100644 (file)
@@ -206,6 +206,7 @@ static void sfdisk_init(struct sfdisk *sf)
        if (!sf->cxt)
                err(EXIT_FAILURE, _("failed to allocate libfdisk context"));
        fdisk_set_ask(sf->cxt, ask_callback, (void *) sf);
+       fdisk_enable_bootbits_protection(sf->cxt, 1);
 
        if (sf->label_nested) {
                struct fdisk_context *x = fdisk_new_nested_context(sf->cxt,