value of GRUB_ENABLE_CRYPTODISK: util/grub-install.c instructs '1' but util/config.c expects 'y'

Bug #1278114 reported by TJ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub
Unknown
Unknown
grub2 (Ubuntu)
Invalid
Medium
Unassigned
Nominated for Trusty by TJ
Nominated for Wily by TJ

Bug Description

root@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@XPSm1530:/# grep GRUB_ENABLE_CRYPTODISK /etc/default/grub
GRUB_ENABLE_CRYPTODISK=1

root@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;

Revision history for this message
TJ (tj) wrote :

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."

Revision history for this message
TJ (tj) wrote :

Still affects 15.10 Wily

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in grub2 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.