summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch')
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
new file mode 100644
index 000000000..6e6f199ef
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
@@ -0,0 +1,41 @@
+From ae999ff50efb9cc82537adef7696c6f732afcfc8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 05:10:37 +0000
+Subject: [PATCH 08/36] nspawn: Use execvpe only when libc supports it
+
+Upstream-Status: Denied [no desire for uclibc support]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/nspawn/nspawn.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index 5a68fec..65e65ec 100644
+--- a/src/nspawn/nspawn.c
++++ b/src/nspawn/nspawn.c
+@@ -111,6 +111,8 @@ typedef enum LinkJournal {
+ LINK_GUEST
+ } LinkJournal;
+
++#include "config.h"
++
+ static char *arg_directory = NULL;
+ static char *arg_template = NULL;
+ static char *arg_chdir = NULL;
+@@ -2637,7 +2639,12 @@ static int inner_child(
+ a[0] = (char*) "/sbin/init";
+ execve(a[0], a, env_use);
+ } else if (!strv_isempty(arg_parameters))
++#ifdef HAVE_EXECVPE
+ execvpe(arg_parameters[0], arg_parameters, env_use);
++#else
++ environ = env_use;
++ execvp(arg_parameters[0], arg_parameters);
++#endif /* HAVE_EXECVPE */
+ else {
+ if (!arg_chdir)
+ chdir(home ?: "/root");
+--
+1.8.3.1
+
OpenPOWER on IntegriCloud