From f178927fdb3f9324a56cd0bb404ec9c2eb1f5ec5 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 30 Jun 2014 14:20:28 -0400 Subject: [PATCH] Avoid munging raw spaces when we're escaping command line arguments. Resolves: rhbz#923374 --- ...spaces-when-we-re-doing-our-cmdline-.patch | 36 +++++++++++++++++++ grub2.spec | 7 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0126-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch diff --git a/0126-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch b/0126-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch new file mode 100644 index 0000000..728e388 --- /dev/null +++ b/0126-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch @@ -0,0 +1,36 @@ +From ee6df3680adbe2bb8165c98ed0e39f6258cd873e Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 30 Jun 2014 14:16:46 -0400 +Subject: [PATCH 126/126] Don't munge raw spaces when we're doing our cmdline + escaping (#923374) + +Signed-off-by: Peter Jones +--- + grub-core/lib/cmdline.c | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c +index 0a5b2af..970ea86 100644 +--- a/grub-core/lib/cmdline.c ++++ b/grub-core/lib/cmdline.c +@@ -97,16 +97,7 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf, + + while (*c) + { +- if (*c == ' ') +- { +- *buf++ = '\\'; +- *buf++ = 'x'; +- *buf++ = '2'; +- *buf++ = '0'; +- c++; +- continue; +- } +- else if (*c == '\\' && *(c+1) == 'x' && ++ if (*c == '\\' && *(c+1) == 'x' && + is_hex(*(c+2)) && is_hex(*(c+3))) + { + *buf++ = *c++; +-- +1.9.3 + diff --git a/grub2.spec b/grub2.spec index f591b48..c8f9173 100644 --- a/grub2.spec +++ b/grub2.spec @@ -47,7 +47,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 0.4%{?dist} +Release: 0.5%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -185,6 +185,7 @@ Patch0122: 0122-Add-.eh_frame-to-list-of-relocations-stripped.patch Patch0123: 0123-Make-10_linux-work-with-our-changes-for-linux16-and-.patch Patch0124: 0124-Don-t-print-during-fdt-loading-method.patch Patch0125: 0125-Honor-a-symlink-when-generating-configuration-by-gru.patch +Patch0126: 0126-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch BuildRequires: flex bison binutils python BuildRequires: ncurses-devel xz-devel bzip2-devel @@ -613,6 +614,10 @@ fi %{_datarootdir}/grub/themes/ %changelog +* Mon Jun 30 2014 Peter Jones - 2.02-0.5 +- Avoid munging raw spaces when we're escaping command line arguments. + Resolves: rhbz#923374 + * Tue Jun 24 2014 Peter Jones - 2.02-0.4 - Update to latest upstream.