Age | Commit message (Collapse) | Author |
|
the deeply sad passwd heuristics that don't even check numbers and punctuation.
|
|
|
|
checking, and fix up format checking complaints.
Added out(type, value) function to stat to avoid a zillion printf typecasts.
|
|
"mktemp -u > /dev/full" leave file around.
|
|
The -u flag creates a file, and unlinks it before exiting.
This is usually known as "unsafe mode", or "dry-run" mode.
GNU mktemp has it, as does Busybox's mktemp and likely many others.
|
|
|
|
|
|
|
|
This fixes the build break, the change to yesno() prototype accidentally got
checked in last commit. (Oops, sorry.)
|
|
|
|
|
|
before saving, the updates don't go in the commit. Behavior difference
between git and mercurial, that.
Good to know.
|
|
|
|
The most likely reason for setfscreatecon to fail is that you don't have permission, and that's reported by the write return EACCES. There isn't really a "bad" context; they're just strings.
Before:
$ adb shell mkdir -Z x y
mkdir: bad -Z 'x'
After:
$ adb shell mkdir -Z x y
mkdir: -Z 'x' failed: Permission denied
Other than this, the ToT mkdir works fine with SELinux.
|
|
racy gap between create/label.
|
|
Change-Id: I23174fb7b54d029784e6d7460368128113090079
|
|
|
|
Use perror_exit to show the likely "Operation not permitted" if klogctl fails.
|
|
|
|
|
|
ioctl(). (This is a thing Android's old mount already does.)
|
|
confusing update-alternatives, the paths of the links installed by toybox should
match those installed by busybox. This is accomplished by changing the flags
of a few tools within toybox.
|
|
|
|
|
|
|
|
Also, xstrdup() the unmodified template because changing the environment string
could make the changed version show up in "ps".
|
|
|
|
|
|
|
|
Include full template in error messages.
Don't report success on failure with -q.
Avoid unnecessary allocation.
Fix "xxxxxx" versus "XXXXXX" confusion.
|
|
The OS mostly catches this for block devices, but calling "mount -a" twice
shouldn't overmount tmpfs entries with new tmpfs instances. (This needs a test
suite entry, and the test suite needs a root context to run in...)
|
|
Probe the default buffer size, replace the constants with FLAG_x macros, add -r,
replace the byte at a time output with a single xwrite(), more comments.
|
|
|
|
Android is missing all of these; we need to probe for some so we have
a config symbol to depend on.
sethostname() is easily replaced.
We got termios.h via pty.h; now it's not included in configure-step tools,
so we need termios.h to generate globals.
|
|
analysis, plus occasional tweak by me while reviewing them.
|
|
mount, 2) Don't stop checking filesystem types due to EBUSY, it may mean already mounted by another filesystem type you haven't tried yet.
|
|
add better error reporting.
|
|
|
|
|
|
we want to redirect both, one, or neither of stdin/stdout.
|
|
|
|
|
|
|
|
(It's not like systems implementing -b binary and -t text still matter.)
|
|
Convert umount and df. Add dlist_terminate() to break lists for traversal in either direction.
|
|
On my machine, for a 2.2 GB file of random bytes, the timings with
warm cache are:
toybox before: 11.4 seconds
toybox after: 8.3 seconds
GNU md5sum: 3.9 seconds
openssl dgst -md5: 3.5 seconds
This is clearly better than before (3x openssl), but still slow (2x openssl).
I suspect there is more low-hanging fruit to be had by eliminating the
memcpy in hash_update (maybe not too much - hash_update accounts for
about 4% of total runtime versus 92% for md5_transform according to
perf - but this would also help sha1sum).
make bloatcheck on x86_64 gcc 4.8.2 -Os:
name old new delta
-----------------------------------------------------------------------
md5rot 0 64 64
md5_transform 365 223 -142
-----------------------------------------------------------------------
-78 total
Rationale for the changes:
Move definition of 'rol' up so it can be used in md5_transform. This
is purely cosmetic; it expands to exactly the same code.
Put rotation counts in a lookup table instead of calculating them on
the fly. This is mostly a wash size-wise, +5 bytes total, but
worthwhile for readability and speed.
Instead of accessing the state array using a rotating index (the
variable formerly known as 'a'), access the state with constant
offsets and rotate the contents of the array instead. This is the big
win - it eliminates all the crazy memory addressing math inside the
loop.
|
|
|
|
|
|
Partly because there's no supplied target string ala sprintf, and partly
because I can never remember what order the m and s go in.
|
|
POLL_IN defined as a constant by some libc.
Factor out login.c's change_identity() to xwrap.c as xsetuser().
Replace xsetuid() with xsetuser()
Put a space between argument globals and non-argument globals.
TT starts zeroed, don't need to re-zero entries in it.
STDIN_FILENO has been 0 since 1969, even DOS copied that. Just say 0.
Added an xchroot() using xchdir() to lib/xwrap.c.
Remove endgrent() call until somebody can explain why it was there.
|