diff options
Diffstat (limited to 'meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch')
-rw-r--r-- | meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch new file mode 100644 index 000000000..ea8b3ffb1 --- /dev/null +++ b/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | --- systemd-pam-185/src/nspawn/nspawn.c.orig 2012-06-21 05:31:24.000000000 -0400 | ||
2 | +++ systemd-pam-185/src/nspawn/nspawn.c 2012-06-21 05:29:50.000000000 -0400 | ||
3 | @@ -61,6 +61,8 @@ | ||
4 | #include "path-util.h" | ||
5 | #include "loopback-setup.h" | ||
6 | |||
7 | +#include "config.h" | ||
8 | + | ||
9 | static char *arg_directory = NULL; | ||
10 | static char *arg_user = NULL; | ||
11 | static char **arg_controllers = NULL; | ||
12 | @@ -1315,9 +1317,14 @@ | ||
13 | |||
14 | a[0] = (char*) "/sbin/init"; | ||
15 | execve(a[0], a, (char**) envp); | ||
16 | - } else if (argc > optind) | ||
17 | - execvpe(argv[optind], argv + optind, (char**) envp); | ||
18 | - else { | ||
19 | + } else if (argc > optind) { | ||
20 | +#ifdef HAVE_EXECVPE | ||
21 | + execvpe(argv[optind], argv + optind, (char**) envp); | ||
22 | +#else | ||
23 | + environ = (char **)envp; | ||
24 | + execvp(argv[optind], argv + optind); | ||
25 | +#endif /* HAVE_EXECVPE */ | ||
26 | + } else { | ||
27 | chdir(home ? home : "/root"); | ||
28 | execle("/bin/bash", "-bash", NULL, (char**) envp); | ||
29 | } | ||