aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-02Print command name at start of each test.Rob Landley
2016-03-02Split lsattr/chattr tests.Rob Landley
2016-03-02Command name at start of each test.Rob Landley
2016-03-02Add fstype test.Rob Landley
2016-03-02Try to consistently print command name at the start of each test.Rob Landley
2016-03-02split pgrep/pkill tests.Rob Landley
2016-03-02For years the man pages have said to #include <sys/types.h> to getRob Landley
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.
2016-03-01The last-ever release of uClibc hasn't got prlimit, so probe.Rob Landley
2016-03-01SYS_finit_module isn't there on Ubuntu 12.04 because it was only added to theRob Landley
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.
2016-03-01Use shell builtins instead of calling wc/awk/sed. (Fewer forks in build loop.)Rob Landley
Based on suggestions from Nicholas Boichat.
2016-03-01The last-ever release of uClibc didn't #define MS_RELATIME.Rob Landley
2016-03-01Use the correct types for recvfrom.George Burgess IV
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".
2016-03-01Fix "make help" again.Elliott Hughes
Same missing quote at end of line as last time. The new additions to the help are very useful though.
2016-03-01config2help: add missing ctype.h includeMike Frysinger
This file uses isspace which is defined in the ctype.h header.
2016-02-29do_regular_file() prints output line, don't fall through to print default.Rob Landley
2016-02-29Fix trailing spaces on ps -o cmdline.Elliott Hughes
2016-02-29Fix inverted test.Rob Landley
2016-02-29pending/file: add cpio, tar, zip formats.Isaac Dunham
2016-02-29Fix a typo from last time, and Isaac Dunham's todo list:Rob Landley
- 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.
2016-02-29Second pass at the ELF type table.Rob Landley
2016-02-26Switch to $! for make.sh process enumeration.Rob Landley
2016-02-25Fix more warnings on 32 bit builds.Rob Landley
2016-02-25Fix bug where mount -o leftover string didn't get passed through to kernelRob Landley
for 2-argument version.
2016-02-25Typecast a printf argument because wchar_t isn't a rigidly defined size.Rob Landley
2016-02-25Musl needs an extra #include.Rob Landley
2016-02-22implement simple 'wget' and port name can be specified in URL if defaultLipi C. H. Lee
port 80 is not used.
2016-02-21lsof cleanupRob Landley
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).
2016-02-19Implement "insmod -".Elliott Hughes
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).
2016-02-19Add test_COMMAND for each command, update "make help" to describe TEST_HOSTRob Landley
and VERBOSE=fail, and fix a quote mismatch.
2016-02-19Help text update from Isaac Dunham, tweaked slightly.Rob Landley
2016-02-19Add xxd -p and -r.Elliott Hughes
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.
2016-02-18RLIMIT_RTTIME was added to the kernel in 2008, you can't expect uClibc to ↵Rob Landley
have noticed yet.
2016-02-17The perl build's attempt to escape spaces and such in LD_LIBRARY_PATH is _SAD_.Rob Landley
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.)
2016-02-17Add support for getprop -ZTom Cherry
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.
2016-02-17Fix remounting /system on Android.Elliott Hughes
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.
2016-02-17Testfile with the 3 different types of "not utf8 output" escaped chars in it.Rob Landley
2016-02-17Add dynamic/static checking to file (printing dynamic linker if found).Rob Landley
2016-02-17Add the sed invocations to convert tabs/spaces and back, plus some tweaks.Rob Landley
2016-02-15Cleanup pass on file.c, and add detection of different ELF architectures.Rob Landley
2016-02-14Add "make list", rename make working->list_working and pending->list_pending,Rob Landley
and filter out commands that aren't nofork but aren't installed either (toyflags 0, I.E. recognized aliases like "-sh" called from login).
2016-02-14Implement file(1).Elliott Hughes
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.
2016-02-14Fix wc -c optimization.Elliott Hughes
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).
2016-02-11removed unread assignment in sed.clovelycuppatea
clang scan-build flags up this line as being unread, so clearing from code.
2016-02-10Ignore .singlemake.Rob Landley
2016-02-10Wean scripts/install.c off toys.h so cross compiling less brittle.Rob Landley
2016-02-10Don't include toys.h from config2help.c (so cross-compiling from systems weRob Landley
don't run on is easier), and use HELP_ instead of help_ for macro prefixes to avoid name collisions (such as help_exit() the function).
2016-02-10toybox: tar: Fix support for long namesTom Marshall
Pathnames may be longer than the name field in the header, so use strncpy() instead of xstrncpy() to avoid bailing out. Also add unit tests to ensure proper handling of short and long pathnames. Change-Id: Id025891993746889564b479e5185cf9721b54a55
2016-02-10toybox: tar: Fix tar testsTom Marshall
Don't rely on ordering of readdir for tests. Change-Id: Ice24bb64ce453acb0006e3746677d619db933ab1
2016-02-10main.c: fix non-root usage when installed suid rootPatrick Ohly
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>
2016-02-10Add seq -w, suggested by izabera.Rob Landley