On 10/21/2018 11:54 PM, enh wrote: > On Sun, Oct 21, 2018 at 6:49 PM Rob Landley <[email protected]> wrote: >> >> On 10/17/2018 06:24 PM, enh wrote: >>> $ ./toybox su --help >>> toybox: Not root (see "toybox --help") >>> >>> not sure what the fix is there though. >> >> Ok, dug into it some more. >> >> If you "chown root:root toybox" and "chmod +s toybox", the su command then >> works >> as advertised. Including su --help. What's it's _complaining_ about is this >> command needs suid root to function, and toybox is not installed with that. >> >> The fact --help doesn't work in that case is still a problem, but it sounds >> like >> the "Not installed suid root" error message a couple lines earlier is what it >> should be printing in this case. (It's guarded by TOYBOX_DEBUG because it's >> "your system is built wrong", not runtime user error, but you have that on so >> should have seen it.) > > Android doesn't actually build any of the TOYFLAG_ROOTONLY stuff... i > saw this on the host when i was trying to check all the --help output > for obvious mistakes the other day.
Ah. That explains it. (I'm getting the message here when I enable CONFIG_DEBUG.) Hmmm... on the one hand, I don't want "this should never happen" code in the defconfig build. On the other hand, I want to make this easy to build systems with (hence mkroot). Hmmm... > speaking of which, http://landley.net/toybox/help.html should probably > include the `toybox --version` output so it's clear what version of > toybox that page refers to... You're right. Really I should move the version info to version.h at the top level and have it #included from toys.h. I didn't because clutter, but its _job_ is to change every release, and that would make it available to help -a... Although a standalone build of help -a isn't going to print anything useful anyway... (It's always the _little_ decisions that are hard to make. Small differences are harder to see. :P ) Rob _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
