Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
major/minor/makedev, but glibc has vowed to break existing programs
(https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html)
and replace it with _another_ non-standard header (not in posix or lsb),
so let's just add functions to lib/ that do the transform ourselves.
|
|
|
|
3.8 kernel in 2012. That's way too new to assume the build environment has
it, so #ifdef and simulate a failure if it's not there.
|
|
Based on suggestions from Nicholas Boichat.
|
|
|
|
The clang FORITFY implementation doesn't like pointer signedness mismatch.
"What mismatch?", you say. "The historical bug in LP32 Android that left
it with a signed socklen_t".
|
|
Same missing quote at end of line as last time. The new additions to
the help are very useful though.
|
|
This file uses isspace which is defined in the ctype.h header.
|
|
|
|
|
|
|
|
|
|
- per POSIX, 'cannot open' must be in the 'type' string if open() fails
(both EPERM and ENOENT); we only do that if open() succeeds and fstat(fd)
fails.
- symlink detection (as per POSIX) won't work: opening them O_RDONLY
results in following the link, then we fstat() the fd.
- file 'FIFO' causes a hang; open() won't return till there's a writer.
|
|
|
|
|
|
|
|
for 2-argument version.
|
|
|
|
|
|
port 80 is not used.
|
|
Accept multiple -p, inline filter_matches, convert misleading "char* a, b" to
"char *a, b", use readfile() to read a file, use DIRTREE_SHUTUP, don't need
{ } around a single line, don't modify command line environment space
(which changes what ps/pgrep sees).
|
|
Also use finit_module if available. Given that "insmod -" requires
init_module, maybe this isn't a worthwhile optimization. Given that
"insmod /actual/file.ko" is the common use case, maybe it is.
Fix a bug in readfileat where *plen would be corrupted if you didn't supply
your own buffer (because ibuf is 0 in that case, not a pointer to the start
of the allocated space).
|
|
and VERBOSE=fail, and fix a quote mismatch.
|
|
|
|
SELinux denials include hex-encoded paths in the log messages; xxd -r -p is
a convenient way to decode them.
The heuristics are a little weird to my mind, but match the documentation
and observed behavior.
|
|
have noticed yet.
|
|
It uses a sed expression that assumes you can escape - to use it as a literal
(you can't, it has to be first or last char of the range), and assumes
you have to escape delimiters in sed [] context (you don't), and/or that
non-printf escapes become the literal character (they don't, the backslash
is preserved as a literal), meaning it winds up doing "s/[\-\]//" which is
a length 1 range, which is officially undefined behavior according to posix,
and regcomp errors out.
But if we don't accept it (like other implementations do) the perl build
breaks. So collapse [A-A] into just [A].
Testcae taken from perl 5.22.0 file Makefile.SH line 8.
(While we're at it, remove an unused argument from a function.)
|
|
Add support for a -Z option to getprop that will either print the
SELabel of a given property if one is provided or print all properties
that have been set along with their SELabel.
Also, correct a memory leak when freeing TT.nv.
|
|
This adds the missing "relatime" option, fixes error handling logic (mount
returns 0/-1, not an errno value, and I at least get EACCES rather than
EROFS in the case where the underlying block device is read-only; we should
also probably only try again if the ioctl actually succeeded), and adds the
missing newline in case where we go around and try again read-only.
The test case was "mount -o rw,remount /system" on Android.
|
|
|
|
|
|
|
|
|
|
and filter out commands that aren't nofork but aren't installed either
(toyflags 0, I.E. recognized aliases like "-sh" called from login).
|
|
Unlike the POSIX file(1), there's no magic file here, just hard-coded
common (non-obsolete) file formats. Personally most of my use of file(1)
is as a one-line readelf(1) summarizer, so although I assume a full POSIX
file(1) is out of scope (because just the database would likely be larger
than all the rest of toybox), a subset that only supports in-use file types
actually covers most of the use cases I encounter personally.
Also fix peek_be/peek_le.
|
|
Check the fstat(2) return value rather than read uninitialized memory if
it failed, and add a special case for files that claim to be zero-length
but aren't (as is common in /proc on Linux).
|
|
clang scan-build flags up this line as being unread, so clearing from code.
|
|
|
|
|