Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-10-18 | Factor out printf-style escape parsing logic from echo.c. | Rob Landley | |
2014-10-14 | Use O_CLOEXEC instead of O_RDONLY to signal loopfiles_rw() to close filehandles. | Rob Landley | |
2014-10-02 | Workaround for musl's faccessat bug (the rm -r "error: is a directory" thing).0.5.0 | Rob Landley | |
The Linux man page says I can use AT_SYMLINK_NOFOLLOW. It works in glibc, uclibc, and klibc, but musl returns -EINVAL any time you pass in that flag and the maintainer says that's not a bug and insists the man page and those other libraries all change to match musl's behavior. Toybox uses it to avoid scheduling unnecessary metadata writes for things we're about to delete (have to chmod unreadable directories so we can descend into them to delete their contents, the chmod happens before we descend so the disk I/O has plenty of time to be scheduled) because the extra writes wear out SSD faster. It's just an optimization and I don't really care if it works _well_ (the fchmodat call _also_ takes AT_SYMLINK_NOFOLLOW so that's covered), but musl's behavior uniquely makes the check always error and thus breaks normal "rm -r". Yes this workaround is checking #ifdef __MUSL__ which the library does not supply (because its code is perfect and will thus never need to be worked around). You can CFLAGS=-D__MUSL__ if you don't echo "#define __MUSL__" >> include/features.h when installing the library. | |||
2014-09-28 | Brown paper bag time: comma_scan() didn't work for anything but the last entry. | Rob Landley | |
2014-09-27 | Don't segfault for --help of single.sh build of OLDTOY commands that use ↵ | Rob Landley | |
another command's help. | |||
2014-09-26 | The only illegal characters in a username are ":" (field separator), "\n" ↵ | Rob Landley | |
(line separator), and "/" (filename separator). Restricting usernames to the legacy posix character allowed set (for filenames, so the $HOME directory is creatable on VFAT and similar) means you can't have UTF-8 usernames. Linux allows any character but / and NUL in filenames. Since root is creating these entries, we assume root knows what it's doing. | |||
2014-09-22 | Respond to two static analysis issues in dirtree_path() reported by Ashwini ↵ | Rob Landley | |
Sharma. dirtree->name is an array, not a pointer, so can't be zero. Remove the test. We dereference plen without checking it for null but calling dirtree_path(0, 0) is pilot error: only the _first_ call can have plen = 0. Add a comment. | |||
2014-09-20 | Tweak portability.h for uClibc version in buildroot defconfig. | Rob Landley | |
I've been locally patching uClibc to not violate posix-2008 (you don't need to define a GNU macro to get a posix function), but uClibc is obsolete and moribund (development peaked in 2006, last bugfix release was over 2 years ago), and the largest remaining user (buildroot) doesn't bother to apply such a patch. Since even buildroot is slowly migrating to musl-libc, just do the portability tweak for what the last release of the old thing actually did. | |||
2014-09-14 | Second attempt at one way xpopen(). | Rob Landley | |
2014-09-14 | Split xpopen() into xpopen_both(), xpopen(), and xrun() depending on whether ↵ | Rob Landley | |
we want to redirect both, one, or neither of stdin/stdout. | |||
2014-09-07 | Debugging pass on mount. Not quite done yet, but the basics seem to work now. | Rob Landley | |
2014-09-06 | Work around uClibc brain-damage. | Rob Landley | |
2014-08-24 | Work in progress snapshot of mount, with fallout to umount. (Not done yet.) | Rob Landley | |
2014-08-18 | Cleanups on useradd/groupadd/groupdel, and put TOYBOX_UID_SYS and ↵ | Rob Landley | |
TOYBOX_UID_USR in the top level Config. | |||
2014-08-15 | Fix bug reported by Ashwini Sharma: [-abc] syntax to switch off a command forget | Rob Landley | |
s _all_ saved command line arguments in GLOBALS(), not just for the command bein g dropped. | |||
2014-08-15 | If string_to_mode() is called on a base mode with S_ISDIR() and such set, ↵ | Rob Landley | |
pass those extra bits through. | |||
2014-08-12 | Patches to commands for issues reported from static analysis tool. | Ashwini Sharma | |
portability.h.patch - it is for O_CLOEXEC, as compiler complained of it. Makefile.patch - for cleaning generated/*.o files and libopts.dat file [Fixup to uniq.c from Rob.] | |||
2014-08-03 | Implement exec -user, -group, and -newer. Enable find in defconfig. | Rob Landley | |
2014-08-02 | Yank xrealpath prototype since the function's gone. | Rob Landley | |
2014-07-30 | As long as I had to write xabspath(), no point in wrapping realpath(). | Rob Landley | |
2014-07-29 | Actually set the again flag when calling the dirtree comeagain callback. | Rob Landley | |
2014-07-26 | Move DIRTREE_COMEAGAIN second callback up to when the filehandle is still ↵ | Rob Landley | |
open, and add dir->again variable to distinguish second call instead of checking for -1 filehandle. | |||
2014-07-26 | Default xcreate/xopen to O_CLOEXEC. (Pass O_CLOEXEC in the flags to switch ↵ | Rob Landley | |
it back off.) This way we're not leaking filehandles to children from things like find -exec. | |||
2014-07-21 | Improve gid/uid error messages. | Rob Landley | |
2014-07-21 | Little endian and big endian versions of peek (for host.c). | Rob Landley | |
2014-07-21 | Fix memory leak in error path. | Rob Landley | |
2014-07-20 | Add utf8 support to ls -C. | Rob Landley | |
Use wcwidth() instead of strlen(), and extend the -q substitution to also whiteout nonprintable characters that are nonparseable utf8 snippets. | |||
2014-07-19 | find needs "c" suffix to -size. | Rob Landley | |
2014-07-17 | Use libc daemon() instead of pending daemonize. | Rob Landley | |
2014-06-28 | Cleanup read_password(), factor out set_terminal(), fix salt bug (des wants ↵ | Rob Landley | |
the salt raw, no $ at the beginning). | |||
2014-06-25 | Cleanup pass on mkpasswd.c | Rob Landley | |
2014-06-24 | find_in_path() is supposed to work with a NULL path, but didn't. Fix it. | Rob Landley | |
2014-06-09 | Forgot to check in strstart(). | Rob Landley | |
2014-06-03 | mount: start on option parsing, implement loopback and bind mount autodetection. | Rob Landley | |
2014-05-31 | Introduce xfork() and make commands use it, and make some WEXITSTATUS() use ↵ | Rob Landley | |
WIFEXITED() and WTERMSIG()+127. | |||
2014-05-29 | Switch mtab_list to doubly linked so we can traverse in either order. ↵ | Rob Landley | |
Convert umount and df. Add dlist_terminate() to break lists for traversal in either direction. | |||
2014-05-27 | Add mount options to data getmountlist collects. | Rob Landley | |
2014-05-26 | Isaac Dunham suggested xprintf() should call fflush() instead of ferror(), ↵ | Rob Landley | |
and posix-2008 doesn't say if fflush() covers ferror() (or can return success when the stream's error state is set), so call both. | |||
2014-05-24 | patch from ashwini sharma: treat 0 length read at the start of password read ↵ | Rob Landley | |
as EOF. | |||
2014-05-21 | Add generic_signal() handler, which sets toys.signal and writes byte to ↵ | Rob Landley | |
toys.signalfd if set. | |||
2014-05-21 | Add free functions for predefined llist types. | Rob Landley | |
2014-05-06 | Switch human_readable() to just outputing decimal kilo/mega/gigabytes, make ↵ | Rob Landley | |
du use it, move it from lib/pending.c to lib.c. | |||
2014-05-06 | Use compiler built-in macros to determine if argument parsing can use double ↵ | Rob Landley | |
or float for FLOAT arguments. (I.E. whether double fits in a long's memory.) Check in a way that the macros not being defined just gives us the shorter one. | |||
2014-05-02 | In function readfile(), the buffer buf is free'd when readall() fails. This ↵ | Ashwini Sharma | |
free can cause a crash, if the buffer passed by user of function is not malloc'ed one. names_to_pid() is one usecase example here. | |||
2014-04-15 | Probes for O_NOFOLLOW that compile and run something aren't compatible with ↵ | Rob Landley | |
cross compiling, so just #define it to 0 if it's not in fcntl.h where posix-2008 says. | |||
2014-03-29 | Group headers by standard (POSIX or LSB) or function (internationalization, ↵ | Rob Landley | |
networking). Move headers standards ignore (but which have been there >15 years) to lib/portability.h. Fold xregcomp into lib since it's posix. | |||
2014-03-24 | Fix mkdir -p with absolute paths. | Rob Landley | |
Stripping leading / is not the right thing to do there. Broken when the code moved to lib and was genericized for use elsewhere. | |||
2014-03-11 | Move mkpathat to lib, remove redundant function used by patch. | Rob Landley | |
2014-03-11 | Add "volatile" annotation to peek/poke to stop potential optimizer overreach. | Rob Landley | |
2014-02-28 | Fix another bug reported by Ashwini Sharma. | Rob Landley | |