Age | Commit message (Collapse) | Author |
|
|
|
|
|
the SELinux commands (such as chcon) and the SELinux-specific options
to regular commands (such as ls -Z).
This lets us #include <selinux/selinux.h> in portability.h.
I've also fixed chcon to insist on being given the a context argument.
This patch also adds -Z to id and fixes id's regular output (-G should
be separated by spaces, non-G output should be separated by commas,
and you don't want a double comma where the egid is omitted from the
list of groups).
|
|
|
|
instead of stopping after -l or -L.
Hyejin Kim tried "toyboxd nc nc -p 1234 -l rm mv ps" (which attempted to run
"nc rm mv ps") and "toybox nc -l -p 1234" (which attempted to run "-p 1234")
and found the behavior confusing. So make it work like xargs, where all
netcat options have to come before the start of any child command.
|
|
but it's a start.)
|
|
toolbox (NetBSD) chown...
new test:
and here's the patch to fix "owner:" ":group" and the ":" special case:
|
|
|
|
resume position, so the script would restart from beginning.
|
|
without a \ escaping the newline.
|
|
|
|
|
|
Alas, passing a union as the last argument to printf does not appear to work
reliably, and there's no obvious way to manually assemble varargs in a portable
manner. So I have to repeat the printf once for each data type. Oh well.
|
|
|
|
|
|
Fixes bug introduced last time where toys.optargs was both snapshotted and used
directly and the two fell out of sync.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add estrtol() (which clears errno first), and xstrtol() (which error_exit()s on overflow).
|
|
|
|
|
|
curly brackets.)
He says:
In the channel selection loop, "if (TT.chan)" had been combined with
a strcmp; the else conditionals were premised on if (TT.chan) alone.
The help text had been only partially updated for a couple option changes.
|
|
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.
|
|
the end and option parsing fell off the end looking for it (segfault) if DEBUG wasn't enabled to check for that.
|
|
random other symbol name (because gnu) and this screws up nontrivial macro expansions of NEWTOY(basename), so work around it in portability.h.
|
|
|
|
|
|
|
|
|
|
|
|
Thompson).
(The diff looks bigger than it is because of reindenting.)
|
|
two more easy SELinux commands:
|
|
'traceroute' keep swapping places. self-inflicted, yes, but not much i
can do about it :-(
|
|
infrastructure upgrades needed to restore separate catv option.
|
|
|
|
|
|
the same command.)
|
|
|
|
|
|
|
|
1) Newline in -e after s/// was eaten as "whitespace before flags"
2) \\ needs to be passed through to regex to avoid "trailing \" error and
"\\n" is not a newline.
|
|
MV still requires CP enabled until the flag generation logic gets updated.
|
|
using more accurate ext3/ext4 filesystem sub-type.
|
|
The s/// command would copy the \ of substitutions before deciding what to
do with them (generally overwriting the \ with the new data). When the
substitution was A) at the very end of the new string, B) resolved to nothing,
it could leave a trailing \ that didn't belong there and didn't get overwritten
because the "copy trailing data" part that copies the original string's null
terminator already happened before the \ overwrote it.
The ghostwheel() function restarts regexes after embedded NUL bytes, but
if the string it's passed is _longer_ than the length it's told then it
gets confused (and it means we're off the end of our allocation so segfaults
are likely).
Fix: test for \ first and move the "copy byte" logic into an else case.
|