Age | Commit message (Collapse) | Author |
|
is reserved for the kernel), but technically a pointer is unsigned long.
|
|
"ln -s gsed sed" or similar if you need to use nonstandard names for things.
|
|
|
|
|
|
(only enable character parsing, force utf8, "C" semantics otherwise.)
|
|
|
|
|
|
Signed-off-by: Joyounger <aquanox@163.com>
|
|
|
|
|
|
|
|
|
|
because lookup failure left this->which NULL and error_exit() dereferenced it.
(Oops.)
|
|
Say "toybox" before version string. Tweak sed to preserve lie-to-autoconf.
|
|
apply it to "true" and "false".
|
|
In main.c: used adjusted string with placeholers for removed options (so flag
values don't move based on config, allowing FORCE_FLAGS to work).
In scripts/mkflags.c: test was wrong, a bare longopt never matches a single
letter command, but it was treated as always matching when comparing
allyesconfig vs current config to determine which options were disabled, so
there was a corner case that got the flag values wrong.
|
|
The latest tagged version is 0.7.1.
|
|
<strike>all that tedious mucking about with hyperspace</strike>
stack measuring in ways that confuse security stuff.
|
|
undefined behavior so the optimizer can silently eliminate your entire program.
|
|
|
|
When toybox is installed suid root and invoked by a non-root user for
commands which do not require root privileges, it drops the root
privileges during initialization.
However, since commit afba5b8efd the result check of setuid() was
inverted such that it aborted on success, making toybox unusuable for
non-root users.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Calling it 0.7.0 because the fullscreen (cursor/utf8) infrasructure is in now.
|
|
1) Don't try to force re-exec unless we actually dropped permissions.
(Fixes "./toybox mount" when no suid bit on toybox binary, which
previously exited.)
2) Set temporary toys.which value for error reporting.
(Fixes "ln -s toybox mount && ./mount" with CFG_TOYBOX_DEBUG and
no suid bit, which previously segfaulted.)
|
|
|
|
|
|
|
|
Somebody (carsonh on freenode) objected that they were running something
like "toybox test 1 == 2" and couldn't distinguish the test failing from
toybox not having the test command. Why they were running toybox out of
the multiplexer instead of having a test symlink in the $PATH, I couldn't
tell you. (Is "I know toybox is on this system, but don't know how it was
configured" a problem people actually have?)
*shrug* They care about it more than I do, so now you can't distinguish between
the multiplexer not being found and the command the multiplexer tried to
run not being found. Progress!
|
|
|
|
|
|
|
|
|
|
|
|
Can't think of a better place to stick the actual version info than a #define
at the top of main. Makefile and toys.h are equally awkward, querying git
tags wouldn't work if building a release tarball... watch me forget to update
this when cutting a release.
|
|
the GLOBALS() block on a recursive call. (How that ever worked...)
|
|
(otherwise the fallback exevp() segfaults).
|
|
don't need a separate xexec_optargs().
|
|
|
|
|
|
macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes
go. (Actual flag bit positions are the same for all configs.) Since the
option parsing needs to know where the holes are, the OPTSTR values are
now generated as part of flags.h with ascii 1 values for the disabled values.
(So generated/oldflags.h went away.)
This also means that the option string argument for OLDTOY() went away, it now
uses the same arguments as the NEWTOY() it references.
|
|
calling root-only commands through the multiplexer.
It would say "no such command" when it should say "not root".
|
|
|
|
another command's help.
|
|
back off if necessary.
|
|
permissions, 2) shouldn't recurse forever without exec, stack depth increases and we may leak other resources. Limit it to ~5 levels.
|
|
Toybox expects to be setuid root; setuid some other user confuses the attempt to drop privileges, and we err on the side of avoiding shenanigans.
|
|
|
|
|
|
doesn't show it. Instead make the "not root" failure case always show help text.
|
|
toys.signalfd if set.
|
|
runs increments it further, resulting in a wrong count. Fix: zero it.
|