mirror of
https://git.busybox.net/busybox
synced 2026-02-07 20:50:26 +00:00
Fix invocation of builtin shell to have proper argc and argv.
This commit is contained in:
parent
233817437d
commit
bc0f783a5f
2 changed files with 6 additions and 2 deletions
4
chroot.c
4
chroot.c
|
|
@ -54,7 +54,9 @@ int chroot_main(int argc, char **argv)
|
|||
prog = "/bin/sh";
|
||||
execlp(prog, prog, NULL);
|
||||
#else
|
||||
shell_main(argc, argv);
|
||||
char shell[] = "/bin/sh";
|
||||
char *shell_argv[2] = { shell, NULL };
|
||||
shell_main(1, shell_argv);
|
||||
return EXIT_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ int chroot_main(int argc, char **argv)
|
|||
prog = "/bin/sh";
|
||||
execlp(prog, prog, NULL);
|
||||
#else
|
||||
shell_main(argc, argv);
|
||||
char shell[] = "/bin/sh";
|
||||
char *shell_argv[2] = { shell, NULL };
|
||||
shell_main(1, shell_argv);
|
||||
return EXIT_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue