From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1c3Ha0-0002sT-Rl for mharc-grub-devel@gnu.org; Sun, 06 Nov 2016 02:09:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3HZz-0002sL-Dk for grub-devel@gnu.org; Sun, 06 Nov 2016 02:09:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3HZu-0003mN-Gf for grub-devel@gnu.org; Sun, 06 Nov 2016 02:09:23 -0500 Received: from [2600:3c01::f03c:91ff:fe93:7077] (port=44556 helo=juniper.fatooh.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c3HZu-0003l6-7t for grub-devel@gnu.org; Sun, 06 Nov 2016 02:09:18 -0500 Received: from juniper.fatooh.org (juniper.fatooh.org [127.0.0.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by juniper.fatooh.org (Postfix) with ESMTPS id BB153414CE for ; Sun, 6 Nov 2016 00:09:12 -0700 (PDT) Received: from juniper.fatooh.org (juniper.fatooh.org [127.0.0.1]) by juniper.fatooh.org (Postfix) with ESMTP id 9CD74418E4 for ; Sun, 6 Nov 2016 00:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=fatooh.org; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=dkim; bh=4LtvK8zW56GK NYBb/MD8DJcZf7g=; b=ALQTEDqI9uSM0pfY7wAUeBiaXdW4zH5GwEFiNX3G0u8I 9oYm305QBGXwN1a7WX3iVYGUollrDrvGRvexZX+N8Eamvd+IyxeRsD+oyACytZT/ zlv49sjWKVQCzatYQpHMRi3J7J/Niw0qASyoQWjAVD6iMfOkoeBLajbR15s/KTQ= DomainKey-Signature: a=rsa-sha1; c=simple; d=fatooh.org; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; q=dns; s=dkim; b=X1tTFH 6E5N2kaNxBsA/Uambuc9G7YTjG2ylwBpZxbLzxGw3UJlSOAFOLZPLRJRCDeJyGyA i7lYHZq2lelCzOxt/pLxmdgkY4+8I3T5weAU3eB8J6z/ZloamOba++4/SfAcyXMh FFGv2Od5urH80uog3gXBOXLwnwOL93obq2EQ8= Received: from [198.18.0.3] (173-164-227-83-SFBA.hfc.comcastbusiness.net [173.164.227.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by juniper.fatooh.org (Postfix) with ESMTPSA id 86FAB414CE for ; Sun, 6 Nov 2016 00:09:12 -0700 (PDT) Subject: Re: [PATCH] fix detection of non-LUKS CRYPT To: grub-devel@gnu.org References: <43313b6e-80c2-fafb-286b-47db8b180f6a@fatooh.org> <08fec14a-a356-04c9-b135-80da3005efc3@gmail.com> From: Corey Hickey Message-ID: <3abef268-adaf-f324-94aa-6f97f7517ec0@fatooh.org> 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 MIME-Version: 1.0 In-Reply-To: <08fec14a-a356-04c9-b135-80da3005efc3@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2600:3c01::f03c:91ff:fe93:7077 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2016 07:09:24 -0000 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) == 0 > > Committed, 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