aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-03Move fflush() checking to xexit() and have exit paths in main() call that.Rob Landley
2015-01-02Cleanup pass on printf.Rob Landley
2015-01-02Need to update install.c for the changed OLDTOY() argument list.Rob Landley
2015-01-01Tweak status.htmlRob Landley
2015-01-01Switch a lot of strncpy() calls to xstrncpy().Rob Landley
2015-01-01strncpy(optptr, hname, strlen(hname)) is really just strcpy().Rob Landley
2015-01-01strtol() doesn't return error indicator for overflow, it just sets errno. So ↵Rob Landley
add estrtol() (which clears errno first), and xstrtol() (which error_exit()s on overflow).
2015-01-01Debris from flag handling rewrite: don't allow -^A to actually trigger.Rob Landley
2015-01-01typo fixesElliott Hughes
2014-12-31Fix for mix from Isaac Dunham (who can actually test it). (I tweaked the ↵Rob Landley
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.
2014-12-31Redo option parsing infrastructure so #define FORCE_FLAGS can unzero flag ↵Rob Landley
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.
2014-12-31When CP_MORE was disabled, the d flag was still in the [-exclusion] list at ↵Rob Landley
the end and option parsing fell off the end looking for it (segfault) if DEBUG wasn't enabled to check for that.
2014-12-31When you include the posix header libgen.h, glibc #defines basename to some ↵Rob Landley
random other symbol name (because gnu) and this screws up nontrivial macro expansions of NEWTOY(basename), so work around it in portability.h.
2014-12-30Link to gmane web archive.Rob Landley
2014-12-28Another random link for the design page.Rob Landley
2014-12-28Fluff out help text.Rob Landley
2014-12-27Promote mixRob Landley
2014-12-27Cleanup mix.c.Rob Landley
2014-12-24Teach factor to accept whitespace separated arguments (reported by Robert ↵Rob Landley
Thompson). (The diff looks bigger than it is because of reindenting.)
2014-12-23getenforce and setenforceElliott Hughes
two more easy SELinux commands:
2014-12-23those of us who need to check in generated files find that 'tr' andElliott Hughes
'traceroute' keep swapping places. self-inflicted, yes, but not much i can do about it :-(
2014-12-23Merge catv back into cat as discussed on the list. Add comments about ↵Rob Landley
infrastructure upgrades needed to restore separate catv option.
2014-12-22Allocate space for null terminator.Rob Landley
2014-12-22sed 'r' didn't work right.Rob Landley
2014-12-21Another sed bug. (The e2fsprogs build uses multiple line continuations on ↵Rob Landley
the same command.)
2014-12-21Promote sed to posix.Rob Landley
2014-12-20sed: implement 'l'Rob Landley
2014-12-20Add tizen section to roadmap.Rob Landley
2014-12-19More sed bugs.Rob Landley
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.
2014-12-18Decouple cp and mv so mv uses its own --help text.Rob Landley
MV still requires CP enabled until the flag generation logic gets updated.
2014-12-18Give fstype its own config symbol (separate from blkid), and fix blkid not ↵Rob Landley
using more accurate ext3/ext4 filesystem sub-type.
2014-12-15Fix yet another sed bug.Rob Landley
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.
2014-12-14Make sed a\ line continuations work properly for different pattern input modes.Rob Landley
2014-12-13Fix bug in sed y/// where bytes in target but not in source were replaced by ↵Rob Landley
zeroes (nul terminator overwritten).
2014-12-13Last sed bugfix broke 'b', fix it.Rob Landley
2014-12-13Leftover variable from factoring out base64_init() caused an unused variable ↵Rob Landley
warning.
2014-12-13Oops. xfork() moved to portability.c and the config2help.c build wasn't ↵Rob Landley
including that. (Worked until I did a "make clean".)
2014-12-13Forgot to check in a header file for base64.Rob Landley
2014-12-13Add "make help" entry for "make change".Rob Landley
2014-12-13Add base64.Rob Landley
The tizen guys wanted this. Yeah, I know there's base64 code in uuencode/uudecode, but that this has -i, input lines aren't of fixed length, encode/decode are in same file, there's no prefix/suffix code, it always writes to stdout... Eliminating the code duplication wouldn't be worth the if/else I'd have to add, so I just did a new one. Factored out the base64 table init into lib.c though: that was worth sharing.
2014-12-13Remove more strncpy() calls.Rob Landley
The semantics of strncat() and strncpy() are non-obvious, so let's not use 'em. Both zero all their remaining buffer space, and with strncat() the size is the space left at the _end_ of the string (not the size of the buffer) so it's way too easy to stomp memory you don't own. As long as we have to measure stuff ourselves to get it right, just use memcpy().
2014-12-11here's a patch that should let us replace toolbox's chcon.Elliott Hughes
(it also adds a feature, -R, because toybox makes that so easy.) you'll probably want fancier configuration here because although the --as-needed works okay, a typical Ubuntu box will have the .so but not the .h files. i did consider adding a toys/selinux/ directory, but given that existing tools like ls and id will want -Z SELinux options, i wasn't sure whether you'd think it was worth segregating the SELinux-only toys. note that this won't help the tizen smack users (and patch for smack won't help SELinux users). so you might want to think about where you'd like us to be aiming: #if USE_SELINUX/USE_SMACK in all the relevant places, or a toys/selinux and a toys/smack (though we'd still need #if in at least ls and id), or a lib/security.c that concentrates all the differences into one file?
2014-12-10Make unescape_delimited_string() copy the string so error reporting isn't so ↵Rob Landley
messed up.
2014-12-10Fix some sed bugs and improve error reporting.Rob Landley
A newline after 'b' commands in -e command line patterns was being discarded as whitespace, a single element regex match on a {} was leaving stale state for the next line, and giant -e blobs of instructions were saying things like problem at character 432 (note: nulls inserted for regex processing aren't always cleaned up, screws up error reporting).
2014-12-04Work with buildroot's extensively patched uClibc, and for nommu support move ↵Rob Landley
xfork() to portability.h and #ifdef based on __uClinux__ (which seems to be the nommu compiler define).
2014-12-04Implement xstrncat() and fix xstrndup().Rob Landley
2014-12-04Add shred.Rob Landley
2014-12-03More gzip stuff: now creates -0 compression files (store only), and does so ↵Rob Landley
to stdout.
2014-12-02Fix bug pointed out by Elliott Hughes ("vmstat 1" should repeat endlessly), ↵Rob Landley
and remove final delay (after all output) for "vmstat 2 3" case.
2014-12-02Note posix mailing list posting correcting a bug in the web version of the ↵Rob Landley
standard.