]> git.ipfire.org Git - thirdparty/grub.git/commit
disk/cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner
authorGlenn Washburn <development@efficientek.com>
Fri, 19 Aug 2022 23:06:15 +0000 (18:06 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 11 Oct 2022 12:42:07 +0000 (14:42 +0200)
commit3cf2e848bc03c44d30bb87e583d12efe7e7ccf75
treebed5ed1292f9c4c388b2a8a1640c2be980dd51a4
parent42a424c9d50fdab03c5a2a7660096b239f127ba8
disk/cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner

A user can now specify UUID strings with dashes, instead of having to remove
dashes. This is backwards-compatibility preserving and also fixes a source
of user confusion over the inconsistency with how UUIDs are specified
between file system UUIDs and cryptomount UUIDs. Since cryptsetup, the
reference implementation for LUKS, displays and generates UUIDs with dashes
there has been additional confusion when using the UUID strings from
cryptsetup as exact input into GRUB does not find the expected cryptodisk.

A new function grub_uuidcasecmp() is added that is general enough to be used
other places where UUIDs are being compared.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Patrick Steinhardt <ps@pks.im>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/cryptodisk.c
grub-core/disk/geli.c
grub-core/disk/luks.c
grub-core/disk/luks2.c
include/grub/misc.h