aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chroot.c4
-rw-r--r--coreutils/chroot.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/chroot.c b/chroot.c
index bae9cd757..c10df7a7c 100644
--- a/chroot.c
+++ b/chroot.c
@@ -54,7 +54,9 @@ int chroot_main(int argc, char **argv)
54 prog = "/bin/sh"; 54 prog = "/bin/sh";
55 execlp(prog, prog, NULL); 55 execlp(prog, prog, NULL);
56#else 56#else
57 shell_main(argc, argv); 57 char shell[] = "/bin/sh";
58 char *shell_argv[2] = { shell, NULL };
59 shell_main(1, shell_argv);
58 return EXIT_SUCCESS; 60 return EXIT_SUCCESS;
59#endif 61#endif
60 } 62 }
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index bae9cd757..c10df7a7c 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -54,7 +54,9 @@ int chroot_main(int argc, char **argv)
54 prog = "/bin/sh"; 54 prog = "/bin/sh";
55 execlp(prog, prog, NULL); 55 execlp(prog, prog, NULL);
56#else 56#else
57 shell_main(argc, argv); 57 char shell[] = "/bin/sh";
58 char *shell_argv[2] = { shell, NULL };
59 shell_main(1, shell_argv);
58 return EXIT_SUCCESS; 60 return EXIT_SUCCESS;
59#endif 61#endif
60 } 62 }