projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2338174
)
Fix invocation of builtin shell to have proper argc and argv.
author
Matt Kraai
<kraai@debian.org>
Thu, 17 May 2001 03:54:37 +0000
(
03:54
-0000)
committer
Matt Kraai
<kraai@debian.org>
Thu, 17 May 2001 03:54:37 +0000
(
03:54
-0000)
chroot.c
patch
|
blob
|
history
coreutils/chroot.c
patch
|
blob
|
history
diff --git
a/chroot.c
b/chroot.c
index bae9cd75702288f662db639518f287bc2556ea30..c10df7a7c8cc35d0597e652feec7c52b0c31dd84 100644
(file)
--- a/
chroot.c
+++ b/
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
}
diff --git
a/coreutils/chroot.c
b/coreutils/chroot.c
index bae9cd75702288f662db639518f287bc2556ea30..c10df7a7c8cc35d0597e652feec7c52b0c31dd84 100644
(file)
--- a/
coreutils/chroot.c
+++ b/
coreutils/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
}