]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
disk/cryptodisk: Fix missing change when updating to use grub_uuidcasecmp()
authorGlenn Washburn <development@efficientek.com>
Fri, 18 Aug 2023 17:27:22 +0000 (12:27 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 31 Aug 2023 15:03:29 +0000 (17:03 +0200)
This was causing the cryptomount command to return failure even though
the crypto device was successfully added. Of course, this meant that any
script using the return code would behave unexpectedly.

Fixes: 3cf2e848bc03 (disk/cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner)
Suggested-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Patrich Steinhardt <ps@pks.im>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/cryptodisk.c

index 34b67a705fbc73e46f8867394352a6f4002052fd..fb807e2a6a275874d3d6e701eb48778ef9068e98 100644 (file)
@@ -1236,7 +1236,8 @@ grub_cryptodisk_scan_device (const char *name,
   dev = grub_cryptodisk_scan_device_real (name, source, cargs);
   if (dev)
     {
-      ret = (cargs->search_uuid != NULL && grub_strcasecmp (cargs->search_uuid, dev->uuid) == 0);
+      ret = (cargs->search_uuid != NULL
+            && grub_uuidcasecmp (cargs->search_uuid, dev->uuid, sizeof (dev->uuid)) == 0);
       goto cleanup;
     }