grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRUB doesn't accept background images with whitespace in filename


From: Alexander Kurtz
Subject: Re: GRUB doesn't accept background images with whitespace in filename
Date: Tue, 08 Feb 2011 14:01:49 +0100

Hi,

I've investigated Debian Bug #612417[1]. The problems seems to
be /usr/lib/grub/grub-mkconfig_lib. It can't handle arguments with
whitespace in it because some variables are not properly quoted.

I've attached three patches:

add-quoting-small.patch:
        This patch fixes the bug with a minimal set of changes.

add-quoting-big.patch:
        This patch fixes the bug and does also add proper quoting to 
        the rest of the file if it is safe to do so. This means that
        lines like these have NOT been changed:
        
                for foo in ${list}; do bar; done

        I also didn't change lines like this,

                ${grub_probe} --foo --bar

        because ${grub_probe} might contain additional parameters.

add-quoting-really-big.patch:
        This patch is identical to the previous one with the exception 
        of the ${grub_probe} case which is now also quoted.

In general it seems to be a good a idea to add proper quoting to
grub-mkconfig_lib for additional robustness. I've carefully written and
tested all of the attached patches and everything works just fine for
me. However, I can not guarantee that

        a) I didn't miss any unquoted variables.
        b) I didn't break some special use case.
        c) I didn't break someones clever hack due to a lack of 
           understanding.

Please review the attached patches and apply the best one. If there are
any problems with the patches, don't hesitate to tell me so!

Best regards

Alexander Kurtz

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612417

Attachment: add-quoting-small.patch
Description: Text Data

Attachment: add-quoting-big.patch
Description: Text Data

Attachment: add-quoting-really-big.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]