aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-11-29 21:11:34 -0600
committerRob Landley <rob@landley.net>2014-11-29 21:11:34 -0600
commitdc11ed8d3bc9a3d5b3610db813b63f214d4932dd (patch)
tree8c35c2934f2446564e3ff6c06ae064c28cf716d9
parent7701bf9a35cf92e6bc6cf77bf28076c1d8181da9 (diff)
downloadtoybox-dc11ed8d3bc9a3d5b3610db813b63f214d4932dd.tar.gz
The "re-exec to regain root permissions" logic broke the error message when calling root-only commands through the multiplexer.
It would say "no such command" when it should say "not root".
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index ed6706a9..eefebf9e 100644
--- a/main.c
+++ b/main.c
@@ -149,7 +149,7 @@ void toybox_main(void)
toys.which = toy_list;
if (toys.argv[1]) {
- toys.optc = 0;
+ toys.optc = toys.recursion = 0;
toy_exec(toys.argv+1);
if (toys.argv[1][0] == '-') goto list;