diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch new file mode 100644 index 0000000000..85d39078ff --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0007-nspawn-Use-execvpe-only-when-libc-supports-it.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 529e7e2f7f6a5dc0e4527ff5c2237b19ece2f112 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 20 Feb 2015 05:10:37 +0000 | ||
4 | Subject: [PATCH 07/16] nspawn: Use execvpe only when libc supports it | ||
5 | |||
6 | Upstream-Status: Denied [no desire for uclibc support] | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | src/nspawn/nspawn.c | 7 +++++++ | ||
11 | 1 file changed, 7 insertions(+) | ||
12 | |||
13 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c | ||
14 | index a4e13bd..4def6ba 100644 | ||
15 | --- a/src/nspawn/nspawn.c | ||
16 | +++ b/src/nspawn/nspawn.c | ||
17 | @@ -112,6 +112,8 @@ typedef enum LinkJournal { | ||
18 | LINK_GUEST | ||
19 | } LinkJournal; | ||
20 | |||
21 | +#include "config.h" | ||
22 | + | ||
23 | static char *arg_directory = NULL; | ||
24 | static char *arg_template = NULL; | ||
25 | static char *arg_user = NULL; | ||
26 | @@ -2595,7 +2597,12 @@ static int inner_child( | ||
27 | a[0] = (char*) "/sbin/init"; | ||
28 | execve(a[0], a, env_use); | ||
29 | } else if (!strv_isempty(arg_parameters)) | ||
30 | +#ifdef HAVE_EXECVPE | ||
31 | execvpe(arg_parameters[0], arg_parameters, env_use); | ||
32 | +#else | ||
33 | + environ = env_use; | ||
34 | + execvp(arg_parameters[0], arg_parameters); | ||
35 | +#endif /* HAVE_EXECVPE */ | ||
36 | else { | ||
37 | chdir(home ?: "/root"); | ||
38 | execle("/bin/bash", "-bash", NULL, env_use); | ||
39 | -- | ||
40 | 2.6.4 | ||
41 | |||