aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-12-27 17:09:17 -0600
committerRob Landley <rob@landley.net>2012-12-27 17:09:17 -0600
commitbf1e70f3554c2f591e15df7abca03138861e5c6c (patch)
tree4730b8ddb7e1c3174f9e124cb1555cbbf626c9c0 /main.c
parentf02ca1e5d07157b66fde51068881611ab44cce68 (diff)
downloadtoybox-bf1e70f3554c2f591e15df7abca03138861e5c6c.tar.gz
TOYBOX_DEBUG warns about lack of suid bit when running a STAYROOT command, but it shouldn't warn just because the multiplexer command "toybox" is stayroot.
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 0cd1cb23..bf89ef21 100644
--- a/main.c
+++ b/main.c
@@ -71,7 +71,8 @@ void toy_init(struct toy_list *which, char *argv[])
if (!(which->flags & TOYFLAG_STAYROOT)) {
if (uid != euid) xsetuid(euid=uid);
- } else if (CFG_TOYBOX_DEBUG && uid) error_msg("Not installed suid root");
+ } 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");
}