aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch37
1 files changed, 17 insertions, 20 deletions
diff --git a/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
index 85279d68c2..55a0088c65 100644
--- a/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
+++ b/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
@@ -10,32 +10,29 @@ 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 0d8d199..b597edb 100644
---- a/src/nspawn/nspawn.c
-+++ b/src/nspawn/nspawn.c
-@@ -129,6 +129,8 @@ typedef enum Volatile {
- VOLATILE_STATE,
- } Volatile;
+Index: git/src/nspawn/nspawn.c
+===================================================================
+--- git.orig/src/nspawn/nspawn.c
++++ git/src/nspawn/nspawn.c
+@@ -143,6 +143,8 @@ typedef struct CustomMount {
+ char **lower;
+ } CustomMount;
+#include "config.h"
+
static char *arg_directory = NULL;
static char *arg_template = NULL;
static char *arg_user = NULL;
-@@ -4257,7 +4259,12 @@ int main(int argc, char *argv[]) {
- a[0] = (char*) "/sbin/init";
- execve(a[0], a, env_use);
- } else if (argc > optind)
+@@ -4238,7 +4240,12 @@ static int inner_child(
+ a[0] = (char*) "/sbin/init";
+ execve(a[0], a, env_use);
+ } else if (argc > optind)
+#ifdef HAVE_EXECVPE
- execvpe(argv[optind], argv + optind, env_use);
+ execvpe(argv[optind], argv + optind, env_use);
+#else
-+ environ = env_use;
-+ execvp(argv[optind], argv + optind);
++ environ = env_use;
++ execvp(argv[optind], argv + optind);
+#endif /* HAVE_EXECVPE */
- else {
- chdir(home ? home : "/root");
- execle("/bin/bash", "-bash", NULL, env_use);
---
-2.1.4
-
+ else {
+ chdir(home ? home : "/root");
+ execle("/bin/bash", "-bash", NULL, env_use);