|
From: | Corey Hickey |
Subject: | Re: [PATCH] fix detection of non-LUKS CRYPT |
Date: | Sun, 6 Nov 2016 00:09:11 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 |
On 2016-11-05 05:31, Andrei Borzenkov wrote:
diff --git a/grub-core/osdep/devmapper/getroot.c b/grub-core/osdep/devmapper/getroot.c index 72e5582..a13a39c 100644 --- a/grub-core/osdep/devmapper/getroot.c +++ b/grub-core/osdep/devmapper/getroot.c @@ -143,7 +143,7 @@ grub_util_get_dm_abstraction (const char *os_dev) grub_free (uuid); return GRUB_DEV_ABSTRACTION_LVM; } - if (strncmp (uuid, "CRYPT-LUKS1-", 4) == 0) + if (strncmp (uuid, "CRYPT-LUKS1-", 12) == 0Committed, thanks! We really need some wrapper around (strncmp (foo, "bar", sizeof ("bar") - 1), but for now it is OK as bug fix.
Excellent, you're welcome. That seemed like the most simple fix.I took a stab at adding such a wrapper, but there are a ton of files that could use it which I won't have a chance at being able to test. I can send in an untested patch if you want...
P.S. please in future either use git send-email or attach git format-patch to make it easier to apply. Thank you.
Got it. Thanks, Corey
[Prev in Thread] | Current Thread | [Next in Thread] |