Blame SOURCES/0105-Fix-getroot.c-s-trampolines.patch

8e15ce
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8e15ce
From: Peter Jones <pjones@redhat.com>
8e15ce
Date: Fri, 28 Sep 2018 15:42:19 -0400
8e15ce
Subject: [PATCH] Fix getroot.c's trampolines.
8e15ce
8e15ce
This makes the stack executable on most of the grub utilities, which is
8e15ce
bad, and rpmdiff complains about it.
8e15ce
8e15ce
Signed-off-by: Peter Jones <pjones@redhat.com>
8e15ce
---
8e15ce
 grub-core/osdep/linux/getroot.c | 16 +++++++---------
8e15ce
 1 file changed, 7 insertions(+), 9 deletions(-)
8e15ce
8e15ce
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
b35c50
index 9f730b3518..f0c503f43d 100644
8e15ce
--- a/grub-core/osdep/linux/getroot.c
8e15ce
+++ b/grub-core/osdep/linux/getroot.c
8e15ce
@@ -1264,22 +1264,20 @@ grub_util_get_grub_dev_os (const char *os_dev)
8e15ce
   return grub_dev;
8e15ce
 }
8e15ce
 
8e15ce
+static void *mp = NULL;
8e15ce
+static void
8e15ce
+btrfs_mount_path_hook(const char *m)
8e15ce
+{
8e15ce
+  mp = strdup (m);
8e15ce
+}
8e15ce
 
8e15ce
 char *
8e15ce
 grub_util_get_btrfs_subvol (const char *path, char **mount_path)
8e15ce
 {
8e15ce
-  char *mp = NULL;
8e15ce
-
8e15ce
   if (mount_path)
8e15ce
     *mount_path = NULL;
8e15ce
 
8e15ce
-  auto void
8e15ce
-  mount_path_hook (const char *m)
8e15ce
-  {
8e15ce
-    mp = strdup (m);
8e15ce
-  }
8e15ce
-
8e15ce
-  grub_find_root_btrfs_mount_path_hook = mount_path_hook;
8e15ce
+  grub_find_root_btrfs_mount_path_hook = btrfs_mount_path_hook;
8e15ce
   grub_free (grub_find_root_devices_from_mountinfo (path, NULL));
8e15ce
   grub_find_root_btrfs_mount_path_hook = NULL;
8e15ce