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