diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch new file mode 100644 index 0000000000..449c27f88c --- /dev/null +++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Index: git/src/nspawn/nspawn.c | ||
2 | =================================================================== | ||
3 | --- git.orig/src/nspawn/nspawn.c 2012-09-22 17:57:05.000000000 -0700 | ||
4 | +++ git/src/nspawn/nspawn.c 2012-09-22 18:01:41.541405768 -0700 | ||
5 | @@ -63,6 +63,8 @@ | ||
6 | LINK_GUEST | ||
7 | } LinkJournal; | ||
8 | |||
9 | +#include "config.h" | ||
10 | + | ||
11 | static char *arg_directory = NULL; | ||
12 | static char *arg_user = NULL; | ||
13 | static char **arg_controllers = NULL; | ||
14 | @@ -1373,7 +1375,12 @@ | ||
15 | a[0] = (char*) "/sbin/init"; | ||
16 | execve(a[0], a, (char**) envp); | ||
17 | } else if (argc > optind) | ||
18 | +#ifdef HAVE_EXECVPE | ||
19 | execvpe(argv[optind], argv + optind, (char**) envp); | ||
20 | +#else | ||
21 | + environ = (char **)envp; | ||
22 | + execvp(argv[optind], argv + optind); | ||
23 | +#endif /* HAVE_EXECVPE */ | ||
24 | else { | ||
25 | chdir(home ? home : "/root"); | ||
26 | execle("/bin/bash", "-bash", NULL, (char**) envp); | ||