[Bug 1278114] Re: value of GRUB_ENABLE_CRYPTODISK: util/grub-install.c instructs '1' but util/config.c expects 'y'
TJ
ubuntu at iam.tj
Sun Feb 9 15:59:20 UTC 2014
I cannot add the upstream bug-report link since it is classified as
"Security". Here's the link manually:
https://savannah.gnu.org/bugs/index.php?41524
Upstream responds: "Was already fixed in master."
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1278114
Title:
value of GRUB_ENABLE_CRYPTODISK: util/grub-install.c instructs '1' but
util/config.c expects 'y'
Status in “grub2” package in Ubuntu:
Triaged
Bug description:
root at XPSm1530:/# grub-install /dev/sdc
Installing for i386-pc platform.
grub-install: error: attempt to install to encrypted disk without cryptodisk enabled. Set `GRUB_ENABLE_CRYPTODISK=1' in file `/etc/default/grub'.
root at XPSm1530:/# grep GRUB_ENABLE_CRYPTODISK /etc/default/grub
GRUB_ENABLE_CRYPTODISK=1
root at XPSm1530:/# apt-cache policy grub-pc
grub-pc:
Installed: 2.02~beta2-6
Candidate: 2.02~beta2-6
Version table:
*** 2.02~beta2-6 0
500 http://gb.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
100 /var/lib/dpkg/status
The message give incorrect information about the value to be assigned.
# grep -A 4 '!config\.is_cryptodisk_enabled' util/grub-install.c
if (!config.is_cryptodisk_enabled && have_cryptodisk)
grub_util_error (_("attempt to install to encrypted disk without cryptodisk enabled. "
"Set `%s' in file `%s'."), "GRUB_ENABLE_CRYPTODISK=1",
grub_util_get_config_filename ());
It appears to assume that any boolean-like value is acceptable,
whereas the configuration scanner only looks for 'y'.
# grep -A5 GRUB_ENABLE_CRYPTODISK util/config.c
if (grub_strncmp (ptr, "GRUB_ENABLE_CRYPTODISK=",
sizeof ("GRUB_ENABLE_CRYPTODISK=") - 1) == 0)
{
ptr += sizeof ("GRUB_ENABLE_CRYPTODISK=") - 1;
if (*ptr == '"' || *ptr == '\'')
ptr++;
if (*ptr == 'y')
cfg->is_cryptodisk_enabled = 1;
continue;
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1278114/+subscriptions
More information about the foundations-bugs
mailing list