From: Rob Landley Date: Thu, 27 Dec 2012 23:09:17 +0000 (-0600) Subject: TOYBOX_DEBUG warns about lack of suid bit when running a STAYROOT command, but it... X-Git-Tag: 0.4.3~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf1e70f3554c2f591e15df7abca03138861e5c6c;p=platform%2Fupstream%2Ftoybox.git 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. --- diff --git a/main.c b/main.c index 0cd1cb2..bf89ef2 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"); }