aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index 38f6d1ad..f0969dfb 100644
--- a/main.c
+++ b/main.c
@@ -98,7 +98,10 @@ void toy_init(struct toy_list *which, char *argv[])
} else if (CFG_TOYBOX_DEBUG && uid && which != toy_list)
error_msg("Not installed suid root");
- if ((which->flags & TOYFLAG_NEEDROOT) && euid) error_exit("Not root");
+ if ((which->flags & TOYFLAG_NEEDROOT) && euid) {
+ toys.exithelp++;
+ error_exit("Not root");
+ }
}
// Free old toys contents (to be reentrant), but leave rebound if any