Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
POLL_IN defined as a constant by some libc.
Factor out login.c's change_identity() to xwrap.c as xsetuser().
Replace xsetuid() with xsetuser()
Put a space between argument globals and non-argument globals.
TT starts zeroed, don't need to re-zero entries in it.
STDIN_FILENO has been 0 since 1969, even DOS copied that. Just say 0.
Added an xchroot() using xchdir() to lib/xwrap.c.
Remove endgrent() call until somebody can explain why it was there.
|
|
|
|
readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL.
|
|
Alas, you can't quite do this yet:
make defconfig
make
for i in $(./toybox)
do
echo $i
PREFIX=singles/ scripts/single.sh $i || break
done
Because the OLDTOY() aliases for commands won't build without the base command.
And I can't just skip them because chown/chmod or mv/cp aren't the same thing.
|
|
|
|
multiplexer.
|
|
|
|
|
|
was still cleaning busybox-isms out of my head...
|
|
|
|
but it shouldn't warn just because the multiplexer command "toybox" is stayroot.
|
|
because there's no flush. Rather than change the output granularity, flush before exit and check errors there. (We still need xputc() doing it so "yes" doesn't continue forever.)
|
|
Teach make.sh to emit "#define FLAG_x 0" for options inside disabled USE macros so we can unconditionally refer to them.
|
|
|
|
segfault trying to print current command name, and change TOYBOX_DEBUG+TOYBOX_SUID complaint about not having the suid bit set to warning rather than exit..
|
|
|
|
|
|
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
|
|
|
|
http://sources.redhat.com/bugzilla/show_bug.cgi?id=3400, which prevents "./toybox | wc" from producing any output when toybox was statically linked.
|