changeset 769:098ab2654fa0

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.
author Rob Landley <rob@landley.net>
date Thu, 27 Dec 2012 17:09:17 -0600
parents 017b8fd3c9ac
children 1455c09e3f8a
files main.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Wed Dec 26 19:39:51 2012 -0600
+++ b/main.c	Thu Dec 27 17:09:17 2012 -0600
@@ -71,7 +71,8 @@
 
     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");
   }