# HG changeset patch # User Rob Landley # Date 1400957419 18000 # Node ID 726d3e67d8c14f1103b765582c9daac8c4234e09 # Parent 7baa19cdce59ae530234892a05cd886d0910ef53 The "not root" test happens before looking for --help, so "./sulogin --help" doesn't show it. Instead make the "not root" failure case always show help text. diff -r 7baa19cdce59 -r 726d3e67d8c1 main.c --- a/main.c Sat May 24 12:51:53 2014 -0500 +++ b/main.c Sat May 24 13:50:19 2014 -0500 @@ -98,7 +98,10 @@ } 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