]> git.ipfire.org Git - thirdparty/grub.git/commit
grub-editenv: Warn a user against editing environment block
authorMichael Chang <MChang@suse.com>
Tue, 5 Nov 2019 09:20:22 +0000 (09:20 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 18 Nov 2019 13:19:25 +0000 (14:19 +0100)
commit5e5a15872d9e5e7d62a38de426aa35f2b91c2140
tree02c45f28713488e5620082c2cd8f6d41fc45170b
parent42acdd3b405c44d08439a3bbfdbd3466049d172d
grub-editenv: Warn a user against editing environment block

The environment block is a preallocated 1024-byte file which serves as
persistent storage for environment variables. It has its own format
which is sensitive to corruption if an editor does not know how to
process it. Besides that the editor may inadvertently change grubenv
file size and/or make it sparse which can lead to unexpected results.

This patch adds a message to the grubenv file to warn a user against
editing it by tools other than grub-editenv.

Signed-off-by: Michael Chang <mchang@suse.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/editenv.c